Hi,
There’s likely a few networking things going on here which you’d hope would come back automatically, but don’t always.
I’m assuming you know an IP address and some sysadmin as you mention setting up DuckDNS (implying NAT and other router stuff).
- The ISP router likely runs a DHCP server to hand out IPv4 addresses (like
192.168.0.123
) to both HAOS in the RPi4 and your other devices.
These leases typically last 24h, so turning the router off for days will have forced HAOS to remove the IPv4 address it was given.
IPv6 may still work via link-local addressing.
- Using an address like
http://homeassistant.local:8123
uses mDNS (AKA Bonjour) which also times out after a while.
You did the right thing remembering the LAN IPv4 for HASS, and trying it directly. This usually works for me if the router / DHCP server fails but that’s after 10 minutes, not after the 24h lease times out.
I’ve seen HAOS mDNS issues fixed by un-plugging a live Ethernet cable, then re-connecting as this ifdown
usually kicks Linux into reconfiguring DHCP, DNS, routing, and mDNS.
Sometimes IPv6 works with broken IPv4 - try a phone, tablet, desktop as each OS can react differently.
Getting a console and entering ha core rebuild
is the same as a factory reset, so without a local backup, that’ll wipe everything.
I’ve not had to use the HAOS console for years, but think you can get to the HASS (notice the difference - HASS runs on a VM on HAOS) Linux command line and the HAOS shell to check networking (gets complex as HAOS is a router with internal VM addresses).
I’d recommend installing some common tools so you more easily see what’s going on when things are working (although not network specific):
- Add-on: File editor, Settings → Add-ons → Add-on store., “File editor” - useful to see behind the GUI
- Add-on: HASS web shell The Home Assistant CLI shows the HASS command line.
- Add-on: Samba share - one way of copying off backups and other media (although I tend to use the command line and
scp
)
Get comfortable connecting and downloading backups to another machine - that way you can always get back if stuff fails. Backups are just GZip compressed tar archives, so can be examined on a desktop PC to get specific files back via the add-ons above.
Fairly standard Linux command line commands for network tracing include:
ip a # get i/f + addresses, can also set static addresses
ip r # get routes
dig www.google.com
host www.google.com
traceroute www.google.com
Back to specifics:
-
is there anything silly I am missing here?
I don’t know why the router didn’t start back up and offer HAOS a new DHCP lease and “just work”. Giving it 5minutes and unplug/replug the RPi4 LAN cable might fix a timing issue.
Hopefully the tools above can show you more information as to what is failing.
Worst case - pull the power to the RPi4 (shudder!). The file systems might not like the “dirty shutdown”, but it’s better than a wipe and restore backups.
-
should it be avoided to switch off my ISP router for a few days?
Probably - less of an issue on fibre, but it’s a bad idea on ADSL/ VDSL/ DOCIS as the WAN interface gets “trained” based on the line noise.
If this helps,
this post!