thingsboard / esp32-ota

ESP32 OTA based on ThingsBoard Open-source IoT Platform
https://thingsboard.io/docs/samples/esp32/ota/
54 stars 45 forks source link

Rollback to previous version if OTA update is successful but code is wrong #7

Open jortega11 opened 1 year ago

jortega11 commented 1 year ago

Hi, I have a question to see if it would be possible to go back to a previous version in the case that after an OTA update the code has some problems.

While testing some scenarios, I came across a possible failure of our system: Imagine that I compile my code and upload it using OTA and the update is successful, but something in the code is wrong and the controller is not able to connect to WiFi, can not find the token that the device uses or some kind of problem that prevents the ESP32 from connecting to the Internet or Thingsboard.

How could I make to detect one of this problems and go back to previous working versions if possible?

Thank you in advance, Juan.