Help with HA name resolution

Could use some help configuring HA… let me set the stage for you:

I’m on vacation, and I don’t have VPN or other direct access to my network. I do have Nabu Casa for HA, so I can at least talk to that. My HA instance runs on its own rPi on HAOS. No real compelling reason to set things up this way, other than that I had a spare Pi and some free time, and this is where I’ve landed.

Since upgrading to the latest 0507 firmware on my Zigbee dongle-P I’ve seen occasional issues with my Inovelli Blue switches… en masse they will all suddenly show as unavailable in HA, even though they -are- online and controllable via the z2m GUI on core, and Node-red still has control. I don’t know why HA thinks they’re unavailable… seems like the issue must be between HA and MQTT. Whatever… I can try and find the root cause once I’m home. I do know that a restart of z2m will solve the issue in the short term (done this a few times now).

So… how to restart z2m from HA running on a separate box? I installed a Firefox addon to HA and can navigate to the core SSO login page using its IP address, but not using its FQDN. My HA box is (stupidly) using public DNS servers and cant resolve internal hostnames. This is an issue, since after logging in the core -always- redirects to a page using its hostname in the address, even if I started by using the IP in the address bar. I’m stuck at the login page, basically.

Seems like the best solution would be to get a static entry into the /etc/hosts file on HAOS so that the core is reachable via its hostname, but I’m struggling to find a way to do this. Anyone have a suggestion for how to go about getting a static name entry into HAOS so I can control z2m using Firefox running on my HA box?

If your running HAOS on a Pi, and have access to the add-on store. add on the ssh terminal and then use that to edit the hosts file directly on the pi :slight_smile:

Did that, but the hostname is still unresolvable according to firefox running inside HA.

Ok so since your running a full HA install check out this issue thread as it covers quite a bit to do with name resolution from HA, and will let you look at several potential avenues at once. hopefully this helps.

Yikes what a mess. So, short answer is I probably cant pull this off from outside my firewall… Im just not that good. Best option would seem to be to revive my vpn (haven’t had one working inbound to the house in over 15 yrs). HA is a nightmare under the hood.

I ended up cheating. I logged in to my ddns provider and added an A record with the private IP for my core. Then i was able to use firefox running on HA to access the core and re-start z2m. Removed the A record, and all is back to normal.

2 Likes

Glad to hear it is fixed, I would highly recommend setting up a VPN still, whether that is using CORE directly via the Wireguard app, or PiVPN/Tailscale using something as simple as a Zero W, or maybe even your router if it has that feature. Super simple these days and I cannot tell you how many times it has saved me when trying to troubleshoot something remotely. Much easier than guiding someone else over the phone.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.