After some discussion elsewhere on this forum (Gate node using Blockly - #10 by Foukk), I have published my take on controlling the flow of messages along a particular path, node-red-contrib-simple-gate
. There are lots of ways to do this, but I think a dedicated node with some flexibility might be useful. From the help text, this node
Transmits the input message when in the
open
state and blocks it whenclosed
.Messages with the topic
Control Topic
are control messages, which set the state of the gate. Control messages can have values representingopen
,close
,toggle
, anddefault
.When first deployed or after a
default
command, the gate is in the state defined byDefault State
.
The node can be downloaded from npm, GitHub, or the palette manager.