Best way to clean/reuse an existing ESP32 device

I do a lot of tinkering, so I have a bunch of ESP32 devices that I implement into HA and then get unplugged and put in a drawer.

I seem to struggle re-using these devices for a new purpose. I’m fussy with naming conventions, so I want to rename the devices according to their new purpose and make them appear as something brand new.

There’s often traces of the old device left over as entities or by name.

I currently have a device that I have reprogrammed with the latest ESPHome, it appears in the ESPHome dashboard for adoption, so I do that and then get the following message:

INFO Resolving IP address of esphome-web-38aaa4.local
ERROR Error resolving IP address of esphome-web-38aaa4.local. Is it connected to WiFi?

I find the workflow to integrate a new device disruptive, confusing and I end up with a device with a name I don’t want or becomes unavailable in either the ESPHome dashboard or unavailable in my list of devices.

I’m hoping someone can give a list of steps to follow to clean up the existence of an existing device and reprogram it.

I am using docker for HA and ESP32Home. I can access all of my configuration files if I need to delete some yaml.

I simply delete the old device both from the ESPHome add-on and integration (so there’s no trace of anything to do with the old device). Then start fresh and flash serially just like it’s brand-new. I always found other ways I’d end up with some random remnant of the ‘old’ device

2 Likes

Thanks Ben, I’ll give that a try.
I’ve found that it’s necessary to restart HA and/or ESPHome as well, but that seems overkill.

I have lots of them too and i found that its a lot easier to just keep using the same board to tinker/test with. All entity id’s and names i will use “test” in them. Doing it like that makes it easy to keep things organized and any entity with “test” in the name i know they can be safely deleted and dont belong to some seasonal device or something like that.