# CO2 notification spam when over 1500 ppm

**URL:** <https://discourse.nodered.org/t/co2-notification-spam-when-over-1500-ppm/66101>\
**Category:** General\
**Tags:** home-assistant\
**Created:** [6 August 2022 09:10 UTC](https://discourse.nodered.org/t/co2-notification-spam-when-over-1500-ppm/66101 "2022-08-06T09:10:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RogerSik](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogersik/32/59713_2.png) [@RogerSik](https://discourse.nodered.org/u/RogerSik)\
**Post date:** [6 August 2022 09:10 UTC](https://discourse.nodered.org/t/co2-notification-spam-when-over-1500-ppm/66101/1 "2022-08-06T09:10:31Z")

</div>

Currenlty i have following setup with node-red + home-assistant

If CO2 Sensor is over 1500 ppm, then send me notification to smartphone.

![06_11-06-04-Node-RED _ node-red.sikorski.cloud und 2 weitere Seiten - Persönlich – Microsoft](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/3/f345e8bedd26e3f0e31fb1f02b4401000ad3f5fc.png)

It works. But example my CO2 ppm is up to 1800. It takes sometime to get down under 1500 ppm and i wil be spammed in 5 to 10 minutes for example

- 1800 ppm (first notfiy)
- 1750 ppm
- 1700 ppm
- 1600 ppm
- etc

Is there a way to mute the notification for x minutes or only send new notifcations when going up or maybe there is a better idea?

---

<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:** [6 August 2022 09:33 UTC](https://discourse.nodered.org/t/co2-notification-spam-when-over-1500-ppm/66101/2 "2022-08-06T09:33:20Z")

</div>

Hi and welcome.  
I would set a boolean property in the msg, then use that to filter messages with the filter/rbe node.  
so when over 1500 msg.pass would be true, then filter node will allow msg to pass once until msg.pass became false.  
e.g.

```auto
[{"id":"1d88c4fe.66b62b","type":"inject","z":"b779de97.b1b46","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1000","payloadType":"num","x":220,"y":4020,"wires":[["779122e.80aca5c"]]},{"id":"779122e.80aca5c","type":"change","z":"b779de97.b1b46","name":"","rules":[{"t":"set","p":"pass","pt":"msg","to":"$$.payload > 1500","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":4020,"wires":[["76a0a2c8.3a55fc"]]},{"id":"96b6e747.44ec1","type":"inject","z":"b779de97.b1b46","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"2000","payloadType":"num","x":230,"y":4060,"wires":[["779122e.80aca5c"]]},{"id":"76a0a2c8.3a55fc","type":"rbe","z":"b779de97.b1b46","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"pass","x":590,"y":4020,"wires":[["d147b3bb.224868"]]},{"id":"d147b3bb.224868","type":"debug","z":"b779de97.b1b46","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":730,"y":4000,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [6 August 2022 12:47 UTC](https://discourse.nodered.org/t/co2-notification-spam-when-over-1500-ppm/66101/4 "2022-08-06T12:47:31Z")

</div>

Those seem very high co2 levels - certainly not especially healthy ones.

---

<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:** [5 October 2022 12:47 UTC](https://discourse.nodered.org/t/co2-notification-spam-when-over-1500-ppm/66101/5 "2022-10-05T12:47:36Z")

</div>

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