WTH Why doesnt homeassistant work without internet access

Why does homeassistant stop working with internet goes out for totally local devices. Seems to defeat the whole point of having a totally local home automation

n you give more details about ā€œstop workingā€? HA donā€™t need internet for working.

3 Likes

At the start of the year, I had 2 weeks without internet where home assistant + plex were the only things that worked.
Are you sure ?

5 Likes

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.