# Timer will not fire after STOP msg

**URL:** <https://discourse.nodered.org/t/timer-will-not-fire-after-stop-msg/57905>\
**Category:** General\
**Created:** [7 February 2022 07:51 UTC](https://discourse.nodered.org/t/timer-will-not-fire-after-stop-msg/57905 "2022-02-07T07:51:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sameersbn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sameersbn/32/45221_2.png) [@sameersbn](https://discourse.nodered.org/u/sameersbn)\
**Post date:** [7 February 2022 07:51 UTC](https://discourse.nodered.org/t/timer-will-not-fire-after-stop-msg/57905/1 "2022-02-07T07:51:04Z")

</div>

Hi I created that looks something like this:

 ![Node-RED-–-Home-Assistant](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/8/a8ad2f350040c1b3e6e8577ff16ef8769421b92d.png)

If `trigger 1` is triggered, i see that the timer T1 is started followed by the timer T2 and eventually the `msg` is output to the debug. But if `trigger 2` triggered, followed by `trigger 1`, the T2 timer is never started. Which means that once the T2 timer receives the STOP message, it refuses to ever start again. Is this the expected behavior, or am I doing something wrong?

```auto
[{"id":"aae6d8cd.51ab7","type":"tab","label":"Experiments","disabled":false,"info":"","env":[{"name":"SENSOR_MOTION_1","value":"binary_sensor.0x158d0002c38026_motion","type":"str"},{"name":"SENSOR_MOTION_2","value":"binary_sensor.0x158d000549d043_motion","type":"str"},{"name":"SENSOR_MOTION_3","value":"input_boolean.placeholder_boolean","type":"str"}]},{"id":"e27adb4ccaa25c19","type":"stoptimer","z":"aae6d8cd.51ab7","duration":"5","units":"Second","payloadtype":"num","payloadval":"0","name":"5 second timer (T1)","x":530,"y":160,"wires":[["5e7251808ba44862"],[]]},{"id":"ed24c81b93a94383","type":"change","z":"aae6d8cd.51ab7","name":"STOP","rules":[{"t":"set","p":"payload","pt":"msg","to":"STOP","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":240,"wires":[["5e7251808ba44862"]]},{"id":"5e7251808ba44862","type":"stoptimer","z":"aae6d8cd.51ab7","duration":"5","units":"Second","payloadtype":"num","payloadval":"0","name":"5 second timer (T2)","x":900,"y":150,"wires":[["a60b10542b8fbeb6"],[]]},{"id":"a60b10542b8fbeb6","type":"debug","z":"aae6d8cd.51ab7","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1180,"y":150,"wires":[]},{"id":"186b9b62526a1974","type":"inject","z":"aae6d8cd.51ab7","name":"trigger 1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":160,"wires":[["e27adb4ccaa25c19"]]},{"id":"e00407b9bf95974d","type":"inject","z":"aae6d8cd.51ab7","name":"trigger 2","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":240,"wires":[["ed24c81b93a94383"]]}]

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [7 February 2022 08:21 UTC](https://discourse.nodered.org/t/timer-will-not-fire-after-stop-msg/57905/2 "2022-02-07T08:21:30Z")

</div>

> [@sameersbn](#):
>
> Is this the expected behavior, or am I doing something wrong?

Hard to say as that is not a core (built-in) node & you haven't stated which contrib node it is.

Have you tried using the built in trigger node?

PS: the built in trigger can be stopped by sending a `msg` with `msg.reset` set to `true`

---

<div class="post-metadata">

**Author:** ![sameersbn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sameersbn/32/45221_2.png) [@sameersbn](https://discourse.nodered.org/u/sameersbn)\
**Post date:** [7 February 2022 09:45 UTC](https://discourse.nodered.org/t/timer-will-not-fire-after-stop-msg/57905/3 "2022-02-07T09:45:12Z")

</div>

> Hard to say as that is not a core (built-in) node & you haven't stated which contrib node it is.

The timer node is [stoptimer](https://flows.nodered.org/node/node-red-contrib-stoptimer)  
The node-red version in use is v2.2.0

> Have you tried using the built in trigger node?

Giving it a try

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [7 February 2022 10:00 UTC](https://discourse.nodered.org/t/timer-will-not-fire-after-stop-msg/57905/4 "2022-02-07T10:00:00Z")

</div>

> [@sameersbn](#):
>
> The timer node is [stoptimer](https://flows.nodered.org/node/node-red-contrib-stoptimer)

That node has not been updated for five years and has not got a github repository where one can check for know issues. The conclusion from that must be that it is unsupported so I recommend against using it. As suggested, the Trigger node should be able to do what you want.

---

<div class="post-metadata">

**Author:** ![sameersbn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sameersbn/32/45221_2.png) [@sameersbn](https://discourse.nodered.org/u/sameersbn)\
**Post date:** [7 February 2022 15:41 UTC](https://discourse.nodered.org/t/timer-will-not-fire-after-stop-msg/57905/5 "2022-02-07T15:41:05Z")

</div>

replaced `stoptimer` with the `trigger` node to resolve the issue. thx for the support

---

<div class="post-metadata">

**Author:** ![hamsando](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hamsando/32/23676_2.png) [@hamsando](https://discourse.nodered.org/u/hamsando)\
**Post date:** [7 February 2022 18:49 UTC](https://discourse.nodered.org/t/timer-will-not-fire-after-stop-msg/57905/6 "2022-02-07T18:49:31Z")

</div>

You could also try Stoptimer-varidelay. It is still maintained (I would know - it is maintained by me).

The issue you were encountering with the original stoptimer is the \_timerpass feature. Amongst the features I've added is the ability to ignore \_timerpass if you want. You can read about it here: [node-red-contrib-stoptimer-varidelay (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-stoptimer-varidelay).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 February 2022 18:50 UTC](https://discourse.nodered.org/t/timer-will-not-fire-after-stop-msg/57905/7 "2022-02-21T18:50:24Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
