I've been using Node Red for the first time over past week, and I'm LOVING it! But I've struck an issue with the Delay node, which I might be misunderstanding...
My flow takes input from a hardware rotary dimmer, calculates some brightness values for a lighting setup, then sends the updated brightness values to a WLED controller. The rotary input generates a huge number of messages per second, and I'm using the delay node to rate limit down to 2 messages a second with "Drop intermediate messages" active, so as not to overload the controller
What I'm finding is that "Drop intermediate messages" will also drop the final message that comes in, if the node is mid-way through delay when that final message arrives. Am I understanding this correctly?
Is there a clean and simple way to ensure that the Delay node always sends the final message it receives? Or, to trigger one more message once the Delay queue is empty?
In case you didn't realise, I think Paul intended that you wire the trigger node in parallel with the delay node so that it it passes the last message on after the message stream stops. I think maybe the delay should be 500ms, though it probably doesn't matter.
I read it that OP just wanted the last message, because the rotary dimmer spits out lots of msg's until it arrives at it's final destination, similar to the old problems encountered by the ui_slider node.
I'm sure Peter will let us know if it doesn't match his expectations.
I need the crowded stream of messages to be trimmed to around 2 per second, whilst ensuring the very last one isn't discarded. It seems a Delay node + Trigger node in parallel solves the issue.