Registry / workflow / node-red-contrib-simple-gate

node-red-contrib-simple-gate

JSON →
library0.5.2jsnpmunverified

A Node-RED gate node that controls message flow by opening or closing a gate. Current stable version is 0.5.2, released with support for asynchronous context stores and improved persistence. Key differentiators: allows user-defined control topic and command strings, supports toggle and status commands, and can restore state from persistent context stores if available. Cannot queue messages; for queuing, use the companion node-red-contrib-queue-gate package. Compatible with Node-RED 0.18+.

npm install node-red-contrib-simple-gate
INSTALL
IMPORT
SIG · NODE-RED-CONTRIB-S
N
node-red-contrib-simple-gate
workflowjavascriptv0.5.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gate
Install via npm: npm install node-red-contrib-simple-gate (then use the 'gate' node in the editor palette)
Attempting to import JS module: const gate = require('node-red-contrib-simple-gate')
This is a Node-RED node, not a JavaScript library. It must be installed in your Node-RED user directory and added via the palette. No code import is required.

Shows that the package is a Node-RED node requiring installation and palette usage, not code imports.

// No code example; this is a Node-RED node. // To use: Install the package, then add a 'gate' node from the palette. // Configure control topic and command strings in the node edit dialog. // Send control messages with payload 'open', 'close', 'toggle', etc. on the control topic to change state.
Debug
Known issues
breakingState persistence: versions prior to 0.5.0 used only the default context store, which might be volatile. After upgrade, if using non-default stores, persistence may fail.
fix
Upgrade to 0.5.0 or later and configure appropriate context store in Node-RED settings.
affects: <0.5.0
breakingSupport for asynchronous context stores was added in 0.5.2; older versions may not work with async stores.
fix
Use version 0.5.2 or later.
affects: <0.5.2
breakingNot compatible with Node-RED version 0.18 and earlier.
fix
Upgrade Node-RED to 0.18+ or use a different gate node.
affects: >=0.0.0 <0.19.0
gotchaMessages that arrive when the gate is closed are discarded without warning; there is no queue or buffer.
fix
Use node-red-contrib-queue-gate if you need queuing.
affects: >=0.0.0
gotchaControl messages with payloads that are numbers or booleans are converted to strings before comparison; this may cause unexpected behavior if command strings are numeric.
fix
Ensure control message payloads are strings, or verify numerical equivalence.
affects: >=0.3.0
Errors
Common errors & fixes
Error: Cannot find module 'node-red-contrib-simple-gate'
Node-RED cannot locate the package because it was not installed correctly or is in the wrong directory.
fix
Navigate to your Node-RED user directory (typically ~/.node-red) and run: npm install node-red-contrib-simple-gate
Gate node not showing in palette
Node-RED needs to be restarted after installation, or the palette may not be updated.
fix
Restart Node-RED and check the palette manager. If still missing, try installing via Manage Palette in the editor.
TypeError: Cannot read property 'on' of undefined
Node-RED version is too old (pre-0.18) and incompatible with this node.
fix
Upgrade Node-RED to version 0.18 or higher.
Upgrade
Version history
0.5.2latest on npm
Audit
Dependencies
node-redoptionalRequires Node-RED runtime to register custom nodes; not a standalone library.
Agent activity
19 hits · last 30 days
node
14
OpenAI (training)
4
Amazon
1
Resources
node-red-contrib-simple-gate — npm install node-red-contrib-simple-gate · libregistry