Latest version of PiOS has broken LED control
ebaauw opened this issue · 7 comments
The latest PiOS kernel 6.1.19-v8+ #1637 (both 32-bit and 64-bit) has renamed the file to control the power LED to /sys/class/leds/PWR/brightness
from /sys/class/leds/led1/brightness
.
Consequently, Homebridge RPi and rpi
can no longer retrieve nor control the power LED. On the local Pi, you'll see the following error:
[Mar 18 10:50:21] [RPi] pi4: warning: heartbeat error: /sys/class/leds/led1/brightness: cannot open: ENOENT no such file or directory
For a remote Pi, the LED will silently be reported as off. You will see an error, when trying to change the LED:
[Mar 18 10:04:05] [RPi] pi1 Power LED: On: changed to true (from false)
[Mar 18 10:04:05] [RPi] pi1 Power LED: On: warning: set: FO (104): no permission to access file (-137)
While the fix is easy enough, it needs to be applied to Raspberry Pi being monitored remotely by Homebridge RPi, as it involves updating both /opt/pigpio/access
and /opt/pigpio/cgi/getState
.
Fixed in v1.8.0.
In your README you specify; "This script needs to be installed to /opt/pigpio/cgi/getState" and "/opt/pigpio/access"
but now you speak about "/opt/pigpiod/..." . This last directory is also not on my system.
Typo, sorry.
Sorry I steel have this issue . How to correct it ? I have change sudo sh -c 'cat - > /opt/pigpio/access' <<+
/sys/class/leds/PWR/brightness w
- to sudo sh -c 'cat - > /opt/pigpio/access' <<+
/sys/class/leds/led1/brightness w
After executing rip info on my local raspberry i steel have the same error
Are you on the latest PiOS kernel? In that case, you need to specify the PWR
file, not the led1
file. If not, you need Homebridge RPi before v1.8.0 (or update PiOS and reboot).