Personally, I don’t like using timers with deep sleep, it’s quite inefficient.
When the code runs in a wake/sleep cycle, there’s no point in using a timer to call a function once. Timers are best used to call the same code on a regular basis, but with deep sleep you just need to call you code once.
In @GG07’s example code, the deep sleep call was at the end of the void setup, so unless you’ve moved this then the ArduinoOTA.handle() command will never be reached.
I also don’t like Blynk.begin with deep sleep, because it’s a blocking function and if a connection to either Wi-Fi or the Blynk server can’t be established the code will never progress to the deep sleep command so the device will be constantly awake and drain the battery.
I did quite a bit of work with @christophebl on getting a consistent deep sleep setup with Blynk for this project:
The code was originally written for NodeMCU, but this example cas been switched over to an ESP32.
The code doesn’t include OTA, but it would be simple to add a flag triggered via a virtual pin and if that was set the the Deep_Sleep_Now()
function wouldn’t be called.
Pete.