Loss of the ethernet connection

I run Home Assistant via Home Assistant OS on a Raspberry Pi 3 with a USB 3.1 Flash Drive. I notice that after 5 or 6 days, the Raspberry Pi loses its connection to the network. The server no longer appears in the list of devices connected to the router. So I can no longer connect to Home Assistant, locally or remotely. The only way I have found to fix the problem is to restart the Raspberry Pi. The host is not in my home and I cannot physically restart it for the moment.
Has anyone encountered the same problem? How did you solve the problem? Is there a way to restart the host remotely?

Thank you in advance for your help.

1 Like

I run a Pi 3B with HA. I recently was on holiday for 2 weeks and this didn’t happen to me. Check powersaving features not enabled on your router and/or PI. I turned all mine off - e.g. WiFi and WoL.

Thank you. I will check that the next time I can access to my Raspberry.

As far as remote restart is concerned, a remotely controllable smart switch will do it, but two issues:

  1. unplugging any computer is brutal and unrecommended. However if it is completely frozen, probably unavoidable.

  2. Your control of the smart switch has to be independent of home assistant, which means some sort of cloud control and an app you didn’t want.

Another suggestion - build a watchdog device that detects when this has happened (possibly by ping) and then cuts then restores power. This could be an esp8266 perhaps?

My solution (which I rarely use, only in an emergency when away from home for an extended period) is to have a wifi smart plug (TP-Link) setup with my Google Home which supplies power to my HA server. This plug is not configured in HA at all but the Google Home app lets me toggle it off/ on if HA is completely unresponsive.

I hate using it because I don’t like hard rebooting the server but sometimes it’s all I can do (I work away from home).

That was my original plan but it failed in that HA could become completely unresponsive yet I’d still get a Ping response.

Thank you for the suggestions. Even when I am on the same local network, I cannot access HA. I have no choice, I have to restart my Raspberry.
I have an Apple TV. I will try to use a smart plug compatible with HomeKit.

I don’t know if HA is still operational despite losing network access. But it gives me an idea. I will create a sensor that tests if the router is still accessible by PING. If not, I schedule the host to restart.

Anybody tried if this could be the reason and a solution to fix it?

I think this is a docker issue. I used to get this problem and it turned out that corrupt logs in docker was causing it.

I don’t remember the command but I’m sure you could Google search and remove corrupt docker logs. Pretty sure I just set up a daily cron for it.

Edit:

Check this

I have an automation triggered by cloud connection or Uptime Robot. If one fails for 5 minutes I reboot the router and after that (after check the connection) I reboot the host. A 2 steps recovery which saved my access a number of time. If you lose your connection you are not sure if it HA or the router…