WTH Why doesnt homeassistant work without internet access

This is not true generally. You took the time to write this WTH, so please take add a few more words about WHAT does not work without an internet connection.

3 Likes

Lol classic RTFM. 100% user error.

1 Like

So to elaborate on the issues Ive personally faced when homeassistant loses internet, typically all local dns requests stop working which means any services that I use by domain name instead of by IP address.

In my particular setup this means, Unifi protect, opensprinkler, denon avr, and remote/samba storage(that is local). The file editor addon also breaks because all resources are remote which is a known github issue as well.

Sorry but that does not make sense. Without an internet connection the resources you decided to link in dependence to the internet do not work any more. What do you recon is HA supposed to do about this?

which means any services that I use by domain name instead of by IP address.

What does that mean? A domain like github.com will not work obviously, but somedevice.local should still work fine.

None of the integrations I mentioned “require” internet. For multiple self hosted services I use local domains rather then hard coding ips. So for instance if my receiver is at 192.168.1.35. Rather then hard code this in HA, I use a local domain like receiver.internal. I host my own DNS server which HA is setup to use as well.

When I have internet this works fine, HA resolves my receiver using the DNS entry, but when internet goes out HA will stop resolving all domains even though the DNS server is completely local and I can resolve it manually.

Correct your external resolver stops but your internal resolution is fine. (im using basically the same gear BTW. Unifi, Denon, etc)

No you can’t get to github.com internet down so yih can’t update or install but my experience is everything still works. So…

That’s the question everyone has what is ‘broken’ in your situation… Mind you I have the same config and I’ve not once seen what you describe. EXCEPT for installs or updates. (because no github)

There have been some complaints about some of the deep dark corners of HA using its own DNS resolution as fallbaywhich creates some rather weird behavior sometimes? Maybe that’s what you’re seeing?

2 Likes

Yes I know github wont work, I think I am referring to what you call the deep dark corners. Its been a little bit since I have been without internet for an extended period of time, but the last time this occurred, all the integrations I mentioned stopped working. Unifi Protect would not start at all because it would fail trying to resolve the domain(even though it was resolvable), and same with the other integrations.

I thought there was a github issue for this, but the closest I can find is the one for the file editor which isnt directly HA. The only DNS related thread is this one, which mentions a few similarish issues with DNS not working, Local DNS! - #183 by robot468

Does it work if you specify IP address?

Last time I tried yes but its been a while since Ive lost internet to test this

just unplug The Internet from the router to test it out

Generally that doesn’t reproduce the error. It typically takes time for the issue to occur which is why I believe it has something to do with DNS fallback. If I unplug the internet cable right now it would probably take a few hours to notice anything not working.

It might be possible to reproduce quicker if I restart HA after disconnecting internet.

You mentioned unifi, Why not just add some test rules to your firewall and have them block traffic from your HA controller to test things out. This way you can test HA without fully killing your internet. I do this all the time in my multi house setup. I’ve never seen HA stop working for my smart IOT devices when the internet is down. I now use a cell phone to provide backup internet for HA so I haven’t had HA internet issues in a few years. Maybe you might want to consider alternative internet access if you have some critical components outside your home.

Good idea/reminder for myself as being meaning to do this for a while.
I blocked the whole HASS VM from WAN, left it a couple of hours and everything still works…other than the obvious items that need access like Google Backup etc. I ended up leaving all my IoT things in a Blocked Group to see what happens over time and whether then need to call home…Meross LAN, Local Tuya, Lifx etc? No idea but time will tell!

Many things in this class are known to fall off the network if isolated over time. I know many vacs dont like being cutoff from the mother ship. That will be interesting…

So I pretty must block all of my smart house IOT devices access to the outside world. TVs are the only thing I allow out of the network. That said I had to open NTP as I don’t have a local NTP server, and a lot of the IOT devices want to update their clock. My LMS server needs to contact Spotify, as that’s what I use mostly for external music. I have some device type that doesn’t work if it can’t reach google DNS servers, so allow DNS access to 1.0.0.1, 8.8.8.8 and 1.1.1.1. Then I have rules I enable when I want to update the firmware on the IOT devices.

2 Likes

Interesting, what type of devices?
I block those DNS specifically as I don’t want my Google Devices to be use Googles DNS. Purpose if I want to use VPN on my Chromecast with GoogleTV dongle it can be tricky if DNS is via it’s built in DNS 8.8.8.8 or bypass so dongle uses PiHole for Ad Free SBS etc. Haven’t had any issues.as they still work using local DNS (or VPNs).

Yeap and being meaning to test this. What’s working now may well not work in a few days.
Other: If a device hasn’t been used in a while but still in HA, Might not show up as Active when turned back on regardless of being hearsay “Local”. It’s those I want to work out.

I looked over my firewall logs to see what I could find and at this point the logs only show three types of devices hitting google dns.

HA controller hits 1.1.1.1
LG sound bar hits 8.8.8.8
Foscam cameras hits 8.8.8.8

I feel like there were other devices. It’s possible the other devices only go to google at boot or if my local DNS isn’t responding.

Am surprised they fail if they can’t access Google’s DNS. If unavailable, would have expected them to resolve using the provided ones via DHCP. Anyhow…best not go off the WTH topic on hand. :smirk:

1 Like

Lol you’re already waaaay off that. You’re looking at your individual devices now because HA is operating as expected per your own post above

Technically we’re not talking about HA anymore, rather how most wifi IoT devices are crap because they phone home. :wink:

1 Like