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

errors when deploying ui-led #46

Closed
vieuxcampus opened this issue Nov 23, 2019 · 9 comments
Closed

errors when deploying ui-led #46

vieuxcampus opened this issue Nov 23, 2019 · 9 comments

Comments

@vieuxcampus
Copy link

trying to run the basic example, I get those messages:
23/11/2019 à 14:20:54msg : error
"TypeError: Cannot read property 'length' of undefined"
23/11/2019 à 14:20:54node: 2aae8fef.55ce8
msg : error
"TypeError: Cannot read property 'push' of undefined"

Nothing is left undefined in the configuration.
I'm running raspian(v10 buster) on a raspberry 4, MQTT and node-red(v13.1.0)

@Nokomis449
Copy link

Nokomis449 commented Nov 23, 2019

I had the same problem this week and since so many people were downloading the node with no reported issues, I assumed it was me. After two evenings of trying to get an LED in the dashboard using the provided example, I finally deleted the ui-led node, reinstalled it, and wrote my own basic example (below) and it now works as expected. My example is two inject nodes, alternately injecting "True" and False" into the LED node, and the LED node blinks green and red as expected.

[{"id":"630432c5.e7318c","type":"ui_led","z":"7d8f18fe.7d70a8","group":"8152166b.5f11f8","order":1,"width":0,"height":0,"label":"Blinking LED","labelPlacement":"right","labelAlignment":"center","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"name":"","x":600,"y":340,"wires":[]},{"id":"5f623f9e.2e727","type":"inject","z":"7d8f18fe.7d70a8","name":"True","topic":"","payload":"true","payloadType":"bool","repeat":"2","crontab":"","once":true,"onceDelay":0.1,"x":430,"y":320,"wires":[["630432c5.e7318c"]]},{"id":"e44ef96d.b4e3a8","type":"inject","z":"7d8f18fe.7d70a8","name":"False","topic":"","payload":"false","payloadType":"bool","repeat":"2","crontab":"","once":true,"onceDelay":"1","x":430,"y":360,"wires":[["630432c5.e7318c"]]},{"id":"8152166b.5f11f8","type":"ui_group","name":"Group 2","tab":"5cf502fe.71c0cc","order":2,"disp":true,"width":6},{"id":"5cf502fe.71c0cc","type":"ui_tab","z":"","name":"NokoNet","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
ui-led

@yoiang
Copy link
Member

yoiang commented Nov 23, 2019

Do you both mean the examples in the new "Examples" tab? Hmm, I'll try with a fresh install, see if I can reproduce this.

@Nokomis449
Copy link

I tried the example that included its own MQTT nodes and absolutely nothing showed up on the dashboard, even though other things I tried showed up on the dashboard. The MQTT node would show as connected. So either the example wouldn't work for me, or the ui-led install was bad. Deleting/reinstalling and using my own example got me working. I'm using the latest Node-RED (installed per Node-RED) on the latest Ubuntu LTS.

@vieuxcampus
Copy link
Author

sorry but it's the same with your example. I always get those error messages whatever the example.

@Nokomis449
Copy link

The following example just adds a debug node. You should get continuous True/False/True/False... in the debug window, with the LED blinking on & off. If the True/False is working but no LED, I'm not sure what else to try except reinstall the ui-led node.

[{"id":"630432c5.e7318c","type":"ui_led","z":"7d8f18fe.7d70a8","group":"8152166b.5f11f8","order":1,"width":0,"height":0,"label":"Blinking LED","labelPlacement":"right","labelAlignment":"center","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"name":"","x":600,"y":340,"wires":[]},{"id":"5f623f9e.2e727","type":"inject","z":"7d8f18fe.7d70a8","name":"True","topic":"","payload":"true","payloadType":"bool","repeat":"2","crontab":"","once":true,"onceDelay":0.1,"x":430,"y":320,"wires":[["630432c5.e7318c","53435004.ced1"]]},{"id":"e44ef96d.b4e3a8","type":"inject","z":"7d8f18fe.7d70a8","name":"False","topic":"","payload":"false","payloadType":"bool","repeat":"2","crontab":"","once":true,"onceDelay":"1","x":430,"y":360,"wires":[["630432c5.e7318c","53435004.ced1"]]},{"id":"53435004.ced1","type":"debug","z":"7d8f18fe.7d70a8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":630,"y":400,"wires":[]},{"id":"8152166b.5f11f8","type":"ui_group","name":"Group 2","tab":"5cf502fe.71c0cc","order":2,"disp":true,"width":6},{"id":"5cf502fe.71c0cc","type":"ui_tab","z":"","name":"NokoNet","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

@vieuxcampus
Copy link
Author

The debug window shows the true/false sequence but there is no led showing in the dashboard. Deleting and re-installing does nothing. I installed the ui-led with the "manage palette" menu item. if I use npm I get this:
npm install node-red-contrib-ui-led
npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.

  • [email protected]
    added 1 package from 1 contributor and audited 508 packages in 3.544s
    found 0 vulnerabilities

and it doesn't show the led.
I guess there is something missing with the install but don(t know how to fix it

@Nokomis449
Copy link

For unrelated reasons (testing; wanted to start clean), I deleted and re-installed Node-RED and NPM. I loaded the Dashboard and ui-led nodes via the pallet and copied my above example to it, and the dashboard was still giving me the "Welcome... Please add some UI nodes to your flow and redeploy", indicating that the led node was again not working. I then stopped and restarted Node-RED, and the led began working as expected. So it may be that Node-RED needs a restart for the node to work.

@vieuxcampus
Copy link
Author

yes !! that did it ! I reinstalled the led module then reboot. As you said, it looks like nodered needs a start for this node to work. I should have tried this. Shame on me !
Thanks to all
best regards

@yoiang
Copy link
Member

yoiang commented Jul 17, 2020

Sorry for the late follow up! I'm glad this was resolved :)

@yoiang yoiang closed this as completed Jul 17, 2020
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

3 participants