Storage of data?

Hi

I’m planning to build an outside weather station based on ESP that will communicate through Wifi with my HA system in house. My weather station is fully autonomous and working on battery and solar panel !
Nevertheless, as I live in backcountry and electricity is supplied through aerial lines, we have to shutdown electricity from time to time during lightstorm to avoid to kill all electronic devices in house (unless we have UPSs I’m not willing to test them in real conditions :wink:
My weather station is setup to wake up every half hour to get values from sensors and send them at HA through Wifi. Nevertheless, I’d like that when Wifi is not avalaible (indicating power is down in home), that it stores values locally and then send them at next connection if wifi is back, or continue to store till it comes back.
Two questions:

  • Will HA would accept to receive values later but with correct timestamps ? so values history is well kept !
  • How to setup esphome to store these values ? I know that I can store them in flash of the ESP but if I understand well how ESP is working it would kill pretty quickly the flash memory of ESP. Is there a way to store them in a SD card for example that I would attach at ESP ? I didn’t find any “storage” component in esphome like in ESPEasy ! Is it not implemented ?

Thanks for help and ideas :wink:

Vincèn

Will HA would accept to receive values later but with correct timestamps ? so values history is well kept !

No, HA only accepts real-time data - there is no timestamp property that integrations can set to indicate the time at which a state was set (no historical data).

How to setup esphome to store these values ?

globals with restoring enabled.

I know that I can store them in flash of the ESP but if I understand well how ESP is working it would kill pretty quickly the flash memory of ESP.

No, only if you write once every few seconds (even then it will be about a year).

2 Likes

oki so unhappy no way to “store” values in weather station to send later at HA :frowning:

Thanks, good to know :+1:

Maybe you can try to send data via mqtt and not use Esphome native API.

Is this still the case?

yep no change on that !