Adorkable / node-red-contrib-ui-led

A simple LED status indicator for the Node-RED Dashboard
MIT License
16 stars 12 forks source link

LED is not shown on dashboard #30

Closed AlbanT closed 5 years ago

AlbanT commented 5 years ago

Hi, I tried to add a led to my dashboard but it isn't added to the dashboard:

https://www.screencast.com/t/2nkMfFNoTj

[ { "id": "a82ff38b.4c666", "type": "tab", "label": "Sensors", "disabled": false, "info": "" }, { "id": "3c453b6.16f1e44", "type": "ui_led", "z": "a82ff38b.4c666", "group": "fe5704ed.b94c58", "order": 0, "label": "Connected", "colorForValue": [ { "color": "red", "value": "false", "valueType": "bool" }, { "color": "green", "value": "true", "valueType": "bool" } ], "name": "Connected", "x": 668, "y": 123, "wires": [] }, { "id": "66d4aae9.ae760c", "type": "ui_switch", "z": "a82ff38b.4c666", "name": "simple switch", "label": "switch", "tooltip": "", "group": "fe5704ed.b94c58", "order": 3, "width": 0, "height": 0, "passthru": true, "decouple": "false", "topic": "", "style": "", "onvalue": "true", "onvalueType": "bool", "onicon": "", "oncolor": "", "offvalue": "false", "offvalueType": "bool", "officon": "", "offcolor": "", "x": 460, "y": 140, "wires": [ [ "3c453b6.16f1e44" ] ] }, { "id": "fe5704ed.b94c58", "type": "ui_group", "z": "", "name": "UI LED", "tab": "1de68bdd.807364", "order": 1, "disp": true, "width": "6", "collapse": false }, { "id": "1de68bdd.807364", "type": "ui_tab", "z": "", "name": "Test", "icon": "dashboard", "order": 2, "disabled": false, "hidden": false } ]

Any idea on what I'm doing wrong?

yoiang commented 5 years ago

I'm not sure, your pasted code works a-ok here:

Screen Shot 2019-04-26 at 11 23 36 AM

Have you checked the Node-Red logs or console? Perhaps there was an issue installing the UI-LED node.

AlbanT commented 5 years ago

I'm not sure, your pasted code works a-ok here:

Screen Shot 2019-04-26 at 11 23 36 AM

Have you checked the Node-Red logs or console? Perhaps there was an issue installing the UI-LED node.

Weird, could it be something with my Node red installation in general? I'm running node red (v0.20.5: Maintenance Release) on a Raspberry Pi. I setup a fresh raspberry and installed a fresh node red on it ans I still have the same issue. But... I noticed after my original post here that I have a similar problem with a different node (https://flows.nodered.org/node/node-red-contrib-heater-controller) ... Hope someone canshed some light on this :)

stevenhowes commented 5 years ago

I get the same, this is the syslog. `Apr 29 17:16:17 nodered Node-RED[704]: 29 Apr 17:16:17 - [info] Starting flows

Apr 29 17:16:17 nodered Node-RED[704]: While constructing LEDNode widget: { Error: Cannot find module 'node-red-dashboard'

Apr 29 17:16:17 nodered Node-RED[704]: at Object.requireModule [as require] (/usr/local/lib/node_modules/node-red/node_modules/@node-red/registry/lib/util.js:48:19)

Apr 29 17:16:17 nodered Node-RED[704]: at new LEDNode (/home/nodered/.node-red/node_modules/node-red-contrib-ui-led/led.js:21:26)

Apr 29 17:16:17 nodered Node-RED[704]: at Object.createNode (/usr/local/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/util.js:483:31)

Apr 29 17:16:17 nodered Node-RED[704]: at Flow.start (/usr/local/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/Flow.js:176:44)

Apr 29 17:16:17 nodered Node-RED[704]: at start (/usr/local/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/index.js:329:33)

Apr 29 17:16:17 nodered Node-RED[704]: at stop.then.then (/usr/local/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/index.js:196:21) code: 'MODULE_NOT_FOUND'}

Apr 29 17:16:17 nodered Node-RED[704]: TypeError: Cannot read property 'padEnd' of undefined

Apr 29 17:16:17 nodered Node-RED[704]: at Flow.start (/usr/local/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/Flow.js:221:62)

Apr 29 17:16:17 nodered Node-RED[704]: at start (/usr/local/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/index.js:329:33)

Apr 29 17:16:17 nodered Node-RED[704]: at stop.then.then (/usr/local/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/flows/index.js:196:21) `

yoiang commented 5 years ago

Are you installing Node-RED the same way as described in #8 or seeing any of the same other errors?

AlbanT commented 5 years ago

As of this morning I got it working. I updated to the newest version of node-red-contrib-ui-led and rebooted my Raspberry... And now it works perfectly.

yoiang commented 5 years ago

That's great to hear! Hmmm, I'm not sure what change would have affected dependency resolution, I'll have to dig a little deeper to understand what was fixed. Do you install your Node-RED via apt-install by any chance?

AlbanT commented 5 years ago

Do you install your Node-RED via apt-install by any chance?

Yes I did....

yoiang commented 5 years ago

Gotcha, so this may very well resolve #8. Thanks so much for your help!