# Trigger notification on hitting certain temperature values

**URL:** https://discourse.nodered.org/t/trigger-notification-on-hitting-certain-temperature-values/11496
**Category:** General
**Created:** [24 May 2019 09:24 UTC](https://discourse.nodered.org/t/trigger-notification-on-hitting-certain-temperature-values/11496 "2019-05-24T09:24:32Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![877](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/877/32/8207_2.png) [@877](https://discourse.nodered.org/u/877)
#### Post date: [24 May 2019 09:24 UTC](https://discourse.nodered.org/t/trigger-notification-on-hitting-certain-temperature-values/11496/1 "2019-05-24T09:24:33Z")

</div>

I have a BME280 reading temperature/humidity/pressure and sending the values to my MQTT broker.

As it's monitoring a room where our pets are, and the weather is heating up, I would like a notification on my phone of when the temp hits a certain value. So we do not leave the pets in too hot a room.

I have it working as per below, but it of course notifies every 10 seconds - (when a new MQTT value is sent which is over the threshold).

 ![09](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/1/16e501fd8639e62460c520181614b7577cc197be.png)  
 ![Phone%20screenshot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/664155a5b6c3848947f7e4efc33cc41ab8ecf859.jpeg)

I would like it so that:

Warning notification sent at 25 degrees - only once  
Warning notification sent at 30 degrees - only once

Some kind of buffer would be ideal i.e. as the temperature drops to 24.9 and swings back to 25.0 it does not constantly ping a notification.

Any hints appreciated!

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [24 May 2019 09:29 UTC](https://discourse.nodered.org/t/trigger-notification-on-hitting-certain-temperature-values/11496/2 "2019-05-24T09:29:35Z")

</div>

look at the RBE node - it has several modes that may help.

---

<div class="post-metadata">

### Author: ![877](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/877/32/8207_2.png) [@877](https://discourse.nodered.org/u/877)
#### Post date: [24 May 2019 09:34 UTC](https://discourse.nodered.org/t/trigger-notification-on-hitting-certain-temperature-values/11496/3 "2019-05-24T09:34:58Z")

</div>

Hi @dceejay

Thank you, I did look at the RBE node, maybe I need to examine it more closely.

I looked at the deadband mode. I guess I could use a switch to allow the payload through at e.g. 25 degrees, going to RBE node set to **deadband\>block unless change is greater than \> 5** , then it 'should' notify me at 25 degrees and then again at 30 degrees.

But if the value is over 30 degrees won't it keep sending notifications every 10 seconds?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [24 May 2019 09:45 UTC](https://discourse.nodered.org/t/trigger-notification-on-hitting-certain-temperature-values/11496/4 "2019-05-24T09:45:14Z")

</div>

not unless it changes by more than 5 degrees while over 30.  
or vanilla rbe mode will remove duplicates if steady.

---

<div class="post-metadata">

### Author: ![877](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/877/32/8207_2.png) [@877](https://discourse.nodered.org/u/877)
#### Post date: [24 May 2019 09:48 UTC](https://discourse.nodered.org/t/trigger-notification-on-hitting-certain-temperature-values/11496/5 "2019-05-24T09:48:43Z")

</div>

Thanks, I will have another look at it 👍

---

<div class="post-metadata">

### Author: ![877](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/877/32/8207_2.png) [@877](https://discourse.nodered.org/u/877)
#### Post date: [24 May 2019 17:18 UTC](https://discourse.nodered.org/t/trigger-notification-on-hitting-certain-temperature-values/11496/6 "2019-05-24T17:18:06Z")

</div>

Found a good video which explains the nodes in more details for newbies like me 😄  
The example flow is very similar in principal to my requirements.

---

<div class="post-metadata">

### Author: ![Jonathan95](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jonathan95/32/16370_2.png) [@Jonathan95](https://discourse.nodered.org/u/Jonathan95)
#### Post date: [1 September 2020 08:37 UTC](https://discourse.nodered.org/t/trigger-notification-on-hitting-certain-temperature-values/11496/7 "2020-09-01T08:37:48Z")

</div>

Hey I am not sure if you are still here....

But could you share your node red flow?  
I am trying to do something similar and send 2 different emails via  
triggers using switch. I mainly want to be able to change the message  
after the temperature to reflect where it came from and state.  
eg if over this first temperature-sends email or alert that stating temperature  
with message saying please check deep freeze. then if temperature worsens  
I want to send an additional email or alert with the temperature per degree C  
stating that need to call the refrigeration tech.

We have been having trouble with our deepfreez and had spoiled a bunch of our food cause of this.  
Really cant afford to have it happen again but we also arent able to buy a new deepfreezer .  
So this was just the best I could come up with.

Please if anyone else could help I would gladly appreciate it.
