ESPhome ghost devices

I had three devices (2 sonoff basics and a sonoff plug) working with the ESPhome addon. A while ago my Pi crashed so I flashed a new card and restored from a backup. From then on (until today) the devices worked but didn’t appear in the ESPhome addon and I had no way of working on them. Today after an update of ESPhome the devices have completely dissapeared. I can see some are attached to the router at their appropriate IPs but they don’t repsond to pings.

Any ideas of how I can recover them/restore them/admin them?


First I would check if the ota logging works (can be from the hassio or addon or a local pip install). Maybe you also had the web_server component in your yaml so you can check if the web interface is reachable.

If can reach the devices with at least one of the methods described I would delete the old (non working) integrations for this devices in home assistant. Next step would see if the devices get auto discovered again by ha - if not just try the hostname and add a .local to it and add it manually.

Thanks for the tips.

The missing entities are back and working, all three listed under the ESPhome intergration and they show up in the general HASSIO log when I do something with them.

I must not have put the webserver on when I created them as they won’t provide a login when I try either their name.local or their ip.local

The ESPhome addon is still blank so I’m assuming doesn’t discover nodes unless they’re built by it.

I have their 3 .bin files saved that I would have flashed them with, just not their .yaml from the old installation, and the ESPhome folder is empty when I look using SSH.

The addon only discover devices you have the yaml for/the one you created.

If you loose you yaml files your nodes will still work and connect to home assistant but you if you want to edit them you need to write your yaml from scratch again. If you don’t know the ota passwords anymore you are also force to do another serial flashing.

The binaries are not important to keep but the yamls are! :bulb:

I think somewhere I have a backup of that original broken SD. So in theory I could restore that and the yamls should be there. Then copy those and pop them in the ‘real’ ESPhome folder and it might see them?

Exactly. You can also create just a dummy (only basics) yaml with your device names (can use the wizard for it). If you know your ota/api password you can then do remote logging. But take care of not uploading the dummy yaml’s because your devices will be dumb after that :wink:

Best just get your old/correct yamls and paste them into the esphome folder from home assistant :+1:


I opened up an old backup using 7-Zip and after a few minutes digging around I managed to find the old ESPhome folder, which contained the original .yaml files. I popped them into the current ESPhome folder and the add-on now sees them as nodes.

There were other things in the old ESPhome folder, folders for each of the entities and such, and there were other ESPhome files that were in .storage. I’m wondering if they’re needed for something? I’ve kept them just in case.

Next up is to see why I couldn’t access the nodes on their own. I had OTA and API on the .yaml but not web_server. Also there’s a few updates to do as they haven’t been touched since I created them in 2019!

Thanks again for the help.