OTA Flash question

OTA Flash question. I have a working device currently running ESPHome. I want to repurpose the device which means flashing a new ESPHome binary. No problem if I keep the same name, but I want to change the name.

Has anyone worked out a procedure to do this OTA? If I have to do it with ESPHome Flasher, then I have to take the device apart and I wish to avoid that.

Could I flash it OTA with the new YAML but with the old name, then rename it in the YAML file and flash it again?

I’m not sure, but you should be able to rename the node while flashing with a different firmware. With OTA.

The only thing I know, where you have to be careful, is with changing a static IP in the ESP configuration file. There is a specific way described for that (see here ).

What do you expect to happen? The node is just renamed inside ESPHome (the file name doesn’t change btw) and than in HA.

I’d start with deleting the node in HA (!!), than renaming the node and configuring the new firmware in ESPHome and than run an OTA update. I can’t see any obstacles coming up. :slight_smile:

I’m not entirely sure, but I think I’ve done that. I’ve gone further by copying the content of the config file, deleted the node in ESPHome and configured a new file (with the than correct name) and copied the content back. :slight_smile:

Thanks. I decided to just open the device and manually flash it. I will experiment with this process later and if it works, I’ll publish.
Also, I almost never use static IP addresses. Too many balls in the air. The only static IPs are my servers. Anything else that shouldn’t change are set to permanent lease in the router.

1 Like

I think this will work:

  1. Add the web interface option to the existing device yaml, install the updated config.
  2. Create a completely new device in ESPhome with new config
  3. Compile (install, manual download) the new yaml
  4. Navigate to the web interface of the old device and upload the .bin using the OTA option there
  5. Delete the old device.

That works. Fast and simple.

1 Like