LogicMachine Forum
Where to save persistent values ? - Printable Version

+- LogicMachine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Where to save persistent values ? (/showthread.php?tid=6586)



Where to save persistent values ? - antlomb - 03.11.2026

Hello, sorry if this has already been answered, but I cannot find a solution.
I'm logging KNX telegrams in my InfluxDB, expanding the example script I found in the knowledge base.
I added a queue where I temporarily save telegrams if the InfluxDB is temporarily unavailable, so I will not miss any recording. 
When the InfluxDB comes back available again I flush the queue saving all the values in the database,
I want the script to be fail safe, I don't want to miss recordings if a power failure occurs to the logic-machine/wiser.
I thought of using storage.get and storage.put to make the queue persistent, but I read that the storage is written every 30 minutes, so, in case of a power failure, I will loose recording.
Have you got any suggestions to not miss any values ? 
Thanks a lot for your help
Antonio


RE: Where to save persistent values ? - Daniel - 03.11.2026

Every form of storing data on LM has the 30min backup rule. In normal operation all runs in RAM and is backed up to SD card every 30min. Saving more often or for every telegram as you expect would kill the card in few months instead of ~20 years which is the calculated life time of the card.