Hi,
There’s always lots of ESPhome device updates, I have a couple of the Athom sockets but lately whenever I try to update them from the settings section they don’t update and when I go to the ESPHome section and run an update wirelessly it mostly locks up my HA , running an a Pi3 Pi4, and I have to power off and on to get HA working again.
Pi3 is really a platform that is too low on resources to run HA.
The documentation have had a note about only using the Pi3 as a start base.
Running ESPHome is not equivalent with a start base. Compiling ESPHome code is a heavy process that even a Pi4 with 8Gb is challenged with.
It is time to upgrade you hardware or do the ESPHome compiling on another system and then just use HA to upload it. Ask on the forum on how to use another system for compiling if you want that solution.
On a side note it should also be mentioned that upgrading ESPHome devices with each released update is not the best way.
it is adviced to skim the changes and if nothing relates to the setup of a device, then skip the update.
With every write there is a chance that the memory chip will fail and then the board is ready for the garbage bin.
Thanks for the advice, I actually made a mistake in my post, the Pi3 was changed to a Pi4 a few months ago booting and running with a USB connected SSD.
This setup has regulary compiled the ESP updates in the past, it’s only just in the last few weeks I’ve been getting the issue.
How much RAM does the Pi4 have?
2Gb is still in the critical low end for some ESPHome projects and it is not the size of the YAML code that decide the size of the code behind.
Still, why burden the RPi with the work of compiling ESPHome? Admittedly, I resisted this for a long time, but once I set up ESPHome command-line on my laptop, I wished I’d done it sooner. There’s really no reason to get HA involved with an ESPHome update. They are separate functions.
Wally said it best, so I won’t repeat anything he said. But it can certainly apply to the RPi 4, too. HA’s resource demands seem to always be growing, and of course with every new integration, add-on or option, we add to that growth. I’m not surprised you maxed out trying to do ESPHome compiles.
What I used to do when I had HA running on rpi3 and wanting to update esphome is to stop a few of the add-on installed. Do my updates and start those addon back up again.
I’ve been thinking about this and is there a reason why the Pi4/HA should lock-up when compiling the ESPhome files, surely if the processor is slower then it should just take longer?
I took a look at the processor load during the update and it did indeed sit at 95%
After all the Pi4 can run Linux and play youtube videos etc. without too much trouble if a bit slow.
Normal processor usage: -
The CPU is usually not the issue.
The issue is RAM. Sometimes RAM can be supported with swap files, but they are extremely slow, and there still needs to enough actual RAM to handle the active tasks.
Swap files can only be used to move sections of RAM information to that is not needed in the current computing cycles.
I have got a Pi5 4GB set-up with Linux that i really don’t use much so i guess i could use that with an SSD as i want something really small and relatively low powered.