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!
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
jchh
(my username is my initials (and my first name isn't John))
6
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?
jchh
(my username is my initials (and my first name isn't John))
8
Defo check your power supply per others comments.
Do you also have enough space on your SSD (I sometimes forget to delete old images)?
jchh
(my username is my initials (and my first name isn't John))
9
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
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?
jchh
(my username is my initials (and my first name isn't John))
14
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.
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