tadasdanielius / daikin_altherma

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

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

Open Mancaado opened 2 years ago

Mancaado commented 2 years ago

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 commented 2 years ago

Do you see any errors in log file?

Mancaado commented 2 years ago

I just restore the integration and now is working. Unfortunately I didn't save the log so I don't remember the error that was reported in the log. As soon as the integration stop working I will copy the log and I revert to you. Thanks in advance for your support

Il giorno mer 21 set 2022 alle ore 16:05 Tadas Danielius < @.***> ha scritto:

Do you see any errors in log file?

— Reply to this email directly, view it on GitHub https://github.com/tadasdanielius/daikin_altherma/issues/39#issuecomment-1253762266, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZDGTSCGK7Q76LE2UJSQLDDV7MI2PANCNFSM6AAAAAAQR6444Y . You are receiving this because you authored the thread.Message ID: @.***>

Mancaado commented 2 years ago

No errors in log file. Almost all the entities became unavailable after a couple of hours, as per attached pictures.

[image: image.png] In detail, if I click on an entity appear the following [image: image.png] Just now I tried to reload the integration from the menù and everything start working again.

Il giorno mer 21 set 2022 alle ore 16:05 Tadas Danielius < @.***> ha scritto:

Do you see any errors in log file?

— Reply to this email directly, view it on GitHub https://github.com/tadasdanielius/daikin_altherma/issues/39#issuecomment-1253762266, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZDGTSCGK7Q76LE2UJSQLDDV7MI2PANCNFSM6AAAAAAQR6444Y . You are receiving this because you authored the thread.Message ID: @.***>

tadasdanielius commented 2 years ago

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 commented 2 years ago

No. The entities became unavailable in the meanwhile I was driving from work to home therefore I couldn't run any app or instance. The pictures simply showed that around 17:30 (italy local time) every the entities became unavailable with the only exception of the entity of the outgoing water temperature

Il giorno gio 22 set 2022 alle ore 09:07 Tadas Danielius < @.***> ha scritto:

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.

— Reply to this email directly, view it on GitHub https://github.com/tadasdanielius/daikin_altherma/issues/39#issuecomment-1254616399, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZDGTSDPKSNWYKLHHFCRU53V7QARVANCNFSM6AAAAAAQR6444Y . You are receiving this because you authored the thread.Message ID: @.***>

tadasdanielius commented 2 years ago

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 commented 2 years ago

I checked the log. No error. To have the entities working again I have to reload the integration. I don’t have any automation that includes any entities of the heat pump. Adolfo MancanelliIl giorno 24 set 2022, alle ore 14:09, Tadas Danielius @.***> ha scritto: Difficult to say without any logs but I would guess it might be because of those two reasons:

Network issues between home assistant and daikin device 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?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

tadasdanielius commented 2 years ago

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

Mancaado commented 2 years ago

Yes but not every two hours (normally after a modem restart). There is un update, after disinstallations, reloads, etc during these days: now it seems that the entities remain always available but the values they show say there is not updating. Sorry for my english, what I mean is that, for example, the outdoor temperature value is available but show always the same figure (night and day). To have the current real figure I have to reload the integration. After that I see the right figures. I have to do this every time.

Il giorno gio 29 set 2022 alle ore 08:49 Tadas Danielius < @.***> ha scritto:

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

— Reply to this email directly, view it on GitHub https://github.com/tadasdanielius/daikin_altherma/issues/39#issuecomment-1261842391, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZDGTSHREL5GMMLYQKPGJ63WAU3YNANCNFSM6AAAAAAQR6444Y . You are receiving this because you authored the thread.Message ID: @.***>

Mancaado commented 2 years ago

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 commented 2 years ago

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

Mancaado commented 2 years ago

Ok, thanks a lot

Il giorno mar 11 ott 2022 alle ore 08:42 Tadas Danielius < @.***> ha scritto:

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

— Reply to this email directly, view it on GitHub https://github.com/tadasdanielius/daikin_altherma/issues/39#issuecomment-1274159201, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZDGTSA6QP5MADOZW4U5W6LWCUD3RANCNFSM6AAAAAAQR6444Y . You are receiving this because you authored the thread.Message ID: @.***>

Mancaado commented 2 years ago

I noted that if I reload the integration in HA, all the entities start working again. This morning I have done in this way since as usual all the entities was unavailable

Il giorno gio 22 set 2022 alle ore 09:07 Tadas Danielius < @.***> ha scritto:

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.

— Reply to this email directly, view it on GitHub https://github.com/tadasdanielius/daikin_altherma/issues/39#issuecomment-1254616399, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZDGTSDPKSNWYKLHHFCRU53V7QARVANCNFSM6AAAAAAQR6444Y . You are receiving this because you authored the thread.Message ID: @.***>

mdkeil commented 12 months ago

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 commented 9 months ago

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

mdkeil commented 3 months ago

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

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