onkelbeh / HomeAssistantRepository

:house_with_garden: Home Assistant on Gentoo Linux.
https://git.edevau.net/onkelbeh/HomeAssistantRepository
GNU General Public License v3.0
39 stars 14 forks source link

Nibe integration breaks due to missing sockio dependency? #195

Closed letharion closed 1 year ago

letharion commented 1 year ago

I'm having trouble getting the dev-python/nibe integration working. When trying to add an integration, this gets written to the logs:

    title, data = await validate_modbus_input(self.hass, user_input)
  File "/usr/lib/python3.9/site-packages/homeassistant/components/nibe_heatpump/config_flow.py", line 138, in validate_modbus_input
    connection = Modbus(
  File "/usr/lib/python3.9/site-packages/nibe/connection/modbus.py", line 69, in __init__
    self._client = modbus_for_url(url, conn_options)
  File "/usr/lib/python3.9/site-packages/async_modbus/core.py", line 271, in modbus_for_url
    stream = connio.connection_for_url(url, **conn_options)
  File "/usr/lib/python3.9/site-packages/connio/__init__.py", line 18, in connection_for_url
    from sockio import socket_for_url
ModuleNotFoundError: No module named 'sockio'

I was initially running python 3.10, but I noticed that sockio doesn't list python 3.10, so I figured maybe that was related. Downgraded to python 3.9, but I get the same error. Can't see a dependency in the ebuild, so maybe that's the problem?

I wondered if I should submit the issue to the HA queue instead, but I figured such a basic thing missing would have been noticed if it was in the main repo, and it might be an ebuild issue?

onkelbeh commented 1 year ago

Try installing dev-python/sockio manually, the dep should have been set from connio, but it is missing there.

letharion commented 1 year ago

Yeah, that actually worked fine, I copied another ebuild and very crudly made a sockio one, which solved my issue. Would opening a PR for this ebuild, along with an appropriate dependency in connio be appropriate?

onkelbeh commented 1 year ago

add it already some days ago: https://github.com/onkelbeh/HomeAssistantRepository/commit/0aa44bafdd9f54a67efb212325410e7bd54ce742