Server is often unavailable

Hey,
I need your help. I didn’t find anything about my problem over the net.
Recently my home assistant sever (pi 4) is not available. I can’t access it, neither via app nor via browser. After disconnecting from power supply and reconnecting it, everything works fine for a while. And every interval is a different in time.

What could it be?

There are a few threads on this forum. Search for “raspberry pi troubleshooting”

Here is one result:

You basically saith help my install is broken with zero details.

We need:
Full configuration Rpi, ok what version how much ram what are you using for storage?

How is ha installed? HAOS, core, container, supervised?

Have you looked at the logs and seen of anything is weird before the crash? No your logs are not wiped on restart contrary to popular opinion…

The two (by far) most common causes of random crash and hang on a pi are failing SD card (if you’re running ha on an SD card go ahead and make sure you have good backup now, you’ll probably need it) and underperforming power supply. Make sure the wall wart is actually delivering good power (or just replace with known good) and ensure any peripherals you hang off the box are on thier own powered usb hub)

Sorry,
Im running HA on a sd card 64 gb. Just the standard installation. Pi 4 with 4gb of ram. Power supply is the original from raspberry manufacturer. And ive got a cooling housing. Connected by wire to the router.
In the log there are all actions, but nothing that could have to do with the troubleshoot.

I have connected a micro controller to the usb of the pi for power supply. Micro controller is for mqtt to 433mhz plugs.
But the error is not since that time but sometime.

If you have no other indicators and you haven’t changed anything then make sure you have an off device backup that works and get ready to replace that SD card.

(SD cards weren’t meant to run always writing databases, guess what the HA recorder is…)

Sds running HA it’s not a matter on if they fail but when… Yes even the extended wear cards. Maybe the wearout is within your tolerance for replacement of SD cards. Personally I always recommend SSDs for HA on a pi. But that also comes with it’s own troubles as it burdens the power supply more. (pi are already borderline over running the power available on a standard usb bus it doesn’t take much to push the over the line… Add a fan and a microcontroller sucking power off USB…

You sound susceptible to both possible problems at this point. I’d definitely get a good backup off that SD card and look at the hardware log for undervolt

Ok, thank you. First i try a separate power supply for the micro controller. If this wont fix this issue, i try a new sd. I do backups automatically on a cloud, that wouldn’t be a problem.
In the log i didn’t find anything related to undervolt.

I haven’t touched a PI in several years now. But, my experience was that you would never see an ‘undervolt’ message. It just caused issues.

You only see it on the console if you happen to have it hooked up to a monitor or in the hardware log. But tbh a new power supply is the first thing I try.

1 Like

In my opinion the original power supply is enough, isn’t it? Or could it “wear”?

The power supply can wear out, all electronics can, but often it is other factors that push it over the limit, like a worn out gan that requires more power to be spun and it maybe also filled with dust, so it is less effective, which require it to run more and faster to achieve same cooling as before.
It can also be that the load on the RPi have changed, like the backup have grown in size making the compression of the backup last longer and thereby push the limit over a longer period than before, which again can also affect the cooling needs.

I just migrated my HA from a RPi 3B+ to a notebook laptop with SSD storage instead of an SD card. Issues like this is actually what prompted the migration. Lost control of lights one too many times for my GF. In my opinion after using an RPi and migrating to a notebook, the RPi is just kinda… crappy.

If you installed HA via the Raspberry Pi imager (or another method using the RPi specific image), you should have the Raspberry Pi Power Monitor (or something similarly named) integration installed by default. This will write to your logs and the console window (connect RPi to monitor) if an undervoltage is detected. I got this a lot with my Zigbee dongle plugged in and probably didn’t help the stability issues.

My recommendation if you can manage it is to get off the RPi ASAP, or at least move to a new SD card. To give you an idea of notebook performance, the one I’m using has 4GB of RAM and only two very modest CPU cores with something like 32 or 64GB of storage. Even this is far more than my 3B+ could offer and it still only uses 25W at absolute maximum. HA boots in seconds now instead of 3 minutes.

Ok thank you all for your replies. Today i changed the power supply for the micro controller.
Btw, i dont use a fan to cool the rpi but a passive housing. Bit there is also a zigbee dongle on the gpios not the usb.
I will see if the change makes the difference or not. If not, i ordered new sd cards, so i move ha to a new one.

1 Like

Hey,

now i didn’t have an issue for a few days. Im sure it was the power at the usb for the micro controller. Now it runs stable. Thank you

1 Like

Hi all,

Had similar issue. Replaced the power supply and now all is well again.

Thanks

1 Like