Variable timers

#1

Hi everyone , I'm Enzo a new community member. I've a problem that I can not solve.
I have a node that send me a number es 3 , 5 ,7 etc for me that numbers are second, i have a second node takes in input these second and active a light for a time (second ) in input . My problems is: for example time are 10 second and start a timer for 10 second , after 3 second of a start the node receive a second inpunt with 5 second the new final time is 12 second . You as you would program it ?

Many thanks

0 Likes

#2

Once the countdown of the time has started you can not modify the time on the fly, you can change online from a message or the dashboard the value of the timer using the delay node configuring the timer as per msg.delay

image

If you know that you can receive 2 or 3 values or similar you can make something like a cascade, the first value receive will write the first value for the first delay timer and once is over reset a global variable, if during this time a new message is received then signal will be redirected to other line that blocks the out of the first one and write the value on the second delay timer, once timer is over will send the message and reset the sequence.

Something like this is easy to achieve however is a bit twisted to realize.

I think some day I wrote some post with one similar example I will try to find it out and give you the link as this could be one idea.

Regards

1 Like

#3

Here we go.... has nothing to do with timers but the principle could be the same....

copy the flow and check it how it works to understand better.

Regards

1 Like

#4

CHeckout Mytimeout by Cherry - it is great and will do exactly what you want with very little effort.

Craig

0 Likes