Ota + ESP with batteries

Hi I have some small sensors with esp that I’d want to add OTA stuff

My problem is that these sensors stay awake for 1-2 seconds. They read value and go to deep sleep again

How I manage OTA in this case? They are not online for the most of the time…

any ideas?

Add a button to your blynk project in switch mode,

check its state to see if ESP should wait for OTA or not

Maybe something like this
Check button status with syncVirtual

Not pushed

  • Normal operation


  • Prevent sleep
  • Notify user that ESP is ready for OTA
  • Wait for OTA
  • Optional Timeout to prevent battery drain. 60seconds before resuming normal operation?