I am using Home-Assistant since a few years now and reading about ESPHome for some time also, but until recently, I was using exclusively Tasmota flashed devices.
Trying to move to ESPHome, currently testing everything with a couple of devices (and trying to learn in the process).
With Tasmota, I already had the surprise to upgrade to a new version and afterwards the device wasn’t working as expected anymore, so I had to revert to the firmware version that was on the device before the upgrade. This is quite simple, because all the firmware versions of Tasmota are on their OTA webpage.
Now with ESPHome, everything being compiled locally, I am not able to find the N-1 version of the firmware (after making the upgrade), in case things don’t work as expected. I am not sure, but I think the firmware.bin generated is overwritten by the new version. So the old firmware version is gone.
Is my understanding correct?
How do you manage this?
I personally save the factory image that worked so I can flash it using esptool via USB, if a future upgrade fritzes the device. It’s a menu option when installing the image.
ESPHome is not great as far as rolling back goes. There is an add-on repository with all recent versions, it lets you go back to a previous version for compile:
Its better to just specify which eaphome version to compile with in the config so you dont accidentally update the device and then have to redo it again. Putting the version in the config would not have that issue.
I run an ESPHome Core setup. It’s fairly easy to roll back. I just have to blow out the software virtual environment where I created the ESP Home installation and then recreate the venv, and then just run pip install ESP Home and ESP Web with the correct versions.
Not sure how easy or difficult it is to roll back with the ESPHome addon, which I never used.
Yes I am aware of that documentation, but I don’t see how it helps in this case.
How am I supposed to use that information to have the old firmware at hand in case the new one fails somehow?
Really? I don’t have this. How is your ESPHome installed? I am just using the docker container (so not an add-on in HA).
My installation of HA is through the container, so I can’t add any add-ons, as far as I know.
True, but then I will need to track everything and wouldn’t be notified of any updates, right?
Are you talking about the ESPHome tool (with the Web Interface) or the ESPHome firmware that is flashed on the device? Cause from the pip install it sounds like the first option. I am talking about the ESPHome firmware.
Yeah, you do. When you push the install button it offers the option to install it over Wi-Fi or a serial port or to download the image. Select download the image, download the image, save the image into a USB drive or something and you’re good.
Eureka! I would also recommend saving/archiving all of the bin files in that directory. In addition to nightly snapshots of all my software projects, when I create/install a firmware and it functions as expected, I copy the firmware files to yet another directory and add tags/notes/whatever. That way, if an esp device dies or gets updated with a corrupt firmware, I can easily find the previous working version and upload it without any special tools or software.