hello,
I'm pretty new to Node-Red.
I'm using a revolution pi and a janitza umg 605 to read energy consumption data of a coffeemaker.
The revelution pi is not running permanently but is shut down, when the coffeemaker is not in use. This could be several times a day.
I need to find a way to get the total energy consumption data between 00:00:00 and 23:59:59 regardless of shutdowns and store it to a folder with the name of the respective date so i can read out the total energyconsumption of single previous days and compare it.
I get a value of the energy consumption every second and i know how to store context data to my file system. I already created a flow variable witch is stored to my file system every 30 seconds overwriting the previous value.
So what i need is:
- a way to get the current value right before the pi is shut down and store it to another file
- a function, that knows wich date it is and adds all stored "right before shotdown"-values for one day and store it to a file with the name of the date
I hope my question is kind of understandable.
Thank you for ideas.
Daniel