BenPru / luxtronik

Luxtronik integration for Home Assistant
MIT License
66 stars 23 forks source link

Auto discovery failure #220

Open lancer73 opened 6 months ago

lancer73 commented 6 months ago

I configured this integration successfully, but I had to do a manual installation.

The heat pump (Alpha Innotec LWDV-91) is not discovered and in the logs I find these error messages:

2023-12-22 12:18:11.040 ERROR (MainThread) [custom_components.luxtronik2] Could not handle config_flow.async_step_dhcp DhcpServiceInfo(ip='192.168.107.109', hostname='', macaddress='0009822099a4')
Traceback (most recent call last):
File "/config/custom_components/luxtronik2/config_flow.py", line 256, in async_step_dhcp
broadcast_discover_ip, broadcast_discover_port = discover()[0]
~~~~~~~~~~^^^
IndexError: list index out of range
2023-12-22 12:18:12.023 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/discovery_flow.py", line 96, in _async_start
await gather_with_limited_concurrency(
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 187, in gather_with_limited_concurrency
return await gather(
^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 185, in sem_task
return await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 880, in async_init
flow, result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 908, in _async_init
result = await self._async_handle_step(flow, flow.init_step, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 396, in _async_handle_step
if result.get("preview") is not None:
^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
2023-12-22 12:18:15.715 ERROR (MainThread) [homeassistant.components.homeassistant_alerts] Timeout fetching homeassistant_alerts data

My home assistant installation has three network interfaces, one primary and two VLAN interfaces. The Heatpump can be reached via one of the VLAN interfaces.

Integration functions normally, but after each restart of HA the error message appears again.

BenPru commented 6 months ago

Is the VLAN while startup available? Perhaps the same problem as #216

lancer73 commented 6 months ago

Yes, VLAN was available at the moment of the error log (it's the IoT VLAN, if it is not there half of the integrations would not start)

I think this one is different from #216. I tried if this is related to the interface used for multicast traffic (in HA network settings), but even with the multicast interface set to the IoT VLAN the error appears.

I have setback fixed IP on the Heatpump (it doesn't use DHCP) and defined a fixed IP in the DHCP list of the router (with a different hostname). Could that be of influence?