tadasdanielius / daikin_altherma

Daikin Altherma custom component for home assistant
MIT License
76 stars 6 forks source link

Integration fails when IP address changes #91

Closed dafmeuk closed 1 month ago

dafmeuk commented 7 months ago

For some reason, my Daikin system seems to get allocated a new IP address on my network every now and then (typically lasts a few weeks). When this happens, the sensors become unavailable, and after a restarting HA the integration then shows “Failed to set up”. The error log shows that it is trying to communicate to an IP address which I can tell is not responding to a ping. This has happened many times for me, and the solution is always to remove the integration, restart, and let it find the integration again. When this happens, it finds the new IP address no problem and it’s all back to normal and works perfectly fine again. However, I’d like to not have to do this every few weeks, and it would be better if it were able to recover itself in such a scenario.

Debug log below…

Logger: homeassistant.config_entries Source: config_entries.py:406 First occurred: 12:28:15 (1 occurrences) Last logged: 12:28:15

Error setting up entry Daikin HVAC controller (222xxxxxx) for daikin_altherma Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection raise exceptions[0] File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection sock = await self._connect_sock( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 628, in sock_connect return await fut ^^^^^^^^^ File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 668, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') OSError: [Errno 113] Connect call failed ('192.168.1.100', 80)

tadasdanielius commented 6 months ago

I would suggest to set static IP in the router but if it is not possible, then at this time, you can use "dirty hack" as described here

tip: if you are using nano then you can use ctrl + w to search for the word daikin.