• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] activate LED1/2 with Node-RED + fieldbus nodes container
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?

Attached Files Thumbnail(s)
Well Christian, you should follow the following post:


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...pi-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.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

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.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

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
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.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

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...-user-leds

This is how it looks like


Have fun with it.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

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...pi-nodered. This container and its Node-RED does include the user LED node too.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)


Possibly Related Threads…
Thread Author Replies Views Last Post
  OpenVPN container Armin@netPI 0 52 January-3rd-2021, 12:13 PM
Last Post: Armin@netPI
  operating Console of a container on netPI connected to Wi-Fi tethering tad 3 157 December-3rd-2020, 12:32 PM
Last Post: tad
  NIOT-E-NPIX-4DI4DO with netpi-netx container WalterSchaefer 3 407 November-25th-2020, 01:06 PM
Last Post: zen89
  NPIX-4DI4DO and NetPi-Nodered container issues alhammi 4 397 November-16th-2020, 01:35 PM
Last Post: alhammi
  Get host MAC via REST API inside container bschandra 4 454 November-16th-2020, 09:26 AM
Last Post: bschandra
  Internet on the fieldbus-side COswald 2 209 October-19th-2020, 01:40 PM
Last Post: COswald
  Accessing a modbus device connected to RTE port from Node-RED tad 10 852 October-2nd-2020, 07:21 AM
Last Post: Armin@netPI
  5 x NL 50-Mpi and Node Red like colector data? Jotarod 4 424 September-14th-2020, 01:59 PM
Last Post: Armin@netPI
  Receive at startup additional data through the Fieldbus Port Schranz 1 296 September-10th-2020, 10:55 AM
Last Post: Armin@netPI
  Fieldbus Ports not working Schoko 13 1,174 June-29th-2020, 09:43 PM
Last Post: Armin@netPI

Forum Jump:

Users browsing this thread: 1 Guest(s)