bellrichm / WeeWX-MQTTSubscribe

A WeeWX service and driver that receives data from MQTT.
GNU General Public License v3.0
52 stars 13 forks source link

Question: How to get MQTT data to cache/persist/stay in place/stick around/not reset until it changes #212

Closed kevinkey619 closed 5 months ago

kevinkey619 commented 5 months ago

Is it possible to get the MQTT data to remain in memory/cache until it changes? I'm using this extension to read a barometer that's separate from my Acu-Rite 7-in-1 weather station. It seems that the pressure reading only remains in memory for a second or two and then disappears. I'm using an ESP32 board to feed the pressure data via MQTT. I've tried setting the code (on the ESP32) to output the data every half second, but then the board crashes.

bellrichm commented 5 months ago

I'm sorry, but there is no way to do this. If a downstream service needs to cache the values, it needs to provide that functionality.