Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run add-on error with GPIO 4 access #2

Open
prbreezy opened this issue Sep 8, 2024 · 2 comments
Open

Unable to run add-on error with GPIO 4 access #2

prbreezy opened this issue Sep 8, 2024 · 2 comments

Comments

@prbreezy
Copy link

prbreezy commented Sep 8, 2024

Hello, i'm having the below issue :

 Add-on: Pironman 5
 Pironman 5 support
-----------------------------------------------------------
 Add-on version: 1.0.2
 You are running the latest version of this add-on.
 System: Debian GNU/Linux 12 (bookworm)  (aarch64 / raspberrypi5-64)
 Home Assistant Core: 2024.9.1
 Home Assistant Supervisor: 2024.08.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[17:41:19] INFO: Configuring timezone (Asia/Singapore)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
Traceback (most recent call last):
  File "/opt/pironman5/venv/bin/pironman5-service", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/pironman5/venv/lib/python3.12/site-packages/pironman5/__init__.py", line 9, in main
    from pm_auto.ws2812 import RGB_STYLES
  File "/opt/pironman5/venv/lib/python3.12/site-packages/pm_auto/ws2812.py", line 5, in <module>
    import board
  File "/opt/pironman5/venv/lib/python3.12/site-packages/board.py", line 50, in <module>
    from adafruit_blinka.board.raspberrypi.raspi_5b import *
  File "/opt/pironman5/venv/lib/python3.12/site-packages/adafruit_blinka/board/raspberrypi/raspi_5b.py", line 6, in <module>
    from adafruit_blinka.microcontroller.bcm2712 import pin
  File "/opt/pironman5/venv/lib/python3.12/site-packages/adafruit_blinka/microcontroller/bcm2712/pin.py", line 8, in <module>
    D0 = Pin((4, 0))
         ^^^^^^^^^^^
  File "/opt/pironman5/venv/lib/python3.12/site-packages/adafruit_blinka/microcontroller/generic_linux/libgpiod/libgpiod_pin_1_x.py", line 32, in __init__
    self._chip = gpiod.chip(str(pin_id[0]), gpiod.chip.OPEN_BY_NUMBER)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/pironman5/venv/lib/python3.12/site-packages/gpiod/libgpiodcxx/__init__.py", line 105, in __init__
    self.open(device, how)
  File "/opt/pironman5/venv/lib/python3.12/site-packages/gpiod/libgpiodcxx/__init__.py", line 135, in open
    raise OSError(
OSError: [Errno 0] Success: 'cannot open GPIO device 4'
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-timezone: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-timezone successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

I've found this online

1

if your kernel version is higher than 6.6, you can't request GPIO pin with traditional pin number. The base gpio number is no longer pinned as doing so is deprecated in the kernel.

check the correct number of the required GPIO pin in /sys/kernel/debug/gpio

https://stackoverflow.com/questions/78452048/not-able-to-access-gpio-pins-on-my-raspberry-pi-5

Not sure if this is related.

@ad-cdavila
Copy link

@prbreezy Did you solve this issue? I started facing this issue after upgrading to Home Assistant OS 14

@seipekm
Copy link

seipekm commented Dec 5, 2024

get the same issue after upgrade HA OS 14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants