When I edit and then try to 'Install' an existing, and running, ESPHome device it crashes Home Assistant during the compile process. This is true no matter what install method I choose...because it crashes during compile, before it ever attempts to "install" the compiled output.
I have HA running on a dedicted RPi 5.
Prior to making an edit to the ESPHome device's YAML file today I had previously made, I would guess, about 4 other updates to that device over the past 3 months. This is the first one that has failed.
I haven't been able to see any hints in the logs.
It crashes HA at different points in the compile process.
Any ideas??
Is there a way to attach the YAML file in question to this thread? I do have the YAML file here: Dropbox
You don't use an SD card do you? Bad sectors are one possible cause, which could happen since it becomes pretty visible while ESPhome compiles writing/reading like hell.
Choose adequate hardware an I/O hungry software such as HA, NUC ... NVME drive and such like.
I doubt that ESPhome itself would be able to crash HA directly, since in the end all what talks to HA is the flashed devices, since so it must be something to do with defects on your mass storage. Memory is pretty unlikely, can't think of a busted PI because of that.
I know ESPHome compile can fail because of not enough free memory or bad build files or wrong yaml file, but never a compile making HA crash.
I also always compile on my Rpi with the HA builder app for years now (+20 devices), never had HA crash because of that.
what happens if you only compile with the the bare minimum:
esphome:
name: status-indicator-living-room
friendly_name: Status Indicator in Living Room
rp2040:
board: rpipicow
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "xxxxxxx"
ota:
- platform: esphome
password: "xxxxxx"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
You are likely running out of resources. You can limit the number of processes it uses when compiling.
compile_process_limit (Optional, int): The maximum number of simultaneous compile processes to run. Defaults to the number of cores of the CPU which is also the maximum you can set.
I use a more powerful PC for running esphome and with HA on a different one, so no conflict at all.
I have an automation that notifies me if the HA processor use goes above 20%. When I'm compiling an ESP update I always get that alert as the CPU usage hits 100% for several minutes. It's never crashed my HA, but with a compile spiking both CPU and memory usage (mine doubles during a compile) I can see where it might overheat the hardware and cause a crash.
I am just seeing these responses now because, for reasons I can't explain, I didn't get any notice in my email that there were responses; so I didn't think there were any.
I am still having the problem. I've tried the two devices which have always worked fine in the past. Keeps crashing my RPi. Hard to believe it's too many resources; tho of course that is possible. I am compiling during the day, with nothing active in terms of automations or such. The RPi is is just idling, and top shows 1% CPU usage before I launch the compile. During compile the CPU does go into the 90+%. Free memory holds at around 2000K. top isn't showing any strain on other resources that it sees. And I think I really am running a pretty light Home Assistant. I don't have many devices or integrations loaded.
I guess I'll have to figure out how to compile on my desktop.
Yet it seems to me that this shouldn't be happening. I have taken all the latest updates to HA core, HA OS, and ESPHome right up to today.
I have a heatsink and fan on my RPi, and the fan will come on when the RPi is booting up. But it never comes on during the compile process, which suggests to me that the the RPi is not overheating.
Others have felt the same as you that they shouldn't be having the problem and have also been surprised that reducing the number of compiles at the same time has solved it for them.
OK - I found where to get the Linux Appimage (which I generally prefer to use). Downloaded it, ran it. It worked perfectly! An appimage, a web-app - for me this is nice and clean and clearly the way to go.
Thank you neel-m; and to all who pitched in to help me.
So I think I could actually entirely remove the ESPHome Integration from my RPi Home Assistant server. If anyone thinks I shouldn't, please advise.
Ignore this earlier note > Ok ... but, what is it? What was "...the legacy in-tree dashboard...?" I clicked on the link and so far I've been navigating through a fair bit of github repos that are dense with detail; but I can't quite seem to get to a spot where I can grasp the big picture to even know how to try it. Is there a URL I just browse to? Do I need to install something? If so, do I install onto the RPi I have Home Assistant running on or install onto my Linux desktop?