Resetting Delay Node after starting

2,704 views
Skip to first unread message

Thomas Bruyere

unread,
Dec 15, 2016, 6:35:20 PM12/15/16
to Node-RED
Hi,
I need to reset delay node after starting timer.

For example, I have to stop a server after 5min, except if ui button is pushed during this delay.
So when it comes, I need to stop delay node to stop the command to shutdown the server.

Is it possible to do this with another node?
Or adding this feature to the existing node?

Thx thomas

Dave C-J

unread,
Dec 15, 2016, 6:49:16 PM12/15/16
to node...@googlegroups.com
The trigger node may be a better bet for what you want, that can be set to output nothing on first trigger, then wait, then output something, and can both be extended or reset in the meantime.

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/fe77124c-d18f-4c7d-81ed-984ce2af93f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thomas Bruyere

unread,
Dec 16, 2016, 11:23:43 AM12/16/16
to Node-RED
Thx for this answer I will look at this node.
Regards

Andre Cragnolini

unread,
Sep 26, 2017, 8:30:17 PM9/26/17
to Node-RED
Hi Dave,

I was wondering with the trigger node if it was possible to externally change the delay number via a function block.

I have seen it done with a count node I have it is set to increment but sending this to the node via a function block reduces the count by 5

msg.decrement = 5;
return msg;

With the trigger node I tried

msg.duration = 10;
return msg;

Although it doesn't change the delay value.

I am trying to allow the user to change the delay time of the trigger node via a dashboard.

Kind Regards,

Andre

On Friday, 16 December 2016 12:49:16 UTC+13, Dave C-J wrote:
The trigger node may be a better bet for what you want, that can be set to output nothing on first trigger, then wait, then output something, and can both be extended or reset in the meantime.
On 15 Dec 2016 11:35 p.m., "Thomas Bruyere" <thomas.b...@gmail.com> wrote:
Hi,
I need to reset delay node after starting timer.

For example, I have to stop a server after 5min, except if ui button is pushed during this delay.
So when it comes, I need to stop delay node to stop the command to shutdown the server.

Is it possible to do this with another node?
Or adding this feature to the existing node?

Thx thomas

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages