{"id":26005,"library":"node-red-contrib-ui-led","title":"node-red-contrib-ui-led","description":"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.","status":"maintenance","version":"0.4.11","language":"javascript","source_language":"en","source_url":"https://github.com/Adorkable/node-red-contrib-ui-led","tags":["javascript","node-red","led","dashboard","ui"],"install":[{"cmd":"npm install node-red-contrib-ui-led","lang":"bash","label":"npm"},{"cmd":"yarn add node-red-contrib-ui-led","lang":"bash","label":"yarn"},{"cmd":"pnpm add node-red-contrib-ui-led","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"UI node relies on Node-RED Dashboard widget framework","package":"node-red-dashboard","optional":false}],"imports":[{"note":"This is a Node-RED custom node, not a JavaScript module. It is used via the Node-RED editor palette after installation.","wrong":"Global install or importing in JavaScript code","symbol":"node-red-contrib-ui-led","correct":"Install via npm: npm install node-red-contrib-ui-led (in ~/.node-red directory)"}],"quickstart":{"code":"npm install node-red-contrib-ui-led\n# After installation, in Node-RED editor:\n# 1. Drag a 'ui_led' node from the dashboard palette onto the flow.\n# 2. Configure the node: set group, size, and optionally customize color mappings.\n# 3. Wire an inject node to the ui_led node.\n# 4. Set inject node's payload to true (green) or false (red) or any custom value.\n# 5. Deploy and observe the LED on the dashboard.\n\n// Example flow JSON (partial):\n[{\"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\":[]}]","lang":"typescript","description":"Shows installation steps and basic flow setup for a Node-RED LED widget."},"warnings":[{"fix":"Update node-red-dashboard to >=2.23.3.","message":"Requires node-red-dashboard >=2.23.3. Older versions of dashboard are incompatible.","severity":"breaking","affected_versions":"<0.3.0"},{"fix":"Use custom color mappings to handle non-boolean payloads.","message":"msg.payload strict boolean mapping: only true/false map to green/red by default. Other values result in gray.","severity":"gotcha","affected_versions":">=0.2.0"},{"fix":"Consider forking or using alternative dashboard LED nodes.","message":"No active development since 2021; may not work with future Node-RED or dashboard versions.","severity":"deprecated","affected_versions":">=0.4.0"},{"fix":"Enable the option in node config and pass an object mapping values to CSS colors.","message":"Custom color mappings in config are static; dynamic override via msg.colorForValue requires enabling 'Allow Color For Value map in msg'.","severity":"gotcha","affected_versions":">=0.3.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install node-red-dashboard' in your Node-RED user directory.","cause":"node-red-dashboard is a peer dependency not installed automatically.","error":"Error: Cannot find module 'node-red-dashboard'"},{"fix":"Ensure inject node sends payload true/false, and ui_led is placed in a dashboard group.","cause":"msg.payload not boolean true/false, or node not configured in a dashboard group.","error":"LED not showing on dashboard; widget appears gray"},{"fix":"Use object with string/number keys and CSS color values, e.g., {true: 'green'}.","cause":"Custom color mappings object format incorrect in msg.colorForValue.","error":"TypeError: Cannot read properties of undefined (reading 'length')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}