I’ve successfully got one of my devices (an ESP32-C3 SuperMini) updating firmware using OTA HTTP request. It’s all working properly and I can see the firmware is updating properly based on the firmware hash the text sensor from the device reports.
The device mainly sleeps. It:
- Wakes every 15 minutes
- Explicitly waits for the API to connect
- Makes sure the one important sensor is updated
- Waits 2 seconds to hopefully make sure all data is sent
- Goes to sleep
I don’t know at what point the device is supposed to report the firmware version back. I combed the code and found a gRPC prototype that covers the payload for firmware version, build timestamp and if the device uses deep sleep. I just don’t know how often it is polled for.
Any assistance would be appreciated. It would be nice if there was some way to explicitly wait on all API traffic to be completed before going back to sleep.
EDIT: I’m relatively confident that the firmware has not rolled back because the sensor is reporting in every 15 minutes. I’d expect the device to be in safe mode and have no functional sensors if the firmware rolled back.