I would like a switching node 2 way, stop messages

Hi I am new to node Red and I am having some problems, at the mo probably more of a annoyance,
I have a Flow starting with a USB serial from a Audrino, to a split node to a sort node and then to a change node.
Basicly this is to feed a dashboard with temperature readings. this is also spurred off to another switch mode and then a trigger node that sends messages to my phone and desk top through a Telegram node.
the above all works well. it is further spurred off to another switch mode and another two trigger nodes again sending messages through telegram, those messages also are routed through 2 rpi-gpio-out -nodes, controlling a relay board to activate a linear actuator, to open a vent if the temperature is too hot and close it if its too cold.
This also works as intended, But the problem is the hot signal/message or the cold signal/message keeps coming even after it has actuated the actuator.

what I need is for the message to send open and then stop until a closed signal comes through and visa versa send one closed signal and not any more until a open signal has been received.
I was thinking of a two way switch or gate that drops further messages from one input until the gate is thrown.

Any ideas will be gratefully received.

Regards D

Hi and welcome.
Take a look at the filter node. One of its options is to only pass on message change
[edt]
p.s. The switch node also has an option previous value for comparisons.

Hi E1cid,
Thank you for your message that looks very promising I will give it a try.

Regards D

Hi E1cid,
Thank you again for the suggestion, it took a bit of fiddling, with the values, but I have a workable solution now.

Kind Regards Duncan

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.