Output only once when over threshold

Hi there,

I have a I think simple question but I am not getting it.

I want to build a ventilate alert, so I want that Node-Red send ONE (!) message if a value is over a given value.

So "Send me a message if value A is over 200 and keep quiet till it is under 200 and then over 200 again"

Can you help here?

Greets
Daniel

You can set a boolean depending if value is over 200 and then use a filter node to watch the boolean.
e.g.

[{"id":"aa2921550eee186d","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"199","payloadType":"num","x":190,"y":5160,"wires":[["380ccb22b9ddfecf"]]},{"id":"380ccb22b9ddfecf","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"set","p":"bool","pt":"msg","to":"$$.payload > 200","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":5180,"wires":[["a1f9cd0cef310b07"]]},{"id":"4e6f30f0823c9dda","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"201","payloadType":"num","x":210,"y":5220,"wires":[["380ccb22b9ddfecf"]]},{"id":"a1f9cd0cef310b07","type":"rbe","z":"d1395164b4eec73e","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"bool","topi":"topic","x":510,"y":5180,"wires":[["e36d14d660830f9d"]]},{"id":"e36d14d660830f9d","type":"debug","z":"d1395164b4eec73e","name":"debug 2476","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":650,"y":5240,"wires":[]}]

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