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

  Reply
#3
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)

  Reply
#4
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
  Reply
#5
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)

  Reply
#6
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)

  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  EIP Node Red configurator mnieuzyla 4 24 September-10th-2019, 06:19 AM
Last Post: Armin@netPI
  create container in Portainer v1.12.4 dcatteeu 2 20 September-9th-2019, 12:12 PM
Last Post: dcatteeu
  UMTS/LTE support via USB router/modem sticks in a container Armin@netPI 3 149 September-5th-2019, 02:07 PM
Last Post: Armin@netPI
  Exporting and importing container images Armin@netPI 0 19 August-23rd-2019, 10:39 AM
Last Post: Armin@netPI
  [SOLVED] Help with fieldbus node Farani 5 42 August-20th-2019, 07:22 AM
Last Post: Armin@netPI
  Ready-to-deploy: full featured Node-RED container Armin@netPI 5 70 July-25th-2019, 06:16 AM
Last Post: Armin@netPI
  [SOLVED] WebConfig netpi-nodered-fieldbus JohnyD94 13 64 May-6th-2019, 12:20 AM
Last Post: JohnyD94
  New Container example "OPC UA server" Armin@netPI 0 16 April-12th-2019, 11:51 AM
Last Post: Armin@netPI
  Official Node-RED container Armin@netPI 0 17 April-5th-2019, 10:39 AM
Last Post: Armin@netPI
  [SOLVED] node-red Dashboard Docker Image for netPI? anrodriguez 1 23 February-7th-2019, 05:35 PM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)