bitfocus / companion-module-raspberry-gpio

MIT License
7 stars 0 forks source link

“GPIO is inaccessible” on current kernels #8

Closed scy closed 6 months ago

scy commented 1 year ago

Hi there!

At some point, the default permissions for /sys/class/gpio/export changed, and the file can no longer be opened for reading.

onoff (the library that this module is using to access the GPIO) in version 6.0.0 (as is currently requested in yarn.lock) tries to open the file for reading and writing to perform the accessible check. This fails, and the GPIO is (wrongly) reported as inaccessible, causing the module to become unavailable.

onoff 6.0.2, released ~ 1.5 years ago, contains a fix for this issue. Simply upgrading to ^6.0.2 should suffice to make it work again.