This device doesn’t seem to like a newer FW and after ?some time? it goes back to a previous version. (happened multiple times)
When I flash it, everything goes fine, it functions and somehow this happens… ![]()
I don’t think esphome device can revert successfully uploaded and booted code back to previous. Maybe with some custom code.
Do you have multiple Esphome installations?
Hi Karosm!
No, just 1 installation running in an LXC.
At first I thought I didn’t update that device and it took me 3 times to realize that I did update but somehow the FW rolled back.
Ota update?
Do the update more than one time, so the shadow partition the fimware is uploaded to before swapping over to the new one is overwritten and cannot be reverted to the old one.
You are right: OTA
Will try that.
Technically IDF supports that, but afaik esphome doesn’t have rollback functionality. Bug?
The new code when updating is stored somewhete during update, and a flag is flipped when the upload is complete so that on next restart the new code runs instead. You do not want to be overwriting good code and part-way through intterrupt the pocess leaving a broken system. If it runs out of space or the algorithm is faulty, corruption is often the result.
Checking the log results and return codes should be mandatory.
So did as instructed: installed 2 times (1 update, 1 installation) and I can see from the status that the timestamp of the FW is the one from the latest upload.
Will come back to report the result.
Thanks guys!
![]()