Delay and intermediate messages

#1

Hello,

This will be a simple one for most of you i think...

I have a temperature payload that i send through a switch node to detect when it goes higher than a certain value.
When it does go higher i want to trigger an output, but it should be triggered for more than x mins time.
Same applies for when i gets disabled, it should be off for min x time.

I now have a delay node behind each output of the switch node, but i think intermediate messages will just get delayed also?
My goal is to prevent too many on/of cycles of the output because of rapid changes on the input, how can i achive this in node-red?

Thank you all in advance!

0 Likes

#2

It can be done a number of ways using the built in nodes, but my "aha moment" for working with that kind of logic came while working with the mytimeout node.

0 Likes

#3

you are using the right word... look at the trigger node

0 Likes