# Stoptimer / Delay

**URL:** <https://discourse.nodered.org/t/stoptimer-delay/849>\
**Category:** General\
**Created:** [16 June 2018 05:16 UTC](https://discourse.nodered.org/t/stoptimer-delay/849 "2018-06-16T05:16:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrStevens](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrstevens/32/651_2.png) [@mrStevens](https://discourse.nodered.org/u/mrStevens)\
**Post date:** [16 June 2018 05:16 UTC](https://discourse.nodered.org/t/stoptimer-delay/849/1 "2018-06-16T05:16:59Z")

</div>

Hello all,

I am currently working on a project with node-red. What I am trying to create is a simple monitor/alarm box that will watch a current sensor I have plugged into the raspberry pi. What I want it to do is, if the current sensor runs longer then x amount of time it will trigger a relay. I am currently using the node Stoptimer, which works the only problem I am having is when the current switch back off the time then resets for x amount of time before the relay will unclick.

Example  
The current sensor will go on and off, but it will only alarm if it runs over 5 minutes. If it goes over 5 minutes it then can clear its self without having to wait another 5 minutes it instantly goes back to normal.

Does any one have an idea to accomplish this.

Thanks

---

<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:** [16 June 2018 05:23 UTC](https://discourse.nodered.org/t/stoptimer-delay/849/2 "2018-06-16T05:23:25Z")

</div>

Not quite clear what the sensor is sending, but if say its sending 1 for running and 0 for not. Then a trigger node set to send nothing on first output and then something after 5 minutes, and reset if it sees a 0 should do what you said.

---

<div class="post-metadata">

**Author:** ![mrStevens](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrstevens/32/651_2.png) [@mrStevens](https://discourse.nodered.org/u/mrStevens)\
**Post date:** [16 June 2018 06:02 UTC](https://discourse.nodered.org/t/stoptimer-delay/849/3 "2018-06-16T06:02:00Z")

</div>

Just 1 and 0 is all it’s sending
