# Detect rising and falling value

**URL:** <https://discourse.nodered.org/t/detect-rising-and-falling-value/16820>\
**Category:** General\
**Created:** [17 October 2019 14:14 UTC](https://discourse.nodered.org/t/detect-rising-and-falling-value/16820 "2019-10-17T14:14:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rosenkrantz](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@Rosenkrantz](https://discourse.nodered.org/u/Rosenkrantz)\
**Post date:** [17 October 2019 14:14 UTC](https://discourse.nodered.org/t/detect-rising-and-falling-value/16820/1 "2019-10-17T14:14:54Z")

</div>

Hello forum

Is there somebody how know what node I could use to detect these values on the picture below? It's the temperature for my heat pump and the consumption. I wanna get a message so I can stop the heat pump when it does these jumping.

Let's says there has been 3 of these jumps I 2 hours then I want node red to send a 0 and the after a given time, send a 1 again.

I have a raspberry pi 3 model b with the newest node red.

 ![Screenshot_20191017_160517](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/067870039c059df78ad3d1196022516d8fd44911.jpeg)  
 ![Screenshot_20191017_160541](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/2/295b45678e08460e9be433720b413ff65718ed0e.jpeg)

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [17 October 2019 14:35 UTC](https://discourse.nodered.org/t/detect-rising-and-falling-value/16820/2 "2019-10-17T14:35:15Z")

</div>

> **[node-red-contrib-edge-trigger](https://flows.nodered.org/node/node-red-contrib-edge-trigger)**
>
> A set of nodes to trigger on rising or falling values

  
Those nodes give separate functions for falling and rising condition control as well as for the hysteresis. But you can also search the flows for hysteresis there is more of such kind.

---

<div class="post-metadata">

**Author:** ![3amWednesday](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/3amwednesday/32/10371_2.png) [@3amWednesday](https://discourse.nodered.org/u/3amWednesday)\
**Post date:** [24 October 2019 10:38 UTC](https://discourse.nodered.org/t/detect-rising-and-falling-value/16820/3 "2019-10-24T10:38:26Z")

</div>

Supposing there aren't too many entries, before you output to graph you can write a function node with 2 outputs to save the last value and to compare to the new value. If this exceeds +-10 or something, send a notification and reset message through the 2nd output, otherwise output value to 1st output (to Graph).  
A context variable should do
