I am researching a potential project where I can turn on my fireplace remotely. The fireplace works with a low voltage switch (not a typical light switch) and doesn’t have enough power to power an ESP board. So, ESP board needs to be powered with battery ias I don’t want to run any wires.
Problem: If Wi-Fi is on constantly, it drains batteries rather fast.
Ideally I would like wifi to turn on when tempeture falls below certain level autonmously. Is it possible?
The deep sleep route is likely your best choice for battery management. I tried a project once just turing off the wifi, and it barely made a blip in terms of power consumption.
The trick with the deep sleep component is how to wake everything up. You can set it to wake up every few minutes, check the temp, and go back to sleep, but if you have it up every minute, you won’t save much of the battery, and if you have it up only every hour it’ll take a very long time for the fireplace to get adjusted.
There is a way to have a GPIO pin wake the device, but how or whether you can do that depends on the temperature sensor you are using.
To check the temperature and go back to sleep without establishing wifi connection should only take some milliseconds. Even if you do it every few minutes, it’s not draining your battery. But if you make wifi connection, it takes several seconds.