You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying this node for the first time, I was very confused reading the node's help.
Messages with the topic Control Topic are control messages, which set the state of the gate. Control messages can have values representing open, close, toggle, default, and status.
To me, this seemed like I needed to set msg.topic to "Control Topic" (which I now know is incorrect). I played with a 'help' that I think will be better understand:
And here is the code that would replace the current help:
<script type="text/x-red" data-help-name="gate">
Transmits input messages when in the open state and blocks them when
closed.
Configuration options:
Control Topic: defines the msg.topic used in messages to control the state of the gate. Messages with this topic can alter or retrieve the status of the gate by setting msg.payload to one of the Command options (see below)
Default State: Sets the default state of the gate when first deployed or after a default command. This can be captured by the Status node.
Restore from state saved in: When checked and with a chosen persistent form of context storage selected, the node will enter the state it was in prior to a re-deploy or Node-RED restart.
Commands:The default options are open, close, toggle, default, or status.
You can change the default commands to a name you want. If you change any of them, you will use that value in msg.payload when sending a control message to the node.
Examples can be found in the Import options (hamburger menu -> Import -> Examples -> flows -> node-red-contrib->simple-gate)
</script>
The text was updated successfully, but these errors were encountered:
While trying this node for the first time, I was very confused reading the node's help.
To me, this seemed like I needed to set msg.topic to "Control Topic" (which I now know is incorrect). I played with a 'help' that I think will be better understand:
And here is the code that would replace the current help:
<script type="text/x-red" data-help-name="gate">Transmits input messages when in the
open
state and blocks them whenclosed
.Configuration options:
Control Topic:
defines the msg.topic used in messages to control the state of the gate. Messages with this topic can alter or retrieve the status of the gate by setting msg.payload to one of theCommand
options (see below)Default State:
Sets the default state of the gate when first deployed or after a default command. This can be captured by theStatus
node.Restore from state saved in:
When checked and with a chosen persistent form of context storage selected, the node will enter the state it was in prior to a re-deploy or Node-RED restart.Commands:
The default options areopen
,close
,toggle
,default
, orstatus
. You can change the default commands to a name you want. If you change any of them, you will use that value in msg.payload when sending a control message to the node.Examples can be found in the Import options
</script>(hamburger menu -> Import -> Examples -> flows -> node-red-contrib->simple-gate)
The text was updated successfully, but these errors were encountered: