[SOLVED] activate LED1/2 with Node-RED + fieldbus nodes container - Printable Version +- Hilscher Community Forum (https://forum.hilscher.com) +-- Forum: netPI 3 - Docker featuring Industrial Raspberry Pi 3 platform (https://forum.hilscher.com/forum-1.html) +--- Forum: Software (https://forum.hilscher.com/forum-5.html) +--- Thread: [SOLVED] activate LED1/2 with Node-RED + fieldbus nodes container (/thread-353.html) |
[SOLVED] activate LED1/2 with Node-RED + fieldbus nodes container - Christian_Rau - January-4th-2019 I'm using netPI RTE with the hilschernetpi/netpi-nodered-fieldbus container installed. Now I want to activate the LED 1 an 2 (GPIO12, GPIO 13). I try a flow with output-node Raspberry rpi gpio. But it didn`t work, below the node the message N/A is shown. Sending an e-mail using the same trigger works. Is it even possible to access the LED with Node-Red? RE: activate LED1/2 with Node-RED + fieldbus nodes container - Armin@netPI - January-4th-2019 Well Christian, you should follow the following post: https://forum.hilscher.com/thread-159.html This explains why the standard Raspberry GPIO Node-RED node can't be used. The LEDs are no general purpose IO devices but LED devices. Since the GPIO node is based on the rpi-gpio node.js module https://github.com/JamesBarwell/rpi-gpio.js/blob/master/rpi-gpio.js you see in there the PATH information set to /sys/class/gpio which cannot be used for the LEDs. My recommendation is to write your own Node-RED node ... which is probably no more than 10 lines of code. RE: activate LED1/2 with Node-RED + fieldbus nodes container - Armin@netPI - January-4th-2019 One thing in addition. You need to enable privileged mode for your container in any case. Else the /sys/class/ ... instances are not available in a container. RE: activate LED1/2 with Node-RED + fieldbus nodes container - Christian_Rau - January-8th-2019 Thank you for your response. Unfortunately, I can not do anything with it. I understand the explanation, but creating my own node exceeds my knowledge. If you would like to give me further information, I would be grateful. I still have a thousand more questions, but I will open new threads soon. PS: google-Translate is wonderful RE: activate LED1/2 with Node-RED + fieldbus nodes container - Armin@netPI - January-8th-2019 Christian I have decided to make a Node-RED LED node public within a Docker image in the next days. I feel that an LED Node-RED example node will help the netPI community in general supporting netPI Node-RED applications better. I will keep you informed when I have released the example. RE: activate LED1/2 with Node-RED + fieldbus nodes container - Armin@netPI - January-11th-2019 Hello Christian, we have made the container with Node-RED and user LED node now public to everyone on DockerHub here https://cloud.docker.com/u/hilschernetpi/repository/docker/hilschernetpi/netpi-nodered-user-leds This is how it looks like Have fun with it. RE: [SOLVED] activate LED1/2 with Node-RED + fieldbus nodes container - Armin@netPI - October-21st-2019 We put all Node-RED nodes we ever made for netPI and distributed in multple containers into one single container now. https://cloud.docker.com/u/hilschernetpi/repository/docker/hilschernetpi/netpi-nodered. This container and its Node-RED does include the user LED node too. |