RuntimeError: Failed to add edge detection after update to HomeAssistantOS 12.3
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
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.
@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
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, I have an rpi 4 and commented the line you referenced and the integration loaded. Thanks also for the references to the underlying issues.
@Misiu same for me. Commented out line 71 and integration loaded. RPI 4
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
HELP line 71 commented but the integration not detected
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.
Thanks @Misiu , would love to see an upstream solution in place instead of the (currenty working) workaround with the commented line.
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.