OpenHab Raspberry Pi Exception: /sys/class/gpio/gpio27/active_low

I am trying to setup OpenHab for the first time on the Raspberry Pi. The web interface loads find and I have started creating by sitemap and items files. However, I cannot get OpenHab to control a pin. I have added the io and binding gpio addons to the addons folder and added the ‘openhab’ user to the ‘gpio’ group. But checking the logs I get the following error message:

Error occured while creating backend object for item Greenhouse_Fan, exception: /sys/class/gpio/gpio27/active_low

Any ideas?

1 Like

When the error appeared, do a
ll /sys/class/gpio/gpio27

If you see that everything belongs to root:root then…

sudo nano /etc/udev/rules.d/80-gpio-noroot.rules

Paste this into the file and save:

# /etc/udev/rules.d/80-gpio-noroot.rules
# Zugriff auf GPIO ohne root-Rechte ermoeglichen
# Gruppe aendern
SUBSYSTEM=="gpio", PROGRAM="/bin/sh -c '/bin/chown -R root:gpio /sys/devices/platform/soc/*.gpio/gpio'"
# Zugriffsrechte setzen
SUBSYSTEM=="gpio", PROGRAM="/bin/sh -c '/bin/chmod -R ug+rw /sys/devices/platform/soc/*.gpio/gpio'"


That helped me, i got it from here ->

I am having the same issue with gpio pin 17 from time to time.
When this happens i am unable to set the value for the pin even as root get “echo: write error: Operation not permitted”.
And the permissions are correctly set.