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

Control of Trådfri Bulbs fails while sensor is working fine #97

Closed
maste9 opened this issue Oct 23, 2024 · 3 comments
Closed

Control of Trådfri Bulbs fails while sensor is working fine #97

maste9 opened this issue Oct 23, 2024 · 3 comments

Comments

@maste9
Copy link

maste9 commented Oct 23, 2024

Hi,

I'm gladly using your integration since last weekend, when I received my Dirigera, two trådfri bulbs and a parasoll sensor.

Everything works fine in the IKEA Home smart app. And your integration shows successfully the four devices and five entities - at least if I reload the integration once after every reboot of HA.

Unfortunately while the door sensor works as expected - turning on/off my heating when opening/closing the balcony door - the two bulbs in my bath aren't controllable via the integration i.e. any button or skript.

Instead of working like in the IKEA app I receive an immediate error message on top of the HA UI that the maximum tries to connect to the devices is reached.

The logs say ...

2024-10-23 07:01:47.462 ERROR (SyncWorker_25) [custom_components.dirigera_platform] error encountered running update on : Badspiegel
2024-10-23 07:01:47.463 ERROR (SyncWorker_25) [custom_components.dirigera_platform] HTTPSConnectionPool(host='192.168.2.34', port=8443): Max retries exceeded with url: /v1/devices/set/77588596-a535-4727-ba06-727543b0188d?deviceType=light (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7b6a0f722720>: Failed to establish a new connection: [Errno 111] Connection refused'))
2024-10-23 07:01:47.464 ERROR (MainThread) [custom_components.dirigera_platform] error encountered turning off device_set : Badspiegel
2024-10-23 07:01:47.464 ERROR (MainThread) [custom_components.dirigera_platform] (ConnectionError(MaxRetryError("HTTPSConnectionPool(host='192.168.2.34', port=8443): Max retries exceeded with url: /v1/devices/set/77588596-a535-4727-ba06-727543b0188d?deviceType=light (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7b6a0f722720>: Failed to establish a new connection: [Errno 111] Connection refused'))")), 'dirigera_platform', 'hub_exception')
2024-10-23 07:01:47.464 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [135695516738768] Unexpected exception
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/usr/local/lib/python3.12/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 716, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 404, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1061, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 363, in connect
self.sock = conn = self._new_conn()
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7b6a0f722720>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 802, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/util/retry.py", line 594, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.2.34', port=8443): Max retries exceeded with url: /v1/devices/set/77588596-a535-4727-ba06-727543b0188d?deviceType=light (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7b6a0f722720>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/dirigera_platform/light.py", line 439, in patch_command
self._hub.patch(self._patch_url, data=data)
File "/usr/local/lib/python3.12/site-packages/dirigera/hub/hub.py", line 101, in patch
response = requests.patch(
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 145, in patch
return request("patch", url, data=data, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 700, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192.168.2.34', port=8443): Max retries exceeded with url: /v1/devices/set/77588596-a535-4727-ba06-727543b0188d?deviceType=light (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7b6a0f722720>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/dirigera_platform/light.py", line 497, in async_turn_off
await self.hass.async_add_executor_job(self.patch_command, {"isOn": False})
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dirigera_platform/light.py", line 443, in patch_command
raise HomeAssistantError(ex, DOMAIN, "hub_exception")
homeassistant.exceptions.HomeAssistantError: (ConnectionError(MaxRetryError("HTTPSConnectionPool(host='192.168.2.34', port=8443): Max retries exceeded with url: /v1/devices/set/77588596-a535-4727-ba06-727543b0188d?deviceType=light (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7b6a0f722720>: Failed to establish a new connection: [Errno 111] Connection refused'))")), 'dirigera_platform', 'hub_exception')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 996, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1068, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 637, in async_handle_light_off_service
await light.async_turn_off(**filter_turn_off_params(light, params))
File "/config/custom_components/dirigera_platform/light.py", line 501, in async_turn_off
raise HomeAssistantError(ex, DOMAIN, "hub_exception")
homeassistant.exceptions.HomeAssistantError: (HomeAssistantError(ConnectionError(MaxRetryError("HTTPSConnectionPool(host='192.168.2.34', port=8443): Max retries exceeded with url: /v1/devices/set/77588596-a535-4727-ba06-727543b0188d?deviceType=light (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7b6a0f722720>: Failed to establish a new connection: [Errno 111] Connection refused'))")), 'dirigera_platform', 'hub_exception'), 'dirigera_platform', 'hub_exception')
2024-10-23 07:01:48.309 ERROR (MainThread) [custom_components.dirigera_platform] error encountered running update on : Sensor Balkontür
2024-10-23 07:01:48.309 ERROR (MainThread) [custom_components.dirigera_platform] HTTPSConnectionPool(host='192.168.2.34', port=8443): Max retries exceeded with url: /v1/devices/4033e437-27b6-4b28-b2ee-e703afab2421_1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7b6a0f722630>: Failed to establish a new connection: [Errno 111] Connection refused'))
2024-10-23 07:01:48.310 ERROR (MainThread) [homeassistant.helpers.entity] Update for binary_sensor.sensor_balkontur fails
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/usr/local/lib/python3.12/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 716, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 404, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1061, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 363, in connect
self.sock = conn = self._new_conn()
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7b6a0f722630>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 802, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/util/retry.py", line 594, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.2.34', port=8443): Max retries exceeded with url: /v1/devices/4033e437-27b6-4b28-b2ee-e703afab2421_1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7b6a0f722630>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/dirigera_platform/base_classes.py", line 89, in async_update
self._json_data = await self._hass.async_add_executor_job(self._get_by_id_fx, self._json_data.id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dirigera/hub/hub.py", line 273, in get_open_close_by_id
open_close_sensor = self._get_device_data_by_id(id_)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dirigera/hub/hub.py", line 158, in _get_device_data_by_id
return self.get("/devices/" + id_)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dirigera/hub/hub.py", line 112, in get
response = requests.get(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 700, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192.168.2.34', port=8443): Max retries exceeded with url: /v1/devices/4033e437-27b6-4b28-b2ee-e703afab2421_1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7b6a0f722630>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 942, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1300, in async_device_update
await self.async_update()
File "/config/custom_components/dirigera_platform/base_classes.py", line 157, in async_update
await self._device.async_update()
File "/config/custom_components/dirigera_platform/base_classes.py", line 93, in async_update
raise HomeAssistantError(ex, DOMAIN, "hub_exception")
homeassistant.exceptions.HomeAssistantError: (ConnectionError(MaxRetryError("HTTPSConnectionPool(host='192.168.2.34', port=8443): Max retries exceeded with url: /v1/devices/4033e437-27b6-4b28-b2ee-e703afab2421_1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7b6a0f722630>: Failed to establish a new connection: [Errno 111] Connection refused'))")), 'dirigera_platform', 'hub_exception')
2024-10-23 07:01:48.321 ERROR (MainThread) [custom_components.dirigera_platform] error encountered running update on : Sensor Balkontür
2024-10-23 07:01:48.321 ERROR (MainThread) [custom_components.dirigera_platform] HTTPSConnectionPool(host='192.168.2.34', port=8443): Max retries exceeded with url: /v1/devices/4033e437-27b6-4b28-b2ee-e703afab2421_1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7b6a0f7164b0>: Failed to establish a new connection: [Errno 111] Connection refused'))
2024-10-23 07:01:48.322 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.battery_percentage fails
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/usr/local/lib/python3.12/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 716, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 404, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1061, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 363, in connect
self.sock = conn = self._new_conn()
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7b6a0f7164b0>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 802, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/util/retry.py", line 594, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.2.34', port=8443): Max retries exceeded with url: /v1/devices/4033e437-27b6-4b28-b2ee-e703afab2421_1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7b6a0f7164b0>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/dirigera_platform/base_classes.py", line 89, in async_update
self._json_data = await self._hass.async_add_executor_job(self._get_by_id_fx, self._json_data.id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dirigera/hub/hub.py", line 273, in get_open_close_by_id
open_close_sensor = self._get_device_data_by_id(id_)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dirigera/hub/hub.py", line 158, in _get_device_data_by_id
return self.get("/devices/" + id_)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dirigera/hub/hub.py", line 112, in get
response = requests.get(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 700, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192.168.2.34', port=8443): Max retries exceeded with url: /v1/devices/4033e437-27b6-4b28-b2ee-e703afab2421_1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7b6a0f7164b0>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 942, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1300, in async_device_update
await self.async_update()
File "/config/custom_components/dirigera_platform/base_classes.py", line 157, in async_update
await self._device.async_update()
File "/config/custom_components/dirigera_platform/base_classes.py", line 93, in async_update
raise HomeAssistantError(ex, DOMAIN, "hub_exception")
homeassistant.exceptions.HomeAssistantError: (ConnectionError(MaxRetryError("HTTPSConnectionPool(host='192.168.2.34', port=8443): Max retries exceeded with url: /v1/devices/4033e437-27b6-4b28-b2ee-e703afab2421_1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7b6a0f7164b0>: Failed to establish a new connection: [Errno 111] Connection refused'))")), 'dirigera_platform', 'hub_exception')
2024-10-23 07:01:48.604 ERROR (Thread-2) [websocket] Connection to remote host was lost. - goodbye
2024-10-23 07:01:48.604 WARNING (Thread-2) [custom_components.dirigera_platform] Failed to create listener or listener exited, will sleep 10 seconds before retrying

As far as I understand the log the integration tries to contact my dirigera hub at 192.168.2.34 at port 8443 and fails with that. Which is odd as my door sensor is meanwhile working fine and obviously connecting successfully with the hub.

Maybe you get an idea from the logs if I misconfigured s.th. or if it's the integration to blame 🙂

Thanks for your efforts,

Homer

@sanjoyg
Copy link
Owner

sanjoyg commented Oct 24, 2024

Can you dump json for me. Looks like its a device set issue

@maste9
Copy link
Author

maste9 commented Oct 24, 2024

EDIT: Maybe wait with bothering - I maybe found my mistake. I didn't put the ethernet cable directly into the router but into a switch that's connected with it. After I changed that now at least for the moment my buttons work. Hope that fixes it for me. Otherwise I'll let you know.

EDIT 2: Nope. It doesn't last longer than 20min. Then HA can't reach the Hub anymore. Maybe the same error as #57 (comment) ?


Btw the same error I reported about the bulbs happens with my new power plug TRETAKT.

2024-10-24 23:21:34.705 INFO (SyncWorker_0) [custom_components.dirigera_platform] === START Devices JSON ===
2024-10-24 23:21:34.705 INFO (SyncWorker_0) [custom_components.dirigera_platform] --------------
2024-10-24 23:21:34.994 INFO (SyncWorker_0) [custom_components.dirigera_platform] [{'id': 'fc9af443-d3e2-40cf-a33c-d7aaa9788d81_1', 'relationId': 'fc9af443-d3e2-40cf-a33c-d7aaa9788d81', 'type': 'gateway', 'deviceType': 'gateway', 'createdAt': '2024-10-21T05:14:47.925Z', 'isReachable': True, 'lastSeen': '2024-10-24T21:21:00.362Z', 'attributes': {'customName': 'Zuhause', 'model': 'DIRIGERA Hub for smart products', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.660.5', 'hardwareVersion': 'P2.5', 'serialNumber': 'fc9af443-d3e2-40cf-a33c-d7aaa9788d81', 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoDownload', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00', 'permittingJoin': False, 'backendConnected': False, 'backendConnectionPersistent': False, 'backendOnboardingComplete': True, 'backendRegion': 'eu-central-1', 'backendCountryCode': 'DE', 'userConsents': [{'name': 'analytics', 'value': 'disabled'}, {'name': 'diagnostics', 'value': 'enabled'}], 'logLevel': 3, 'coredump': False, 'timezone': 'Europe/Berlin', 'nextSunSet': '2024-10-25T16:16:00.000Z', 'nextSunRise': '2024-10-25T06:13:00.000Z', 'homestate': 'home', 'countryCode': 'XZ', 'coordinates': {'latitude': 51.98198198198198, 'longitude': 7.63538244549164, 'accuracy': -1}, 'isOn': False}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'permittingJoin', 'userConsents', 'logLevel', 'time', 'timezone', 'countryCode', 'coordinates']}, 'deviceSet': [], 'remoteLinks': []}, {'id': '4033e437-27b6-4b28-b2ee-e703afab2421_1', 'type': 'sensor', 'deviceType': 'openCloseSensor', 'createdAt': '2024-10-21T05:20:30.000Z', 'isReachable': True, 'lastSeen': '2024-10-24T21:04:18.000Z', 'customIcon': 'placement_door', 'attributes': {'customName': 'Sensor Balkontür', 'model': 'PARASOLL Door/Window Sensor', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '1.0.19', 'hardwareVersion': '1', 'serialNumber': '583BC2FFFE015941', 'productCode': 'E2013', 'batteryPercentage': 100, 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'isOpen': False, 'permittingJoin': False}, 'capabilities': {'canSend': [], 'canReceive': ['customName']}, 'room': {'id': 'e587a304-7092-44fd-94f4-c9275dec12a5', 'name': 'Wohnzimmer', 'color': 'ikea_green_no_65', 'icon': 'rooms_sofa'}, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False}, {'id': '410b6e27-d820-46ea-ab87-d74f3fb15c91_1', 'type': 'outlet', 'deviceType': 'outlet', 'createdAt': '2024-10-24T19:55:20.000Z', 'isReachable': True, 'lastSeen': '2024-10-24T21:04:24.000Z', 'attributes': {'customName': 'Steckdose Schreibtisch', 'model': 'TRETAKT Smart plug', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.4.4', 'hardwareVersion': '1', 'serialNumber': 'ECF64CFFFEF295C1', 'productCode': 'E2204', 'isOn': False, 'startupOnOff': 'startPrevious', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'childLock': False, 'statusLight': True, 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'childLock', 'statusLight']}, 'room': {'id': 'e587a304-7092-44fd-94f4-c9275dec12a5', 'name': 'Wohnzimmer', 'color': 'ikea_green_no_65', 'icon': 'rooms_sofa'}, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False}, {'id': '68c4d346-d79b-4d10-895b-74561d51dada_1', 'type': 'sensor', 'deviceType': 'openCloseSensor', 'createdAt': '2024-10-24T17:05:47.000Z', 'isReachable': True, 'lastSeen': '2024-10-24T21:04:17.000Z', 'customIcon': 'placement_door', 'attributes': {'customName': 'Balkontür Schlafzimmer ', 'model': 'PARASOLL Door/Window Sensor', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '1.0.19', 'hardwareVersion': '1', 'serialNumber': '583BC2FFFE017BDA', 'productCode': 'E2013', 'batteryPercentage': 100, 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'isOpen': False, 'permittingJoin': False}, 'capabilities': {'canSend': [], 'canReceive': ['customName']}, 'room': {'id': '497845c4-2971-448d-91d9-0e84ff580338', 'name': 'Schlafzimmer', 'color': 'ikea_blue_no_63', 'icon': 'rooms_bed'}, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False}, {'id': 'a41ed4ed-c1af-43ee-a32f-60d18718f714_1', 'relationId': 'a41ed4ed-c1af-43ee-a32f-60d18718f714', 'type': 'sensor', 'deviceType': 'motionSensor', 'createdAt': '2024-10-24T17:12:01.000Z', 'isReachable': True, 'lastSeen': '2024-10-24T21:20:53.000Z', 'attributes': {'customName': 'Bewegungssensor', 'model': 'VALLHORN Wireless Motion Sensor', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '1.0.64', 'hardwareVersion': '1', 'serialNumber': '8C65A3FFFE3D8F97', 'productCode': 'E2134', 'batteryPercentage': 100, 'isOn': False, 'motionDetectedDelay': 20, 'isDetected': True, 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'sensorConfig': {'scheduleOn': True, 'onDuration': 180, 'schedule': {'onCondition': {'time': 'sunset'}, 'offCondition': {'time': 'sunrise'}}}, 'circadianPresets': []}, 'capabilities': {'canSend': [], 'canReceive': ['customName']}, 'room': {'id': '497845c4-2971-448d-91d9-0e84ff580338', 'name': 'Schlafzimmer', 'color': 'ikea_blue_no_63', 'icon': 'rooms_bed'}, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False}, {'id': 'a41ed4ed-c1af-43ee-a32f-60d18718f714_3', 'relationId': 'a41ed4ed-c1af-43ee-a32f-60d18718f714', 'type': 'unknown', 'deviceType': 'lightSensor', 'createdAt': '2024-10-24T17:12:01.000Z', 'isReachable': True, 'lastSeen': '2024-10-24T21:20:53.000Z', 'attributes': {'customName': '', 'model': 'VALLHORN Wireless Motion Sensor', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '1.0.64', 'hardwareVersion': '1', 'serialNumber': '8C65A3FFFE3D8F97', 'productCode': 'E2134', 'illuminance': 1, 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False}, 'capabilities': {'canSend': [], 'canReceive': ['customName']}, 'deviceSet': [], 'remoteLinks': [], 'isHidden': False}, {'id': 'd78527cd-ccfc-47b2-8ec2-0a0a16d30f08_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-10-21T18:51:03.000Z', 'isReachable': True, 'lastSeen': '2024-10-24T21:07:42.000Z', 'attributes': {'customName': 'Licht 2', 'model': 'TRADFRI bulb E14 WS candle 470lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '3.0.21', 'hardwareVersion': '1', 'serialNumber': 'A46DD4FFFE4D7A0F', 'productCode': 'LED2107C4', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 81, 'startUpCurrentLevel': -1, 'colorTemperature': 3802, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': 'cb79edf9-b2bf-4aa0-b292-6fa568a0592d', 'name': 'Badezimmer', 'color': 'ikea_yellow_no_31', 'icon': 'rooms_bathtub'}, 'deviceSet': [{'id': '77588596-a535-4727-ba06-727543b0188d', 'name': 'Badspiegel ', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False, 'adaptiveProfile': {}}, {'id': 'e2da01d6-b319-4823-b1ca-18689f9e8428_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-10-21T18:52:40.000Z', 'isReachable': True, 'lastSeen': '2024-10-24T21:08:21.000Z', 'attributes': {'customName': 'Licht 1', 'model': 'TRADFRI bulb E14 WS candle 470lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '3.0.21', 'hardwareVersion': '1', 'serialNumber': 'B43522FFFEEEBCAC', 'productCode': 'LED2107C4', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 81, 'startUpCurrentLevel': -1, 'colorTemperature': 3802, 'colorTemperatureMin': 4000, 'colorTemperatureMax': 2202, 'startupTemperature': -1, 'colorMode': 'temperature', 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'permittingJoin': False, 'otaStatus': 'upToDate', 'otaState': 'readyToCheck', 'otaProgress': 0, 'otaPolicy': 'autoUpdate', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00'}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'isOn', 'lightLevel', 'colorTemperature']}, 'room': {'id': 'cb79edf9-b2bf-4aa0-b292-6fa568a0592d', 'name': 'Badezimmer', 'color': 'ikea_yellow_no_31', 'icon': 'rooms_bathtub'}, 'deviceSet': [{'id': '77588596-a535-4727-ba06-727543b0188d', 'name': 'Badspiegel ', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False, 'adaptiveProfile': {}}]
2024-10-24 23:21:34.995 INFO (SyncWorker_0) [custom_components.dirigera_platform] --------------
2024-10-24 23:21:42.396 INFO (SyncWorker_46) [pyfritzhome.fritzhome] Updating Devices ...
2024-10-24 23:21:42.419 DEBUG (MainThread) [custom_components.dirigera_platform] update called Steckdose Schreibtisch
2024-10-24 23:21:42.424 DEBUG (MainThread) [custom_components.dirigera_platform] update called Bewegungssensor
2024-10-24 23:21:42.424 DEBUG (MainThread) [custom_components.dirigera_platform] update called Sensor Balkontür
2024-10-24 23:21:42.424 DEBUG (MainThread) [custom_components.dirigera_platform] update called Balkontür Schlafzimmer
2024-10-24 23:21:42.444 DEBUG (MainThread) [custom_components.dirigera_platform] update called Bewegungssensor
2024-10-24 23:21:42.444 DEBUG (MainThread) [custom_components.dirigera_platform] update called Sensor Balkontür
2024-10-24 23:21:42.445 DEBUG (MainThread) [custom_components.dirigera_platform] update called Balkontür Schlafzimmer
2024-10-24 23:21:42.527 INFO (SyncWorker_46) [pyfritzhome.fritzhome] Updating already existing Device 13077 0001882
2024-10-24 23:21:42.528 INFO (SyncWorker_46) [pyfritzhome.fritzhome] Updating already existing Device 13077 0001882-1
2024-10-24 23:21:42.529 INFO (SyncWorker_46) [pyfritzhome.fritzhome] Updating already existing Device 13077 0143721
2024-10-24 23:21:42.529 INFO (SyncWorker_46) [pyfritzhome.fritzhome] Updating already existing Device 13077 0143721-1
2024-10-24 23:21:42.530 INFO (SyncWorker_46) [pyfritzhome.fritzhome] Updating already existing Device 13979 0225088
2024-10-24 23:21:42.530 INFO (SyncWorker_46) [pyfritzhome.fritzhome] Updating already existing Device 13979 0512512
2024-10-24 23:21:42.531 INFO (SyncWorker_46) [pyfritzhome.fritzhome] Updating Templates ...
2024-10-24 23:21:53.376 DEBUG (Thread-2) [custom_components.dirigera_platform] rcvd message : {"id":"6a6a234d-cb17-43f5-9a4b-b5524351e59a","time":"2024-10-24T21:21:53.000Z","specversion":"3.163.0","source":"urn:com:ikea:homesmart:iotc:zigbee","type":"deviceStateChanged","data":{"id":"a41ed4ed-c1af-43ee-a32f-60d18718f714_1","type":"sensor","deviceType":"motionSensor","createdAt":"2024-10-24T17:12:01.000Z","isReachable":true,"lastSeen":"2024-10-24T21:20:53.000Z","attributes":{"isDetected":false,"sensorConfig":{"scheduleOn":true,"onDuration":180,"schedule":{"onCondition":{"time":"sunset"},"offCondition":{"time":"sunrise"}}},"circadianPresets":[]},"remoteLinks":[]}}
2024-10-24 23:21:53.377 DEBUG (Thread-2) [custom_components.dirigera_platform] device type of message motionSensor
2024-10-24 23:21:53.377 DEBUG (Thread-2) [custom_components.dirigera_platform] Setting a41ed4ed-c1af-43ee-a32f-60d18718f714_1 reachable as True
2024-10-24 23:21:53.377 DEBUG (Thread-2) [custom_components.dirigera_platform] setting is_detected to False
2024-10-24 23:21:53.377 DEBUG (Thread-2) [custom_components.dirigera_platform] id='a41ed4ed-c1af-43ee-a32f-60d18718f714_1' relation_id='a41ed4ed-c1af-43ee-a32f-60d18718f714' type='sensor' device_type='motionSensor' created_at=datetime.datetime(2024, 10, 24, 17, 12, 1, tzinfo=datetime.timezone.utc) is_reachable=True last_seen=datetime.datetime(2024, 10, 24, 21, 20, 53, tzinfo=datetime.timezone.utc) attributes=MotionSensorAttributes(custom_name='Bewegungssensor', model='VALLHORN Wireless Motion Sensor', manufacturer='IKEA of Sweden', firmware_version='1.0.64', hardware_version='1', serial_number='8C65A3FFFE3D8F97', product_code='E2134', ota_status=None, ota_state=None, ota_progress=None, ota_policy=None, ota_schedule_start=None, ota_schedule_end=None, battery_percentage=100, is_on=False, light_level=None, is_detected=False) capabilities=Capabilities(can_send=[], can_receive=['customName']) room=Room(id='497845c4-2971-448d-91d9-0e84ff580338', name='Schlafzimmer', color='ikea_blue_no_63', icon='rooms_bed') device_set=[] remote_links=[] is_hidden=False dirigera_client=<custom_components.dirigera_platform.dirigera_lib_patch.HubX object at 0x7ca67dad8440>
2024-10-24 23:21:53.377 DEBUG (Thread-2) [custom_components.dirigera_platform] attribute sensorConfig with value {'scheduleOn': True, 'onDuration': 180, 'schedule': {'onCondition': {'time': 'sunset'}, 'offCondition': {'time': 'sunrise'}}} not in list of device type motionSensor, ignoring update...
2024-10-24 23:21:53.377 DEBUG (Thread-2) [custom_components.dirigera_platform] attribute circadianPresets with value [] not in list of device type motionSensor, ignoring update...
2024-10-24 23:21:53.379 INFO (MainThread) [homeassistant.components.automation.bewegungslicht] Bewegungslicht: Running automation actions
2024-10-24 23:21:53.380 INFO (MainThread) [homeassistant.components.automation.bewegungslicht] Bewegungslicht: Executing step device automation
2024-10-24 23:22:12.396 INFO (SyncWorker_20) [pyfritzhome.fritzhome] Updating Devices ...
2024-10-24 23:22:12.420 DEBUG (MainThread) [custom_components.dirigera_platform] update called Steckdose Schreibtisch
2024-10-24 23:22:12.425 DEBUG (MainThread) [custom_components.dirigera_platform] update called Bewegungssensor
2024-10-24 23:22:12.425 DEBUG (MainThread) [custom_components.dirigera_platform] update called Sensor Balkontür
2024-10-24 23:22:12.425 DEBUG (MainThread) [custom_components.dirigera_platform] update called Balkontür Schlafzimmer
2024-10-24 23:22:12.445 DEBUG (MainThread) [custom_components.dirigera_platform] update called Bewegungssensor
2024-10-24 23:22:12.445 DEBUG (MainThread) [custom_components.dirigera_platform] update called Sensor Balkontür
2024-10-24 23:22:12.445 DEBUG (MainThread) [custom_components.dirigera_platform] update called Balkontür Schlafzimmer
2024-10-24 23:22:12.522 INFO (SyncWorker_20) [pyfritzhome.fritzhome] Updating already existing Device 13077 0001882
2024-10-24 23:22:12.523 INFO (SyncWorker_20) [pyfritzhome.fritzhome] Updating already existing Device 13077 0001882-1
2024-10-24 23:22:12.523 INFO (SyncWorker_20) [pyfritzhome.fritzhome] Updating already existing Device 13077 0143721
2024-10-24 23:22:12.523 INFO (SyncWorker_20) [pyfritzhome.fritzhome] Updating already existing Device 13077 0143721-1
2024-10-24 23:22:12.523 INFO (SyncWorker_20) [pyfritzhome.fritzhome] Updating already existing Device 13979 0225088
2024-10-24 23:22:12.524 INFO (SyncWorker_20) [pyfritzhome.fritzhome] Updating already existing Device 13979 0512512
2024-10-24 23:22:12.524 INFO (SyncWorker_20) [pyfritzhome.fritzhome] Updating Templates ...

It seems like HA or the integration are losing the connection to the hub after a while. It doesn't find the device then anymore can't connect anymore and so all the scripts stop to work of course. Of course the dump didn't work then. So I removed the configuration from the integration and readded it again - successfully until it dies next time.

When I unplug the hub and replug it again I can see in the logs that the integration is looking for it but gets refused:

homeassistant  | 2024-10-25 06:51:23.386 INFO (Thread-2) [custom_components.dirigera_platform] Starting dirigera hub event listener
homeassistant  | 2024-10-25 06:51:23.388 ERROR (Thread-2) [websocket] [Errno 111] Connection refused - goodbye

@maste9
Copy link
Author

maste9 commented Oct 26, 2024

OK, it seems that's a duplicate of the changing IP-address issue #70
So I close this issue.

Twimc:

Weirdly my router didn't show the changed ip of the dirigera hub but the former.

sudo nmap -v -sP 192.168.2.0/24 however showed me that the hub listened on 30 instead of 34 which explained the non response of the devices which asked for the old ip.

The reason seems to be that my mobile obviously used the same ip eventually - which is odd taking in regard that its always on and so the hub shouldn't have received that ip in the first place.

However, after setting both devices to a fixed ipv4 in the router's UI the problem is (hopefully) solved. Maybe that answer helps others to discover that kind of problem a bigt faster.

@maste9 maste9 closed this as completed Oct 26, 2024
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

2 participants