I would like to build a battery-operated weather station with ESP32. The idea is that the ESP32 reads the weather data and sends it to the web server every 10 minutes.
What is the most efficient way to do this? If I put ESP32 into deep sleep for, say, 9 minutes, it will need more power afterwards to re-establish the WiFi connection, and that could negate any power savings. After all, it takes at least a few seconds to re-establish the connection.
I only read the temperature, relative humidity and pressure. I have found that it takes less than 20 seconds to measure, connect to WiFi and send the data.
So now I connect to the WiFi, update the time with NTP server, take a measurement, post it to the weather server, disconnect from the WiFi, calculate the time until the next measurement and go into deep sleep and it works fine.