Marcvolta / node-red-energymeter

A Node-Red node to calculate energy based on power input
MIT License
0 stars 1 forks source link

Persistence between reboots. #1

Open dougle03 opened 1 month ago

dougle03 commented 1 month ago

Hi, I'm using your node and like it a lot. However, the values in node.oValues do not survive a reboot. As this is meant for tracking long-term energy data, we need persistence either using Node-RED's context storage or external storage like a file or database. Regular reboot is something that happens a lot given the upgrade cycle NR is no now). Can you look at making some changes that all your node to save values in the NR persistence context, or other location? Of course we'll then need a way to reset that to zero when needed...?

Thanks

Marcvolta commented 1 month ago

Hi, thanks for sharing your experience and feedback. Indeed, persisting data on reboot is not yet covered. I'll have a look at it in the next few days. Stay tuned! Marcvolta

dougle03 commented 3 days ago

Hiya, any news on this? I did submit a PR aided by ChatGPT on adding context storage, but I've not been able to test. Perhaps you could have a look? Thanks,