Osmc gpio problem


Hi, I have been using node-red on a pi with osmc installed for quit a while without problem, however I now want to use the gpio nodes in a flow, I know node-red is not designed specifically to run on osmc but all my other flows work fine.

When I try to use a gpio node says Stopped and if I initiate the node it says not running I get [error] [rpi-gpio out:7ed8bdf2.dd8014] nrpgio python command not running in the console.

I can successfully run a python script from the commend line with sudo ./test.py it contains the following code

#!/usr/bin/env python
import RPi.GPIO as GPIO
import time

GPIO.setup(24, GPIO.OUT)
GPIO.output(24, GPIO.HIGH)

For info .

Welcome to Node-RED

18 Feb 17:53:24 - [info] Node-RED version: v0.19.5
18 Feb 17:53:24 - [info] Node.js version: v10.15.1
18 Feb 17:53:24 - [info] Linux 4.14.78-4-osmc arm LE
18 Feb 17:53:25 - [info] Loading palette nodes
18 Feb 17:53:30 - [info] Settings file : /home/osmc/.node-red/settings.js
18 Feb 17:53:30 - [info] Context store : 'default' [module=memory]
18 Feb 17:53:30 - [info] User directory : /home/osmc/.node-red
18 Feb 17:53:30 - [warn] Projects disabled : editorTheme.projects.enabled=false
18 Feb 17:53:30 - [info] Flows file : /home/osmc/.node-red/flows_osmc.json

osmc@osmc:~$ groups (returns)
osmc adm disk lp dialout cdrom audio video gpio i2c

osmc@osmc:~$ python --version (returns)
Python 2.7.13

I have added the following but they do not help.
sudo adduser $USER gpio
and NodeREDusername ALL=(ALL) NOPASSWD: /usr/bin/python to visudo

Anyone any ideas what I could try to get this working ?



Solved ,

OSMC GPIO ACCESS for anyone following here are the steps.

sudo su
apt-get update
apt-get install build-essential
export ARCH=arm
export CROSS_COMPILE=/usr/bin/
apt-get install python-pip python-dev gcc
apt-get install python-setuptools
pip install wheel
pip install rpi.gpio

See Successfully installed rpi.gpio-0.6.5

Create file and paste in the following code

nano /etc/udev/rules.d/50-gpio.rules
SUBSYSTEM=="input", GROUP="input", MODE="0660"
SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660"

SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660"

SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c '\

chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\

chown -R root:gpio /sys/devices/virtual/gpio && chmod -R 770 /sys/devic$

chown -R root:gpio /sys$devpath && chmod -R 770 /sys$devpath\'"

Save and exit

Enter following cmds

groupadd gpio

adduser “$USER” gpio

To revert back from sudo su



Now attempting to get i2c working.