Home Assistant dissapears from the network every couple days/hours

I’m using the OS install on Raspberry Pi 4, connected over Ethernet. I have DHCP set up to give the same IP. But still every couple of days it disappears from the network and I can’t access it anymore. I checked in the router on the list of connected devices and it’s not there. Recently started happening more often, now sometimes every couple hours. The HA itself is fairly new with not much stuff on it, couple of ESPHomes, WLED, mobile app, HACS, NodeRED, Visual Studio and maybe couple more things. Some custom cards from HACS.
I’m not sure if it’s just a network issue or the entire system shuts down/freezes or whatever but I have no way of checking since without network I can’t access anything, and I believe the Pi itself does not output any image over hdmi when running hass.io, at least I haven’t been able to get any.

Is there any way I can check what happens with it when it goes down?

What constitutes “disappear”? Are you accessing it via SMB and no longer shows? Is it trying to access homeassistant.local and it doesn’t respond? Or are you trying to ping the actual IP address with no response? I ask because all of those various failures can happen independent of HA itself. I’ve had SMB quit on me but can still get to the mDNS entry and IP address, so I know it’s SMB and not the Pi or HA.

When I go to the IP in the browser it shows an error page, Connection Refused I believe but I’ll check once that happens. In the router settings in the DHCP on the list of connected devices the IP assigned to the Pi is not shown as connected. I’ll check the ping because I can’t remember but I think it also fails (destination host unreachable),
ESPHome units stop working (motion sensor + led strips on separate devices which should turn on but don’t)
I don’t have SMB running

And the mDNS fails too? So if you ping homeassistant.local it also fails?

yes, http://homeassistant.local:8123/ also doesn’t work in browser. the ping also fails but it’s different than normal IP ping

C:\Users\adamz>ping 192.168.0.2

Pinging 192.168.0.2 with 32 bytes of data:
Reply from 192.168.0.66: Destination host unreachable.
Request timed out.
Reply from 192.168.0.66: Destination host unreachable.
Request timed out.

Ping statistics for 192.168.0.2:
    Packets: Sent = 4, Received = 2, Lost = 2 (50% loss),

C:\Users\adamz>ping homeassistant.local
Ping request could not find host homeassistant.local. Please check the name and try again.

C:\Users\adamz>

Plug in a HDMI monitor.

I would try to set a real static ip for eth0 (if this is possible with OS Install).

Just a thought… If you’re using a USB drive on the RPi 4 without a power supply, the drive may be drawing more power then the RPi can deliver. When that happens, this RPi fails. Could explain the intermittent failures.

There is no signal from HDMI at all

No USB drive connected

There should be.

In that case do I need to enable it? Because there is no image on either hdmi port even after I restart it and everything is working correctly

I have the same setup and get the same problems. Have tried reinstallation, new SD-Card, disable addons, setting logging to maximum but dont get a clue on why it freezes! Anyone figured this out?

I managed to get image from the HDMI, I think I had to power cycle it with hdmi cable plugged in and it started working. So what do I with it? I can see the CLI and login as root, HA is unavailable via network.

1 Like

Start exploring.

Is networking up?

ip addr|less

then start playing with he ha command, e.g.

ha --help
ha info 
ha core --help
ha core info

Great! Did you manage to understand more of the problem?

Unfortunately the last time was a different issue with the network itself, HA was still running.

When it actually fails I don’t get HDMI signal unless it was already plugged in before the fail
same goes for keyboard, unless I keep it plugged in since before it freezes, it won’t get detected.

I haven’t had the time to leave my keyboard and monitor plugged in, because I need them for other pc and don’t have a spare at the moment.

I set up system monitoring on lovelace to watch the Pi before it fails

and initially I suspected maybe a memory leak is some custom card because RAM usage was climbing, but now it’s flat.

I uninstalled a bunch of custom components from HACS and some old integrations, and it hasn’t happened since. I set up an automation to reboot every day at 4:30 just in case.

Hope it’s OK to jump onto this thread? I’m still trying to diagnose why my Home Assistant drops off the network every now and then. There’s also this weird pattern it sometimes exhibits where when it comes back online it takes other network devices OFFLINE. It’s so weird. Never known networking issues like it. As far as I’m aware, there isn’t an IP conflict.

These symptoms look VERY familiar…