WTH Why doesnt homeassistant work without internet access

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

Are you sure that your router does not implement an NTP server? For example every Fritz!Box does. If your router doesn’t you may look at other devices. A Synology NAS for instance also should provide it, maybe you need to turn it on.

You’re correct my firewall does offer NTP services. I just didn’t have the rules in place to redirect NTP traffice. I set it up so we’ll see if any IOT device was doing something bad over NTP now.

I am in somewhat similar situation as you. Maybe there is something we are not doing right. When my internet goes down File editor stops working. It will not even open. The moment I plug my internet it starts working again.

Also, all icons stop loading (not a big deal just wondering why). If you go to settings, devices, and integrations, icons will not load. Almost like a web page designed with pictures yet the images are not uploaded to the server

I’m thinking something is wrong with your setup. I, regularly, stop HA to make sure “local” things (lights, etc.) work without it (because it crashes much too often).

I’ve never tried cutting off Internet with HA still running. Cutting off Internet would piss off the family so bad. I’m going to have to try this.

MrGrey.

This sounds like DNS issues.

Just encountered this issue today. My internet went down and I realized none of my mqtt devices were working. After some investigation I noticed I had setup my mqtt integration with a local DNS entry I added on my UDM SE (my broker is hosted on a separate vm). I reconfigured the integration to use the IP of my broker instead and it worked but changing it back to the internal domain name failed again.

After my internet came back I setup a firewall rule to block Home Assistant from accessing the internet and sure enough the local DNS entry was not resolving again. It seems that Home Assistant domain name resolution breaks when there is no internet access even if you are pointing to a DNS server inside your network and in the same subnet.

What’s interesting is that nslookup for the internal domain fails but ping doesn’t.

And yes I have Home Assistant using 192.168.1.1 (my gateway) for DNS. I tried disabling DNS fallback but it didn’t make a difference.

➜  ~ ha dns info

fallback: true
host: 172.30.32.3
llmnr: true
locals:
- dns://192.168.1.1
mdns: true
servers:
- dns://192.168.1.1
update_available: false
version: 2025.02.0
version_latest: 2025.02.0

Thanks for sharing, this is my exact issue. HA seems to disregard local DNS as soon as internet goes out

I think the main issue is that HA is not actually using the DNS Server you configure but it still uses the docker one, which wont have any of the local entries you add to your DNS Server. Although I have DNS setup as 192.168.1.1 it appears that it is still using 172.30.32.3

➜  ~ ha dns info
fallback: false
host: 172.30.32.3
llmnr: true
locals:
- dns://192.168.1.1
mdns: true
servers:
- dns://192.168.1.1
update_available: false
version: 2025.02.0
version_latest: 2025.02.0

➜  ~ ha network info
docker:
  address: 172.30.32.0/23
  dns: 172.30.32.3
  gateway: 172.30.32.1
  interface: hassio
host_internet: true
interfaces:
- connected: true
  enabled: true
  interface: enp0s18
  ipv4:
    address:
    - 192.168.1.xx/24
    gateway: 192.168.1.1
    method: static
    nameservers:
    - 192.168.1.1
    ready: true
  ipv6:
    address:
    - xxxxxxxxxxxx
    gateway: null
    method: disabled
    nameservers: []
    ready: true
  mac: .....
  primary: true
  type: ethernet
  vlan: null
  wifi: null
supervisor_internet: true
➜  ~

I assume your not using HA OS? If I recall the last time I looked into this the issue was basically that regardless of what DNS is set HA fallback to cloudflare so when you lose internet it will try to reach cloudflare instead of your normally set one

Yes I’m actually using HA OS and tested with disabling fallback (ha dns options --fallback=false) but it didn’t make a difference for me

Yup I have the same thing done but it will fallback to cloudflare regardless

Yeah that might be it. It’s definitely using the local DNS when there is internet or it wouldn’t resolve for me since I’m using a reverse proxy and don’t have that domain forwarded internally but as soon as internet is cut it’s not using the local DNS server so falling back to CF or even the docker dns wouldn’t resolve.

Did you report this as a bug by any chance?

Yeah I wonder if its possivle to inspect and see where the dns requests are being made to and then override thIP to forward traffic the local dns still.

I tonk the fact HA even does this in the first place is a bit ridiculous

I don’t think that’s by design. When I try nslookup to my broker after cutting internet access I can see it trying to reach my gateway at 192.168.1.1:53 but it times out so it’s most likely a bug in the logic somewhere.

I did just test a NAT rule to redirect any DNS traffic from HA back to the gateway but that didn’t work.

Maybe not sure, but either way for a project that prides itself on being all local, its disappointing that its incapable of running fully without internet access