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

All the entities became not available after 2 hours from installation #39

Open
Mancaado opened this issue Sep 21, 2022 · 16 comments
Open

Comments

@Mancaado
Copy link

Hi,
on my HA the integration work properly only for a couple of hours, then all the entities of my Daikin Altherma became "not available". I have to disinstall the integration from HA and add it again from HACS. How can I fix this problem?

@tadasdanielius
Copy link
Owner

Do you see any errors in log file?

@Mancaado
Copy link
Author

Mancaado commented Sep 21, 2022 via email

@Mancaado
Copy link
Author

Mancaado commented Sep 22, 2022 via email

@tadasdanielius
Copy link
Owner

Somehow, pictures got lost and does not appear here.
Do you run any other instance of HA or any other software which might "talk" to your device directly? At Least in my case LAN device allows only one connection, so if another software is connected then it could cause problems and entities become unavailable.

@Mancaado
Copy link
Author

Mancaado commented Sep 22, 2022 via email

@tadasdanielius
Copy link
Owner

Difficult to say without any logs but I would guess it might be because of those two reasons:

  1. Network issues between home assistant and daikin device
  2. Another process (like another instance of home assistant/other integration or any of process connecting to the device) is blocking the connection to the device.

Entities becomes unavailable if integration is unable to connect to the device. Does the entities become available later or you need to restart integration/home assistant to get it working again?

@Mancaado
Copy link
Author

Mancaado commented Sep 25, 2022 via email

@tadasdanielius
Copy link
Owner

Is is possible that your device gets different IP address after some period of time?

@Mancaado
Copy link
Author

Mancaado commented Sep 29, 2022 via email

@Mancaado
Copy link
Author

Mancaado commented Oct 9, 2022

Today even if i reload the integration, it doesn't work.
Here the registry log:
2022-10-08 09:28:15.464 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration daikin_altherma which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-10-08 09:28:24.249 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Daikin HVAC controller (211800239) for daikin_altherma
File "/config/custom_components/daikin_altherma/init.py", line 68, in async_setup_entry
File "/config/custom_components/daikin_altherma/init.py", line 33, in setup_api_instance
2022-10-08 11:49:16.278 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Daikin HVAC controller (211800239) for daikin_altherma
File "/config/custom_components/daikin_altherma/init.py", line 68, in async_setup_entry
File "/config/custom_components/daikin_altherma/init.py", line 33, in setup_api_instance
2022-10-08 11:49:30.998 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Daikin HVAC controller (211800239) for daikin_altherma
File "/config/custom_components/daikin_altherma/init.py", line 68, in async_setup_entry
File "/config/custom_components/daikin_altherma/init.py", line 33, in setup_api_instance
2022-10-08 11:50:15.862 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Daikin HVAC controller (211800239) for daikin_altherma
File "/config/custom_components/daikin_altherma/init.py", line 68, in async_setup_entry
File "/config/custom_components/daikin_altherma/init.py", line 33, in setup_api_instance
2022-10-09 11:47:04.182 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Daikin HVAC controller (211800239) for daikin_altherma
File "/config/custom_components/daikin_altherma/init.py", line 68, in async_setup_entry
File "/config/custom_components/daikin_altherma/init.py", line 33, in setup_api_instance
2022-10-09 14:33:08.470 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Daikin HVAC controller (211800239) for daikin_altherma
File "/config/custom_components/daikin_altherma/init.py", line 68, in async_setup_entry
File "/config/custom_components/daikin_altherma/init.py", line 33, in setup_api_instance

@tadasdanielius
Copy link
Owner

this is clearly related to IP change. I would suggest to set altherma device IP to static.

@Mancaado
Copy link
Author

Mancaado commented Oct 11, 2022 via email

@Mancaado
Copy link
Author

Mancaado commented Oct 11, 2022 via email

@mdkeil
Copy link

mdkeil commented Dec 1, 2023

I have similar problems since the heating season started.. I often have to restart the LAN Controller. Last season there wasn't any of this disconnects. Sometimes It only works for some few days.. sometimes for some weeks.

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.daikin_altherma
Source: custom_components/daikin_altherma/__init__.py:190
Integration: Daikin Altherma HVAC (documentation, issues)
First occurred: 19:51:55 (1 occurrences)
Last logged: 19:51:55

Failed to the get the data from the device [192.168.1.9] ()
Traceback (most recent call last):
  File "/config/custom_components/daikin_altherma/__init__.py", line 190, in async_update
    self._status = await self.device.get_current_state()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyaltherma/controllers.py", line 400, in get_current_state
    unit_status = await unit.get_current_state()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyaltherma/controllers.py", line 133, in get_current_state
    states = await self.read_states()
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyaltherma/controllers.py", line 79, in read_states
    results[state] = await self.read_state(state)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyaltherma/controllers.py", line 73, in read_state
    resp = await self.read(query_type='UnitStatus', prop=status)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyaltherma/controllers.py", line 49, in read
    result = await self._connection.request(destination)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyaltherma/comm.py", line 39, in request
    result = await self._request(dest, payload, wait_for_response, assert_response_fn)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyaltherma/comm.py", line 55, in _request
    response_str = await self._client.receive_str(timeout=self._timeout)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_ws.py", line 273, in receive_str
    msg = await self.receive(timeout)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_ws.py", line 229, in receive
    msg = await self._reader.read()
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/streams.py", line 657, in read
    return await super().read()
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
asyncio.exceptions.CancelledError

Reloading the Integration often didn't resolve the problem.

Logger: homeassistant.config_entries
Source: config_entries.py:402
First occurred: 22:45:13 (1 occurrences)
Last logged: 22:45:13

Error setting up entry Daikin HVAC controller (194300157) for daikin_altherma
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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.9', 80)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/daikin_altherma/__init__.py", line 68, in async_setup_entry
    hass.data[DOMAIN][entry.entry_id] = api = await setup_api_instance(
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/daikin_altherma/__init__.py", line 33, in setup_api_instance
    await device.discover_units()
  File "/usr/local/lib/python3.11/site-packages/pyaltherma/controllers.py", line 458, in discover_units
    resp_obj = await self._connection.request(dest)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyaltherma/comm.py", line 39, in request
    result = await self._request(dest, payload, wait_for_response, assert_response_fn)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyaltherma/comm.py", line 45, in _request
    await self.connect()
  File "/usr/local/lib/python3.11/site-packages/pyaltherma/comm.py", line 30, in connect
    self._client = await self._session.ws_connect(self.ws_address)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 779, in _ws_connect
    resp = await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 536, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 540, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 901, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1209, in _create_direct_connection
    raise last_exc
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1178, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 988, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.1.9:80 ssl:default [Connect call failed ('192.168.1.9', 80)]

Device: Altherma 3 Geo with LAN Controller BRP069A61, Homeassistent 2023.11.3

@mdkeil
Copy link

mdkeil commented Feb 20, 2024

update: My problem was solved after I configured a static IP on the LAN controller.

@mdkeil
Copy link

mdkeil commented Aug 30, 2024

update: My problem was solved after I configured a static IP on the LAN controller.

Second problem was a faulty network-patch-cable. x)

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

3 participants