A new node, node-red-contrib-queue-gate
, has been uploaded to npm. This is an enhanced version of node-red-contrib-simple-gate
that additionally allows messages to be queued and released at a later time. See the discussion at Gate node using Blockly.
From the help text:
The node will transmit the input message to its output when in the open
state and block it when closed
. In the queueing
state, the input message is added to the end of the message queue, provided space is available. The user can limit the size of the queue to prevent memory problems. Messages in the queue can be released (in the order received) either singly or the entire queue at once.
Messages with the user-defined topic Control Topic
(set when the node is deployed) are not passed through but are used to control the state of the gate or the queue.
Control messages can have values representing commands that change the state of the gate: open
, close
, toggle
, queue
, or default
. Messages that control the queue are trigger
, flush
and purge
. The (case-insensitive) strings representing these commands are set by the user when the node is deployed. If a control message is received but not recognized, there is no output or change of state, and the node reports an error.
When first deployed or after a default
command, the gate is in the user-selected state defined by Default State
.
The node can be downloaded from npm, GitHub, or the palette manager.