ESPHome Addon does not start

After trying to upgrade two ESP32 devices to 22.12.6 by wire in ESPHome Addon. My system started eating recources. CPU, memory and disk started rising. Luckily I had a full backup made just a couple of days earlier and backing to that one sorted that problem out. All was back to normal but I could not start the ESPHome addon. Trying to reach it from sidebar resulted in a message “Add-on is not running. Please start it first” and trying to start it from Addons resulted in nothing. After alot of trials, restarts etc I deinstalled it again and went in to SMB fileshare and deleted the entire folder esphome, that for some reason is not going away when deinstalling the addon. A couple of thousand files removed. Then I made a new full backup, restarted HA, and tried to install the addon again. It creates a folder esphome, a subfolder .esphome and a esphome.json in that. But the addon does not start.

If I then plug in one of my ESP32 devices, it shows up to add in HA, but i cannot start ESPHome addon and configure it.

If I then deinstall the addon and restarts HA, the two folders and the json are still there.

Does anyone have a clue how I can make ESPHome working again?

Do you have any logs?

In best case the esphome addon logs tell you/us why it will not start up. :page_with_curl:

On another note: Did you (“only”) restart HA or the whole server/machine HA is running on? Because some people report after restoring a HA backup only a “full” restart of the machine solved problems with getting add-ons back running :running_man:

I can produce logs. Are you thinking of general Home Assistant logs or ESPHome Addon logs? I can deinstall ESPHome Addon and give logs after a restart and reinstall if that is what you have in mind?

The install is on a RPi4 and I have restarted repetedly from GUI. I have not unplugged cable for a total powercycle, did you mean that?

Note that you only need the addon to program ESP’s.
For the integration to work, you only need a correctly flashed ESP; after that it will show as a new integration :wink:

That would be a start…

Because :point_down:

Aceindy, yes. As I wrote I started up one ESP32 just to check if it showed up, and it did. I cannot change its name or upgrade it though, for that I need the addon.

I noted you program them

I know it is bypassing the issue, but you could use the web-version of ESP-web
Just suggesting it, as compiling ESPHome is a quite heavy application for a rPI :wink:

orange-assistant, I will do the procedure of deinstalling addon, removing ESPHome files from Configshare, reboot HA, Install addon, try to start it and copy logs here. I can tell you know that the logs ends with something like “Starting ngiex…”

That’s typically the last line when the add-on started successfully :thinking:

Ok, after deinstall, reboot and reinstall the logs are empty.
After clicking Start, the following are the logs:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/00-banner.sh

Add-on: ESPHome
ESPHome add-on for intelligently managing all your ESP8266/ESP32 devices

Add-on version: 2022.12.6
You are running the latest version of this add-on.
System: Home Assistant OS 9.4 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2023.1.7
Home Assistant Supervisor: 2022.12.1

Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.

cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
cont-init: info: running /etc/cont-init.d/02-set-timezone.sh
[16:18:34] INFO: Configuring timezone
cont-init: info: /etc/cont-init.d/02-set-timezone.sh exited 0
cont-init: info: running /etc/cont-init.d/10-requirements.sh
cont-init: info: /etc/cont-init.d/10-requirements.sh exited 0
cont-init: info: running /etc/cont-init.d/20-nginx.sh
cont-init: info: /etc/cont-init.d/20-nginx.sh exited 0
cont-init: info: running /etc/cont-init.d/30-dirs.sh
cont-init: info: /etc/cont-init.d/30-dirs.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun esphome (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
s6-rc: info: service legacy-services successfully started
[16:18:35] INFO: Waiting for dashboard to come up…
[16:18:36] INFO: Starting ESPHome dashboard…
2023-01-25 16:18:37,216 INFO Starting dashboard web server on unix socket /var/run/esphome.sock and configuration dir /config/esphome…
[16:18:37] INFO: Starting NGINX…

If I now try to use the addon I get the following popup: “Add-on is not running. Please start it first”

That tells us from the esphome add on perspective is everything alright.

That’s very unfortunate. Do you have other add-ons? Do they all work normally?

Yes, they work. Here is the last logs from Supervisor. Looks interesting:
23-01-25 16:13:34 WARNING (MainThread) [supervisor.addons.options] Option ‘interface’ does not exist in the schema for Samba share (core_samba)
23-01-25 16:13:34 WARNING (MainThread) [supervisor.addons.options] Option ‘anonymous’ does not exist in the schema for Mosquitto broker (core_mosquitto)
23-01-25 16:17:41 INFO (MainThread) [supervisor.addons] Creating Home Assistant add-on data folder /data/addons/data/5c53de3b_esphome
23-01-25 16:17:41 INFO (SyncWorker_7) [supervisor.docker.interface] Downloading docker image ghcr.io/esphome/esphome-hassio with tag 2022.12.6.
23-01-25 16:18:13 INFO (MainThread) [supervisor.addons] Add-on ‘5c53de3b_esphome’ successfully installed
23-01-25 16:18:31 INFO (SyncWorker_5) [supervisor.docker.addon] Starting Docker add-on ghcr.io/esphome/esphome-hassio with version 2022.12.6
23-01-25 16:18:36 WARNING (MainThread) [supervisor.addons.options] Option ‘interface’ does not exist in the schema for Samba share (core_samba)
23-01-25 16:18:36 WARNING (MainThread) [supervisor.addons.options] Option ‘anonymous’ does not exist in the schema for Mosquitto broker (core_mosquitto)
23-01-25 16:18:36 INFO (MainThread) [supervisor.store.git] Update add-on GitHub - hassio-addons/repository: Home Assistant Community Add-ons repository
23-01-25 16:18:36 INFO (MainThread) [supervisor.store.git] Update add-on GitHub - home-assistant/addons: Docker add-ons for Home Assistant repository
23-01-25 16:18:36 INFO (MainThread) [supervisor.store.git] Update add-on GitHub - esphome/home-assistant-addon: ESPHome Home Assistant Add-on repository
23-01-25 16:18:36 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json
23-01-25 16:18:39 INFO (MainThread) [supervisor.store] Loading add-ons from store: 68 all - 0 new - 0 remove
23-01-25 16:18:39 INFO (MainThread) [supervisor.store] Loading add-ons from store: 68 all - 0 new - 0 remove
23-01-25 16:18:41 WARNING (MainThread) [supervisor.addons.options] Option ‘interface’ does not exist in the schema for Samba share (core_samba)
23-01-25 16:18:41 WARNING (MainThread) [supervisor.addons.options] Option ‘anonymous’ does not exist in the schema for Mosquitto broker (core_mosquitto)
23-01-25 16:21:54 INFO (MainThread) [supervisor.ingress] Update Ingress as panel for 5c53de3b_esphome
23-01-25 16:23:44 WARNING (MainThread) [supervisor.addons.options] Option ‘interface’ does not exist in the schema for Samba share (core_samba)
23-01-25 16:23:44 WARNING (MainThread) [supervisor.addons.options] Option ‘anonymous’ does not exist in the schema for Mosquitto broker (core_mosquitto)

I only spot two warnings but they are about other add-ons (samba+mosquitto).

Regarding the esphome (dashboard) add-on:

Everything just looks fine :man_shrugging:

As an intermediate work’a’round (to be at least able to work/configure your nodes) you can load esphome via pip or docker on your workstation or any other machine with this guide :point_down:

1 Like

Halt your machine. Unplug it. Start it again.

There came an update, I think it was called 22.12.7. Now:

Welcome to ESPHome

It looks like you don’t yet have any devices.

Yay!

Yeah no devices, that is why.

Thats on purpose. I wanted to configure them again, give them proper names etc.

Even if Ubuntu 22.10 refused to go pip way, I used apt instead, I think I managed to create a working command line solution. After that I came nowhere, I just wanted to connect to my device and give it a new name before adopting it to ESPHome Add-On in HA. I always find it confusing since it seems it builds two devises there that way. I did not understand how. All descriptions I could find was about flashing bare metal with ESPHome. But then I found the way to run the ESPHome Dashboard there and log in via localhost. That way I can adopt devices with its proper name directly in the HA Add-On (I think) and avoid multiple configs when adopted into HA.

easiest solution on command line would be just:

esphome run newname.yaml --device oldname.local

For HA you need to delete the esphome integration with the old node name before adding the same (hardware) device again with it’s new name. Otherwise you end up with a weird mixture of esphome integrations/devices in HA.