Trigger an action when payload equals a 0

Hello,
I would need a Node Red flow able to monitor a MQTT payload and to perform an action (for instance send a mail) just once when the payload is detected equal to 0.

I have tried with the switch node but it keeps on triggering the action even if I have set "stopping after the first match".

How can I achieve this?
Thanks,
Dan

A switch node is the one to use. Show us what value goes into the switch (attach a debug node) and how you have setup the switch node.

When you say you want it to happen just once do you mean once in the rest of the future of the universe, or once and then don't send again until it leaves zero and then goes back again?
If the latter then before the switch feed it through an RBE node, so it will only pass on a value when the value changes. Then when it goes to zero your switch node will detect it, but then following zeros will not get passed until a non-zero one appears.

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