Store a value in a function

#1

Is there a way to store a value in a function node for future use? I want to do the following: A message contains a certain variable with a certain value. This message is received every 5 minutes. I want to compare the value of the variable with the value from the previous message and act upon the difference. Is that possible with a function node or should I use some other node?

Regards

Sjoerd van Staveren

0 Likes

Help with multiple inputs to a function node!
Node-Red compare new and previous values
#2

Directly from docs: https://nodered.org/docs/writing-functions#storing-data

0 Likes

#3

You can also store and retrieve the values using a change node

0 Likes

#4

Oh dear, I should be ashamed of myself. Thank you for the quick response.

0 Likes