My Home Assistant instance was running really stable for a few months, but since around a week it keeps hanging up.
First, some sensors stop reporting (like Netatmo) while others still work (like Shelly).
Next, I can‘t access the Logbook, Settings or Developer Tools. It just doesn‘t load.
Finally, I can‘t establish a new connection with HA from a different browser or device. But on existing connections I can still see the dashboard and navigate different tabs, even from outside via Tailscale.
As I can‘t access the Logs or the Settings at this point I just have to plug off the power cable and plug in again. After that, it works stable for around 12h until it breaks again. I have restored from a backup 3 times, but with no success. I have also suspected a dying SD card and replaced it with an SSD, but this didn‘t help either.
Has anyone experienced something similar or has a tip on how I can fix it?
My first PI’s I used to run off of spare USB power. Tried to run a DietPI+Pi-Hole off of the USB power of the router. Assumed it would be fine. Nope - spluttery in a non-obvious way. Randomly flaky.
Since then always made sure top quality power bricks to each PI. And same said about USB cable attaching SSDs. Check quality. Don’t forget the SSD will pull more power than the SD card did.
I‘m using the official Raspberry Pi power supply, and I never suspected the power. But after reading the thread you linked I realized that I added a new device to the same power strip as the Raspberry Pi just before my problems started. It‘s a Teltonika TRB500, which draws less than 6W according to the manufacturer. So I don‘t think the power strip is at its limits, but could this still be related?
Easy to test, just plug in to a different wall socket for a few days. Never heard of a power strip causing trouble - they tend to just go bang and release the magic smoke when they are upset. (I’m not an electrician)
I have everything in a fancy UPS which means I can monitor it.
Another obvious PI botherer to rule out is heat - leave the lid off \ point a fan into it \ check temps in HA.
Hang on - a “Teltonika TRB500” is a 5G gateway? Try moving THAT onto the other side of the room. Could just be blasting too many G’s into the PI at close range.
Sometimes it is too tempting to make a nice neat stack out of electronic boxes forgetting that they can interfere with each other. Maybe sticking them at the opposite ends of the desk will be enough to give them some space.
(My technical language is BS\exaggerated but a test separation is an easy way to rule out any interference issues)
A classic check is always “what did I change since this was last working okay?”
I was wondering how long it would take for someone to bad-mouth the RPi.
That would be fair, if it were a limitation of the Pi which caused the problem. Was it bad hardware? Not enough memory? Over-loading the CPU? If so, fine, get new hardware. I’m betting not.
What power supply do you suggest? I’m currently using the official 15W power supply.
The TRB500 was a direct replacement of a 4G router, so I didn’t really think about that. I have now moved it away and plugged it in to a different socket. I will report back if this solves the problem.
The memory usage is below 30% and the processor usage is below 10%, so I don’t think the Raspberry Pi is at its limit. But I will certainly keep an eye open for a good deal on Black Friday.
The official Pi USB power brick is fine for the RPi4 with one or two USB sticks, but SSD adapters and other more power hungry accessories might quickly cause issues.
It is recommended to use a powered USB hub then,if not to power the SSD adapter, then to atleast power everything else to optimize the power available to the SSD adapter.
I’m currently using a Kingston A400 and a Ugreen Hard Drive case, but my problems started before I replaced my SD card. The increased power demand might be an issue, but it certainly isn’t the only issue.
I have already installed the Raspberry Pi Power Supply Checker integration a few days ago, and the power status has always been “OK”.
A quick and easy test is to watch the red power led, if it flickers you have problems. But obviously you could be watching it for some time. Check it when the pi boots up, it is often using most power then.
I have now moved the Teltonika TRB500 5G-router further away (~8m) from my Raspberry Pi. But my HA constantly kept crashing around 8 hours after a reboot.
After that, I have replaced the TRB500 with my old 4G-router (Huawei E5885LS-93A) at the same location and my HA is now running perfectly stable for over 24 hours.
So I’m pretty sure now that the power supply isn’t my main problem, but the TRB500 is.
Does anyone have an explanation/solution for this?
Could the 5G antennas disturb the Raspberry Pi?
Or could some odd firewall rules cause a crash of Home Assistant?
The key is spotting something that is making a difference.
I’d now go slightly simple \ dumb. Is your Pi on Ethernet? Is WiFi fully disabled? Then put it in a metal box. Give it a faraday cage. See if you can isolate it from the 5G. Give it a tinfoil hat or just a lump of steal between it and the 5G box. (Just rig a shield up temp as a test)
This is still strange… but I am no radio engineer. I just work on what we observe.
I have had the same issue with an RPi 4B and have read many posts and tried many things to no avail. The closest I got was when I replaced the power supply, but in the end it took getting an HA yellow to finally have a stable system.
My old setup was an RPi 4B with fan and external USB SSD. I monitored CPU, memory, swap and temperature, but nothing. I did replace my first RPi certified power supply and it improved a little bit. My next step was to add external power to the USB SSD, but got to the point that it was too many cables and equipment for what I wanted and never tried it.
I got the HA yellow with no SSD and installed a backup of my old system. It has been stable ever since with not even one hangup. I just added an SSD and it is still rock solid.
The RPi did its job and got me using HA, but I recommend moving to different hardware if you are going to rely on HA. I like having a tiny footprint and the HA yellow is awesome if you are not doing video or heavy processing.
I have suffered from similar errors, including the raspberry pi crashing every few days.
I own an original raspberry pi power supply.
I have finally solved it, the cable of the power supply was coiled in the package from factory, since i needed just a few centimeters of cable, i left it coiled.
A few days ago i have un-coiled it.
Apparently this is what caused the issue.