Delay message while new messages arrive

Is there any node that can delay the message as long as there is new messages coming in.
Think of a remote, you press 1 and the number appears on the TV and there is a delay of two seconds, if you press again during these two seconds the delay is reset to two seconds again.

Is there any node or node sequence that can do this kind of delay?

The trigger node (which I believe comes standard with a node red install) has the option to “extend delay if new message arrives”

The trigger node lets the first message through without delay.
At least the way I tried to use it.

I want the first message also to stop/wait. Or be deleted completely and just wait for the second one.

Got it working…

I added a traffic light after.
So the trigger manipulates the first message to “1”.
Then sends “2”.

The traffic light stops messages with “1” and lets allows messages with “2”. Then it sends it again using the resend option in traffic light

Change the “Send” dropdown to “nothing”

And the “then send” dropdown to “the latest msg object”

2 Likes

That worked too…
I can’t believe I missed that obvious option.