Home Assistant Stability on Pi

Are there any tips for improving the stability of HA?

I recently started my journey with docker, then a pi3, was very impressed so bought a brand new 8gb pi4 along with an SSD to boot from. I’m running hacs with solax, enphase and tp-link tapo and there’s not a single day goes by without an issue. Random sluggish UI, ghost notifications, services failing, adding cards sometimes wiping the whole dash and replacing it with the default one, and today, “Server got itself in trouble”. Which meant pulling the power, which corrupted the file system, leading to a rebuild from backup. Handily, I’m already well versed in rebuilding it, (would be nice if the backup restored the user password more than 50% so I don’t have to blind type in the password reset commands!)

Should I expect HA to stay up for more than 24 hours or is the above normal? Does it need a scheduled nightly reboot or something?

Funny you should ask; been running same setup for about two years and solid. Hard restart needed only once; however as of an hour ago it has become unresponsive. I think Frigate has tipped it over the edge!

I would start with power supply, then SSD and whether sufficient power is being supplied. Some need powered USB hub. There is a web site somewhere that supplies SSD that do and dont work with Pi USB power constraints

Been bitten many times by cheap power supplies on pi’s so it’s running the official USB C one, drive is a Kingston NV2 SSD, cheap and slow but more than enough performance for a pi. The unit wasn’t very stable on quality SD cards either to be honest. I’ll look in to the Kingston power demands though, good tip!

Just remembered that HA includes as Raspberry power supply entity which reports that the power suppler is just fine…

A lot of people have been wrapped up in this illusion RPi = x86-64 for HA. Reality is an x86-64 system will dance around any RPi any day. Do yourself a favour and sell your RPi and buy any $100+ x86-64 system to see the light of day.

If time allows, please read my suggestions regarding HA. On what grounds you might ask is my opinion worth anything? Well, I manage 100+ HA instances with no issues.

2 Likes
  • HA container (docker) on a RPi 4 running DietPi (a lightweight Debian image)
  • Other containers such as Mosquitto, Z2M, Piper, AdGuard Home, InfluxDB, Grafana, Portainer - admittedly nothing too resource hungry.
  • Kingston SSD
  • Sonoff USB stick
  • The official RPi power supply.

This has been rock solid for me for a couple of years now and easy to maintain. I’ll only upgrade to a more power-hungry solution if/when I decide to add something like Frigate.

Edit: I should add I am under no illusion that a RPi is the same as an x86-64 - I simply don’t need to suck/waste that much power for what I am doing.

I did in fact start with a docker image on a mac but my HA install was mostly about controlling solar & batteries in my quest to reduce power consumption. I liked the idea of using a pi because of it’s low power draw (I have another thats been running pi-hole for 3 years without a single failure)

Whilst the pi might not be ideal, HA is provided as an option direct from the official PI imager so I’d have hoped it to be more stable.

I’ve just lost a sensor on my install, restarted, only to find the the IP address has been scrubbed from the solax integration. Trying to type it back in gets me some kind of weird right to left text input that I’ve also been seeing when making changes to the dashboard.

Went to get a coffee, came back, everything working perfectly.

¯_(ツ)_/¯

Pi cpu at 5%, ram usage the same, power supply rock solid so not sure why this might be a hardware issue?

Defo check your power supply per others comments.
Do you also have enough space on your SSD (I sometimes forget to delete old images)?

This is definitely not normal. I have hardly every needed to reboot the Pi, and only have to restart HA after adding an integration or updating something.

edit: Just saw your comment re power is OK. Have you done anything with your network recently?

Power supply is the officlal pi4 usb c one, Kingston nvme is 256gb and got wiped clean this morning when I rebuilt everything. My pi-hole never fails and the 3rd pi running a VPN, dlna server and bittorrent sync is the same, absolutely rock solid.

I’m guessing it must be a rogue integration but I’m not running anything crazy, Solax is probably the only add-on doing any real work.

The logs don’t include anything obvious other than complaints that HA can’t find devices that I’ve unplugged and the following (might be from when I restarted it) :

Error handling request
14:06:09 – (ERROR) components/websocket_api/http.py - message first occurred at 14:06:09 and shows up 2 times
Could not fetch stats for core_configurator:
14:06:09 – (WARNING) Home Assistant Supervisor - message first occurred at 14:06:09 and shows up 2 times
Timeout on /addons/core_configurator/stats request
14:06:09 – (ERROR) Home Assistant Supervisor - message first occurred at 14:06:09 and shows up 2 times

@MarkyMarkUK Read the below comment I left as well as it’s thread. Might be helpful -

I don’t understand why you’re getting a Supervisor message when running HA Container (Docker) or did you swap over?

Hmmm, interesting, to be honest, I don’t know! I started with a docker container on a mac. That didn’t allow me to add the extras I needed so did a clean install on a pi using the offical pi imager then used a backup from the original docker test to pull in all my settings. Might this have also pulled in bad data/settings that might be causing issues?

No clue, but it’s a possible lead.

…what does* your docker compose look like?

*typo

Just off to google what that means and I’ll get back to you :laughing:

1 Like

So I’m running supervised, not docker, docker was the first attempt but aborted as the addons were a pain to sort.

1 Like

OK, I don’t use use Supervisor so my help ends here; definitely check out the links shared by @KruseLuds and @os.habitats.tech though. Good luck!

Edit: If you do choose to go back to Container (docker), I’ll be happy to help with your extra docker containers (add ons).

1 Like

If I can’t get to the bottom of all the crashing I might just do that, thanks :slight_smile:

Just for reference, I’ve been running HA on my RPi 3B+ since 2018. The only time it gets rebooted is when there’s an OS update. I haven’t seen the problems mentioned above.

I know some people will tell you it can’t be done, and you should spend a lot more on hardware. I have nothing against spending money on hardware, but in this case I have yet to find it necessary.

1 Like

It’s just fallen over again :see_no_evil:

Can’t access the backup page to do a restore and the hardware page says ’ Error while loading page hardware. ’

Brilliant.

I can access the log page which seems messy including something about SSL?

Home Assistant Core
Failed to to call /os/info -
17:30:09 – (ERROR) Home Assistant Supervisor - message first occurred at 16:41:47 and shows up 38 times
Client error on /os/info request Cannot connect to host 172.30.32.2:80 ssl:default [Connect call failed (‘172.30.32.2’, 80)]
17:30:09 – (ERROR) Home Assistant Supervisor - message first occurred at 16:41:47 and shows up 38 times
[Errno 5] I/O error: ‘/usr/local/lib/python3.11/site-packages/hass_frontend/frontend_latest/83900-wc9vC9zbzFM.js’
17:30:08 – (ERROR) components/http/static.py - message first occurred at 17:09:13 and shows up 14 times