Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion to make the node help a little clearer #18

Open
juggledad opened this issue Apr 20, 2024 · 0 comments
Open

Suggestion to make the node help a little clearer #18

juggledad opened this issue Apr 20, 2024 · 0 comments

Comments

@juggledad
Copy link

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:

Preview_of_new_Help

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant