Esphome sleep for an hour, wakeup and upload history data from last hour

Hi All,

I’m building a weather station from scratch. Make 3D designs in Fusion360 and print them myself. I working on a idee to run this complete on battery using a solar panel.

To get this running all day i need to get the ESP32 to sleep (wifi) and collect data during the sleep. When waking up i want to send the data from the last sleeptime to home-assisstant.
I using a magnet and the hall sensor. If the wind blows fast there is a lot of data.

Question:
How can i save history data in ESPHOME and when connecting via Wifi to upload this ‘history’ data?

Who can please help me to the right direction?

Happy to hear from you!

grtx,

Marcel

Sorry but it’s impossible as ESPHome API and way HA is designed is to record datas in real time when they show up, so no way to store values to send them after unhappy :frowning:

During deep sleep a esp is not able to read any sensor data.

and a lots of energy to harvest too :wink:

There is a difference in sleep and deepsleep. I think esphome doesn’t support sleep. With sleep you can sleep radios (wifi and Bluetooth).
I think i will program the esp32 myself and send data with mqtt to home assistent.

Thanks for the answers on my question.

Grtx Marcel

Check this tutorial
https://www.google.com/amp/s/lastminuteengineers.com/esp32-sleep-modes-power-consumption/amp/

Their actually is a related pr: Allow WIFI to be disabled and enabled by ashmckenzie · Pull Request #1249 · esphome/esphome · GitHub