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

cover - ValueError: (22, 'Invalid argument') #345

Open
steflevert79 opened this issue Jan 22, 2025 · 0 comments
Open

cover - ValueError: (22, 'Invalid argument') #345

steflevert79 opened this issue Jan 22, 2025 · 0 comments

Comments

@steflevert79
Copy link

My HomeAssistant upgraded itself from an old build. I was not upgrading my HA for years since one on my other integration was causing issues. But yesterday it upgraded itself so I said... well let's face reality, I needed to upgrade. Anyways, I needed to go with ha-rpi_gpio to handle my garage door opener. Was working fine with the previous depreciated built-in integration.

My configuration.yaml file looks like this.

cover:
platform: rpi_gpio
relay_time: 1
invert_relay: false
state_pull_mode: 'UP'
invert_state: false
covers:
relay_pin: 15
state_pin: 17
name: 'porte_garage'

And the logs that I get is the following :

2025-01-21 22:12:06.113 DEBUG (MainThread) [custom_components.rpi_gpio] rpi_gpio integration starting. Version: 2024.12.2
2025-01-21 22:12:06.114 DEBUG (MainThread) [custom_components.rpi_gpio.hub] auto discovering gpio device
2025-01-21 22:12:06.114 DEBUG (MainThread) [custom_components.rpi_gpio.hub] verify_gpiochip: /dev/gpiochip0 is a gpiochip_device
2025-01-21 22:12:06.114 DEBUG (MainThread) [custom_components.rpi_gpio.hub] verify_gpiochip gpiodevice: /dev/gpiochip0 has pinctrl
2025-01-21 22:12:06.115 DEBUG (MainThread) [custom_components.rpi_gpio.hub] using gpio_device: /dev/gpiochip0
2025-01-21 22:12:06.116 DEBUG (MainThread) [custom_components.rpi_gpio.cover] setup_platform: {'platform': 'rpi_gpio', 'relay_time': 1, 'invert_relay': True, 'state_pull_mode': 'UP', 'invert_state': False, 'covers': [{'relay_pin': 15, 'state_pin': 17, 'name': 'porte_garage'}]}
2025-01-21 22:12:06.116 DEBUG (MainThread) [custom_components.rpi_gpio.cover] GPIODCover init: 15:17 - porte_garage - rpi_gpio_15_porte_garage - 1
2025-01-21 22:12:06.116 DEBUG (MainThread) [custom_components.rpi_gpio.hub] add_cover - relay_port: 15, state_port: 17
2025-01-21 22:12:06.116 DEBUG (MainThread) [custom_components.rpi_gpio.hub] add_switch - port: 15, active_low: True, bias: AS_IS, drive_mode: PUSH_PULL, init_state: False
2025-01-21 22:12:06.118 DEBUG (MainThread) [custom_components.rpi_gpio.hub] original port info:
2025-01-21 22:12:06.119 DEBUG (MainThread) [custom_components.rpi_gpio.hub] add_switch line_request:
2025-01-21 22:12:06.119 DEBUG (MainThread) [custom_components.rpi_gpio.hub] add_sensor - port: 17, active_low: False, bias: UP, debounce: 50
2025-01-21 22:12:06.120 DEBUG (MainThread) [custom_components.rpi_gpio.hub] original port info:
2025-01-21 22:12:06.121 ERROR (MainThread) [homeassistant.components.cover] Error while setting up rpi_gpio platform for cover
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 366, in async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/rpi_gpio/cover.py", line 75, in async_setup_platform
GPIODCover(
~~~~~~~~~~^
hub,
^^^^
...<9 lines>...
cover.get(CONF_UNIQUE_ID) or f"{DOMAIN}
{cover.get(CONF_RELAY_PIN)}{cover[CONF_NAME].lower().replace(' ', '')}",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/config/custom_components/rpi_gpio/cover.py", line 109, in init
self._relay_line, self._state_line, current_is_on = self._hub.add_cover(
~~~~~~~~~~~~~~~~~~~^
self._relay_port, self._relay_active_low, self._relay_bias, self._relay_drive,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
self._state_port, self._state_bias, self._state_active_low)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/rpi_gpio/hub.py", line 144, in add_cover
state_line, current_is_on = self.add_sensor(state_port, state_active_low, state_bias, 50)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/rpi_gpio/hub.py", line 126, in add_sensor
line_request = self._chip.request_lines(
consumer=DOMAIN,
...<5 lines>...
debounce_period = timedelta(milliseconds=debounce),
event_clock = Clock.REALTIME)})
File "/usr/local/lib/python3.13/site-packages/gpiod/chip.py", line 315, in request_lines
req_internal = self._chip.request_lines(line_cfg, consumer, event_buffer_size)
ValueError: (22, 'Invalid argument')

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

1 participant