# Trigger node bogus delay

**URL:** https://discourse.nodered.org/t/trigger-node-bogus-delay/26069
**Category:** General
**Created:** [4 May 2020 14:17 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069 "2020-05-04T14:17:38Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)
#### Post date: [4 May 2020 17:40 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/21 "2020-05-04T17:40:41Z")

</div>

Thanks for saying so. Have fun!

I have landscapers redoing my whole yard and I'll need to pick up my dog whenever they call so I"ll be in and out too.

I sure appreciate your help and patience with a noob.

---

<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: [4 May 2020 18:56 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/22 "2020-05-04T18:56:04Z")

</div>

Hi. Your description sounds just as the trigger should work. Set it to send original payload on first input Then wait 15 secs then send false , and extend if more messages arrive. ( unless I am missing something)

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [4 May 2020 18:57 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/23 "2020-05-04T18:57:39Z")

</div>

Just remove the 'Reset the trigger if:  
"

 ![Screen Shot 2020-05-04 at 2.57.09 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/9/29587199eb16fcabd1a1ef990714fcd323c3eaa4.png)

---

<div class="post-metadata">

### Author: ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)
#### Post date: [4 May 2020 18:58 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/24 "2020-05-04T18:58:27Z")

</div>

@dceejay Thank you for chiming in.

Yes, that's exactly what I want but not what I get. I'm rather disillusioned at this point.

---

<div class="post-metadata">

### Author: ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)
#### Post date: [4 May 2020 18:59 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/25 "2020-05-04T18:59:33Z")

</div>

Ok, @zenofmud, I'll go back to my initial flow setup and make that change. Stand by...

---

<div class="post-metadata">

### Author: ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)
#### Post date: [4 May 2020 19:06 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/26 "2020-05-04T19:06:01Z")

</div>

> [@zenofmud](#):
>
> Just remove the 'Reset the trigger if:

I get the same behavior as in posts 9 & 10.

I didn't change the Send as you suggested because I do NOT want a False to pass through.

---

<div class="post-metadata">

### Author: ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)
#### Post date: [4 May 2020 19:08 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/27 "2020-05-04T19:08:35Z")

</div>

Went ahead and made that change and it WORKS! But why??? Seems a massive misnomer to me.

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [4 May 2020 19:09 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/28 "2020-05-04T19:09:10Z")

</div>

Try this small test flow

 ![Screen Shot 2020-05-04 at 3.08.52 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/3/e3910b5d3ca0004ca8fb6e1a4d64d8458c912c83.png)

```auto
[{"id":"f5e9d530.76c9f8","type":"trigger","z":"646a34cd.8135ac","op1":"","op2":"false","op1type":"pay","op2type":"str","duration":"5","extend":true,"units":"s","reset":"true","bytopic":"all","name":"","x":540,"y":140,"wires":[["a4364252.b15c7"]]},{"id":"626c36d3.55a858","type":"inject","z":"646a34cd.8135ac","name":"","topic":"","payload":"true","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":80,"wires":[["f5e9d530.76c9f8","169ecbb2.09a784"]]},{"id":"873247ff.addbe8","type":"inject","z":"646a34cd.8135ac","name":"","topic":"","payload":"False","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":180,"wires":[["f5e9d530.76c9f8","169ecbb2.09a784"]]},{"id":"a4364252.b15c7","type":"debug","z":"646a34cd.8135ac","name":"out","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":710,"y":140,"wires":[]},{"id":"169ecbb2.09a784","type":"debug","z":"646a34cd.8135ac","name":"in","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":250,"y":140,"wires":[]}]

```

---

<div class="post-metadata">

### Author: ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)
#### Post date: [4 May 2020 19:10 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/29 "2020-05-04T19:10:04Z")

</div>

Will do but first I tried sending the False before the True and, as I feared, it gets passed through.

---

<div class="post-metadata">

### Author: ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)
#### Post date: [4 May 2020 19:13 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/30 "2020-05-04T19:13:34Z")

</div>

Interesting. Your flow does absolutely nothing here.

Maybe this is a problem?

desktop[~] node -v  
v14.1.0

---

<div class="post-metadata">

### Author: ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)
#### Post date: [4 May 2020 19:15 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/31 "2020-05-04T19:15:48Z")

</div>

I see that there is an update v14.1.0 -\> 14.1.0-2 available.

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [4 May 2020 19:17 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/32 "2020-05-04T19:17:25Z")

</div>

well node 14 is bleading edge... what platform are you running on?

If you only want to send a TRUE to kick off the lighting, then you will have to have the state of the light saved. so when a msg comes in. it the light is off, send the msg to the trigger to turn on the light, but if the light is off and a false comes thru throw it away.

Give me a few minutes

---

<div class="post-metadata">

### Author: ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)
#### Post date: [4 May 2020 19:19 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/33 "2020-05-04T19:19:08Z")

</div>

I'm on Arch Linux.

It's time to retrieve my pooch so I'll get back to you in about 45 min.

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [4 May 2020 19:37 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/34 "2020-05-04T19:37:34Z")

</div>

The recommended version of Node.js is 12.x - there may be things in node.js 14.x that could cause issues.

Here is a flow that should do what you want, it's more complicated but your requirements have changed.

```auto
[{"id":"646a34cd.8135ac","type":"tab","label":"trigger","disabled":false,"info":""},{"id":"f5e9d530.76c9f8","type":"trigger","z":"646a34cd.8135ac","op1":"","op2":"false","op1type":"pay","op2type":"str","duration":"5","extend":true,"units":"s","reset":"","bytopic":"all","name":"","x":520,"y":220,"wires":[["df75453a.e0d39","e12bfeb9.e36038"]]},{"id":"626c36d3.55a858","type":"inject","z":"646a34cd.8135ac","name":"","topic":"","payload":"true","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":80,"wires":[["169ecbb2.09a784","fc54715c.7d15e"]]},{"id":"873247ff.addbe8","type":"inject","z":"646a34cd.8135ac","name":"","topic":"","payload":"false","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":200,"wires":[["fc54715c.7d15e","169ecbb2.09a784"]]},{"id":"a4364252.b15c7","type":"debug","z":"646a34cd.8135ac","name":"out","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":790,"y":260,"wires":[]},{"id":"169ecbb2.09a784","type":"debug","z":"646a34cd.8135ac","name":"in","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":150,"y":140,"wires":[]},{"id":"fc54715c.7d15e","type":"switch","z":"646a34cd.8135ac","name":"input true","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":340,"y":140,"wires":[["fc515163.cdec1","6ec26b51.c6f65c"],["3089e3a4.c440fc"]]},{"id":"fc515163.cdec1","type":"change","z":"646a34cd.8135ac","name":"set light_state on","rules":[{"t":"set","p":"light_state","pt":"flow","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":140,"wires":[["f5e9d530.76c9f8","6bc16666.91b178"]]},{"id":"3089e3a4.c440fc","type":"switch","z":"646a34cd.8135ac","name":"light on?","property":"light_state","propertyType":"flow","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":340,"y":220,"wires":[["f5e9d530.76c9f8"],[]]},{"id":"df75453a.e0d39","type":"switch","z":"646a34cd.8135ac","name":"true/false","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"false","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":520,"y":260,"wires":[["9ca1b703.ee17d8"],["a4364252.b15c7"]]},{"id":"9ca1b703.ee17d8","type":"change","z":"646a34cd.8135ac","name":"set light_state off","rules":[{"t":"set","p":"light_state","pt":"flow","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":320,"wires":[["8180f656.46b83"]]},{"id":"6ec26b51.c6f65c","type":"debug","z":"646a34cd.8135ac","name":"input true","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":400,"y":60,"wires":[]},{"id":"e12bfeb9.e36038","type":"debug","z":"646a34cd.8135ac","name":"out","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":790,"y":220,"wires":[]},{"id":"8180f656.46b83","type":"debug","z":"646a34cd.8135ac","name":"out","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":790,"y":320,"wires":[]},{"id":"6bc16666.91b178","type":"debug","z":"646a34cd.8135ac","name":"out","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":790,"y":160,"wires":[]}]

```

---

<div class="post-metadata">

### Author: ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)
#### Post date: [4 May 2020 20:24 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/35 "2020-05-04T20:24:05Z")

</div>

> [@zenofmud](#):
>
> recommended version of Node.js is 12.x -

Fair enough, I think I can downgrade to that and will do so.

I'll give your flow a go. Thanks for providing it.

I beg your pardon if I didn't state my requirements clearly but they have not changed, not yet anyway.

---

<div class="post-metadata">

### Author: ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)
#### Post date: [4 May 2020 20:26 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/36 "2020-05-04T20:26:49Z")

</div>

There are lots of versions available so I'll pick 12.13.0 as it's the last of the 12.x

BTW, I don't recall coming across a requirement for the nodejs version so thanks for that.

---

<div class="post-metadata">

### Author: ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)
#### Post date: [4 May 2020 20:43 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/37 "2020-05-04T20:43:15Z")

</div>

> [@zenofmud](#):
>
> node 14 is bleading edge.

That's me, livin' on the edge! 🤪

NR didn't want to run after the nodejs downgrade so I'm updating all the (bleeding edge 😉) packages and will reboot. One of the packages is  
nodejs-node-red 1.0.6-1 1 -\> 2

---

<div class="post-metadata">

### Author: ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)
#### Post date: [4 May 2020 21:13 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/38 "2020-05-04T21:13:30Z")

</div>

It figures... NR won't install with nodejs 12.13.0 due to:  
`error while loading shared libraries: libicui18n.so.64`

I posted a request for advice over on that forum.

---

<div class="post-metadata">

### Author: ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)
#### Post date: [4 May 2020 21:14 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/39 "2020-05-04T21:14:50Z")

</div>

I was warned that the whole node.js environment is DLL hell on steroids. 🙃

---

<div class="post-metadata">

### Author: ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)
#### Post date: [4 May 2020 21:42 UTC](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069/40 "2020-05-04T21:42:02Z")

</div>

It turns out that the Arch version of NR won't run on nodejs later than v6. I abandoned Windows partly because of this kind of thing so I'm saying goodbye to NR. Too bad because it is a GREAT idea and I hope someone builds a similar app on a stable environment.

Thanks one and all for your assistance here.

[Previous page](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069.md?page=1)

[Next page](https://discourse.nodered.org/t/trigger-node-bogus-delay/26069.md?page=3)
