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

RuntimeError: Failed to add edge detection after update to HomeAssistantOS 12.3 #69

Open
ChrisHaPunkt opened this issue May 8, 2024 · 7 comments

Comments

@ChrisHaPunkt
Copy link

Version of the custom_component

0.0.5

Configuration

...
argon40:
...

Describe the bug

After updating to HomeAssistant OS 12.3 the integration fails to load.

Debug log


Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 404, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/argon40/__init__.py", line 71, in async_setup
    GPIO.add_event_detect(shutdown_pin, GPIO.BOTH, callback=event_detect_callback)
RuntimeError: Failed to add edge detection

@Misiu
Copy link
Owner

Misiu commented May 8, 2024

The edge detection was added to allow button double click support.
If you have the integration locally you can try to comment that line and check if it helps.
I don't have HA on PI4 to check the recent version. I'm waiting for a new PI to arrive.

@Misiu
Copy link
Owner

Misiu commented May 9, 2024

@ChrisHaPunkt any updates?
You can always create an issue in HAOS repo - https://github.com/home-assistant/operating-system/issues as the problem occurs after the update to 12.3

@Misiu
Copy link
Owner

Misiu commented May 9, 2024

home-assistant/operating-system#3353
thecode/ha-rpi_gpio#255
not only my integration has problems with HA OS 12.3

there is an alternative package for GPIO communication (https://github.com/waveform80/rpi-lgpio), but I think I'll remove the button support for now and wait for ha-rpi_gpio issue to be solved first (we can't have both old and new libraries installed at the same time)

@shawnheide
Copy link

@Misiu, I have an rpi 4 and commented the line you referenced and the integration loaded. Thanks also for the references to the underlying issues.

@IvansZuks
Copy link

@Misiu same for me. Commented out line 71 and integration loaded. RPI 4

@Misiu
Copy link
Owner

Misiu commented Jun 26, 2024

This is an issue with the latest version of HAOS.
Even popular GPIO integration has this problem: thecode/ha-rpi_gpio#255

Commenting the line is a workaround for now, I'll wait a bit more for a proper working solution with GPIO and then I'll fix the code

@maobuz
Copy link

maobuz commented Jul 2, 2024

HELP line 71 commented but the integration not detected
image
image
image

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

5 participants