glogus wrote: I don't know if it's relevant, but today I noticed that while the camera is on standby it is constantly streaming images.
.
This is very significant. It means that the camera in the ESP is working correctly, and the problem lies with the server that receives the data from the ESP. Probably the ESP also restarts correctly, but for some reason the server stops receiving data after such a restart.
You can't use as much this long delay() in loop() because of Blynk.run() , which also executes in loop(), that is in the same thread. Also in the takePhoto() function are unnecessary delay() - this function is also called from loop() and delays the execution of Blynk.run().
.
Added after 2 [hours] 3 [minutes]: .
I modified the program you posted in post #21 so that Blynk.run() is called every 10 ms, regardless of what happens in loop() - so you can leave all those delay() out. This 10 ms interval can be changed in the runBlynk() function, which is an additional function in the code, to a larger one so as not to overload the ESP. Test in your network environment.
I disabled autorestart (I commented out the line with the configAutoRestart() function call. I don't think it is needed.
.
In general, the Blynk library is not written for a multi-threaded environment, so I'm not entirely sure what the side effects will be