# How to avoid spikes

**URL:** <https://discourse.nodered.org/t/how-to-avoid-spikes/18992>\
**Category:** General\
**Created:** [10 December 2019 12:42 UTC](https://discourse.nodered.org/t/how-to-avoid-spikes/18992 "2019-12-10T12:42:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaeti01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jaeti01/32/15005_2.png) [@jaeti01](https://discourse.nodered.org/u/jaeti01)\
**Post date:** [10 December 2019 12:42 UTC](https://discourse.nodered.org/t/how-to-avoid-spikes/18992/1 "2019-12-10T12:42:42Z")

</div>

Hi,  
i am fairly green with node-red and need some quick advise please.  
I have a message coming in on an http input node (iBeacon URL call) and some activity pending upon it.  
Now i have the problem thsat sometimes I have two inputs within a second or so (beacon in/out) for whatever reason.  
So what I would like to achieve is:  
record the input message, wait for 5 sec and check if it doesn't change again, only then continue the flow.  
So like: only if the last input value was valid for more then X seconds, proceed.

How would I do that?

thanks, Till

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [10 December 2019 14:08 UTC](https://discourse.nodered.org/t/how-to-avoid-spikes/18992/2 "2019-12-10T14:08:47Z")

</div>

Have a look at the trigger node for this
