# Output only once when over threshold

**URL:** <https://discourse.nodered.org/t/output-only-once-when-over-threshold/84988>\
**Category:** General\
**Created:** [28 January 2024 12:43 UTC](https://discourse.nodered.org/t/output-only-once-when-over-threshold/84988 "2024-01-28T12:43:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cairon](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@cairon](https://discourse.nodered.org/u/cairon)\
**Post date:** [28 January 2024 12:43 UTC](https://discourse.nodered.org/t/output-only-once-when-over-threshold/84988/1 "2024-01-28T12:43:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [28 January 2024 13:07 UTC](https://discourse.nodered.org/t/output-only-once-when-over-threshold/84988/2 "2024-01-28T13:07:37Z")

</div>

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

```auto
[{"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":[]}]

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [11 February 2024 13:08 UTC](https://discourse.nodered.org/t/output-only-once-when-over-threshold/84988/3 "2024-02-11T13:08:08Z")

</div>

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