argon40 icon indicating copy to clipboard operation
argon40 copied to clipboard

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

Open ChrisHaPunkt opened this issue 1 year ago • 7 comments

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

ChrisHaPunkt avatar May 08 '24 17:05 ChrisHaPunkt

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 avatar May 08 '24 17:05 Misiu

@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 avatar May 09 '24 09:05 Misiu

https://github.com/home-assistant/operating-system/issues/3353 https://github.com/thecode/ha-rpi_gpio/issues/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)

Misiu avatar May 09 '24 09:05 Misiu

@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.

shawnheide avatar May 09 '24 16:05 shawnheide

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

IvansZuks avatar Jun 26 '24 12:06 IvansZuks

This is an issue with the latest version of HAOS. Even popular GPIO integration has this problem: https://github.com/thecode/ha-rpi_gpio/issues/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

Misiu avatar Jun 26 '24 12:06 Misiu

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

maobuz avatar Jul 02 '24 23:07 maobuz

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 31 '25 23:01 stale[bot]

Thanks @Misiu , would love to see an upstream solution in place instead of the (currenty working) workaround with the commented line.

ChrisHaPunkt avatar Feb 02 '25 08:02 ChrisHaPunkt

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 25 '25 01:04 stale[bot]