Timer will not fire after STOP msg

Hi I created that looks something like this:

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?

[{"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"]]}]

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

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
The node-red version in use is v2.2.0

Have you tried using the built in trigger node?

Giving it a try

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.

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

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.

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