HA breaks every night (network issue)

My HA in a RP model 4 stops working every night.
To fix, I pull out the network cable (from the Eero), restart, reconnect.

How do I stop this problem?

I had a problem where my Pi would not reconnect to the network if the connection was dropped for any reason (I’m my case the router rebooted). The Pi itself was fine, HA was still running, but no longer on the network. It was a “post COVID” Pi with a slightly later hardware revision - v1.5 (my ‘good’ Pis were all v1.4).
The solution was to connect it to the router via a switch (which kept the connection alive).

I have a similar issue with OPNsense when my internet connection.box restarts .

So I have a cron job that checks the internet connection through a script using a ping command and that will try to restore the situation by bringing the interface down and up again first, and then rebooted. See Monitor OPNsense internet connection · GitHub for the script.

It will need to be adjusted but it’s a good start I think.
Adjustments include:

  • Use the correct interface (not igb0);
  • First try to renew the DHCP lease using a ha specific command;
  • Then try to restart the interface;
  • Rebooting HA every day seems an overkill;
  • Potentially update monitoring itself (ping internet box or other equipment, not internet service).

Is it only the pie that is affected on that connection with the Eero or are other devices that are connected to it affected as well? we need more information about your network setup and if anything else is affected to properly diagnose the issue.

I would try to establish a pattern to diagnose the issue. One way you could do this is to use a ping sensor in HA and make sure you are including that sensor in your recorder, then you would be able to see if this is occurring at the same time every day, implying you have something happening at that time that is causing this or if it’s totally random - which may point to a faulty Pi or hub.

You might find that just having the ping sensor may keep your network alive as well.

I solved this by doing two things (but maybe only need one of them).

  1. Fix the IP address in the HA settings
  2. Reserve the IP in the Eero settings

Yes for core devices on the network you should always be setting static IP’s on them, I have all my gear setup in blocks of static IP’s.

As long as its assigned to the mac address of the device through the main DHCP host on the network it’s set and you can just restart the device and the host to clear the cache to pick up the new assigned IP. Should not really need to have it set on the device side for this since that type of setup is more as a default IP setting for first time setup (a good reason to have a vlan with the common IP blocks when you want to change them so its inside the network range you want to use).