Registry / web-framework / node-red-contrib-ui-led

node-red-contrib-ui-led

JSON →
library0.4.11jsnpmunverified

A Node-RED dashboard widget that displays a customizable LED status indicator with color mapping based on msg.payload values. Version 0.4.11 is currently latest with no active development since 2021. Requires node-red-dashboard >=2.23.3. Supports custom color-value mappings, dynamic overrides via msg.colorForValue, and aesthetic sizing options. Unlike generic dashboard widgets, this node provides immediate visual feedback with simple boolean or custom state-to-color logic. Released under MIT license.

npm install node-red-contrib-ui-led
INSTALL
IMPORT
SIG · NODE-RED-CONTRIB-U
N
node-red-contrib-ui-led
web-frameworkjavascriptv0.4.11
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

node-red-contrib-ui-led
Install via npm: npm install node-red-contrib-ui-led (in ~/.node-red directory)
Global install or importing in JavaScript code
This is a Node-RED custom node, not a JavaScript module. It is used via the Node-RED editor palette after installation.

Shows installation steps and basic flow setup for a Node-RED LED widget.

npm install node-red-contrib-ui-led # After installation, in Node-RED editor: # 1. Drag a 'ui_led' node from the dashboard palette onto the flow. # 2. Configure the node: set group, size, and optionally customize color mappings. # 3. Wire an inject node to the ui_led node. # 4. Set inject node's payload to true (green) or false (red) or any custom value. # 5. Deploy and observe the LED on the dashboard. // Example flow JSON (partial): [{"id":"node1","type":"inject","z":"flow1","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool"},{"id":"node2","type":"ui_led","z":"flow1","group":"dashboard_group","order":0,"width":0,"height":0,"name":"","label":"","layout":"row left","allowColorForValueInMsg":false,"x":350,"y":200,"wires":[]}]
Debug
Known issues
breakingRequires node-red-dashboard >=2.23.3. Older versions of dashboard are incompatible.
fix
Update node-red-dashboard to >=2.23.3.
affects: <0.3.0
gotchamsg.payload strict boolean mapping: only true/false map to green/red by default. Other values result in gray.
fix
Use custom color mappings to handle non-boolean payloads.
affects: >=0.2.0
deprecatedNo active development since 2021; may not work with future Node-RED or dashboard versions.
fix
Consider forking or using alternative dashboard LED nodes.
affects: >=0.4.0
gotchaCustom color mappings in config are static; dynamic override via msg.colorForValue requires enabling 'Allow Color For Value map in msg'.
fix
Enable the option in node config and pass an object mapping values to CSS colors.
affects: >=0.3.0
Errors
Common errors & fixes
Error: Cannot find module 'node-red-dashboard'
node-red-dashboard is a peer dependency not installed automatically.
fix
Run 'npm install node-red-dashboard' in your Node-RED user directory.
LED not showing on dashboard; widget appears gray
msg.payload not boolean true/false, or node not configured in a dashboard group.
fix
Ensure inject node sends payload true/false, and ui_led is placed in a dashboard group.
TypeError: Cannot read properties of undefined (reading 'length')
Custom color mappings object format incorrect in msg.colorForValue.
fix
Use object with string/number keys and CSS color values, e.g., {true: 'green'}.
Upgrade
Version history
0.4.11latest on npm
Audit
Dependencies
node-red-dashboardrequiredUI node relies on Node-RED Dashboard widget framework
Agent activity
2 hits · last 30 days
node
2
Resources
node-red-contrib-ui-led — npm install node-red-contrib-ui-led · libregistry