sanjoyg / dirigera_platform

HomeAssistant Integration for Dirigera Platform
MIT License
71 stars 8 forks source link

Devices do not refresh state after latest update #56

Open oat1 opened 2 weeks ago

oat1 commented 2 weeks ago

I have 4 ikea light bulbs and a physical switch with which I turn the electricity on and off. Previously when I turned the current on after a few moments the bulbs would reappear as available in HA. Now they do not update the status and are unavailable all the time. Only when I refresh the entire integration in the settings do they reappear.

log just, show all the time, no matter if devices are on or off

`2024-06-12 14:58:14.760 DEBUG (Thread-2) [custom_components.dirigera_platform] rcvd message : {"id":"93d01c1f-36d5-46b2-a5f2-5a64d638d14b","time":"2024-06-12T12:58:04.000Z","specversion":"3.154.0","source":"urn:com:ikea:homesmart:iotc:zigbee","type":"deviceStateChanged","data":{"id":"36fee6ac-4395-44c2-acac-a0ef7a2c9cc0_1","type":"light","deviceType":"light","lastSeen":"2024-06-12T12:58:04.000Z","attributes":{"otaState":"readyToCheck"},"remoteLinks":[]}} 2024-06-12 14:58:14.761 DEBUG (Thread-2) [custom_components.dirigera_platform] device type of message light 2024-06-12 14:58:14.761 DEBUG (Thread-2) [custom_components.dirigera_platform] attribute otaState with value readyToCheck not in list of device type light, ignoring update...

I can also see

`Ten błąd pochodzi z niestandardowej integracji.

Rejestrator: custom_components.dirigera_platform Źródło: custom_components/dirigera_platform/hub_event_listener.py:188 integracja: IKEA Dirigera Hub Integration (dokumentacja, Problemy) Pierwsze zdarzenie: 14:54:23 (1 zdarzenia) Ostatnio zalogowany: 14:54:23

Failed to create listener or listener exited, will sleep 10 seconds before retrying`

sanjoyg commented 2 weeks ago

please try now with latest release

oat1 commented 1 week ago

@sanjoyg Still not working with version 1.7.11

2024-06-16 20:41:49.238 DEBUG (Thread-2) [custom_components.dirigera_platform] rcvd message : {"id":"b6354999-ea5f-45c2-afb5-6911b8d57cc3","time":"2024-06-16T18:41:35.000Z","specversion":"3.154.0","source":"urn:com:ikea:homesmart:iotc:zigbee","type":"deviceStateChanged","data":{"deviceType":"light","isReachable":false,"id":"d613d6b7-098e-4bdd-adff-16cc16aaf161_1","lastSeen":"2024-06-16T20:40:34.000Z"}} 2024-06-16 20:41:49.238 DEBUG (Thread-2) [custom_components.dirigera_platform] device type of message light 2024-06-16 20:41:49.238 DEBUG (Thread-2) [custom_components.dirigera_platform] Setting d613d6b7-098e-4bdd-adff-16cc16aaf161_1 reachable as False 2024-06-16 20:41:52.204 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [400...550 - Tablet] Dispatching message CMD 9 TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211, crc_good=True, prefix=21930, iv=None) 2024-06-16 20:41:55.305 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf7...xdb - Led Sypialnia] Dispatching message CMD 9 TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211, crc_good=True, prefix=21930, iv=None) 2024-06-16 20:41:58.260 DEBUG (Thread-2) [custom_components.dirigera_platform] rcvd message : {"id":"ee26bce5-7758-42c2-84e1-da0fe543ce39","time":"2024-06-16T18:41:44.000Z","specversion":"3.154.0","source":"urn:com:ikea:homesmart:iotc:zigbee","type":"deviceStateChanged","data":{"deviceType":"light","isReachable":false,"id":"c8c88287-41d6-407a-b087-fcea6f3b0332_1","lastSeen":"2024-06-16T20:40:43.000Z"}} 2024-06-16 20:41:58.260 DEBUG (Thread-2) [custom_components.dirigera_platform] device type of message light 2024-06-16 20:41:58.260 DEBUG (Thread-2) [custom_components.dirigera_platform] Setting c8c88287-41d6-407a-b087-fcea6f3b0332_1 reachable as False

`Rejestrator: custom_components.dirigera_platform Źródło: custom_components/dirigera_platform/hub_event_listener.py:188 integracja: IKEA Dirigera Hub Integration (dokumentacja, Problemy) Pierwsze zdarzenie: 20:38:10 (1 zdarzenia) Ostatnio zalogowany: 20:38:10

Failed to create listener or listener exited, will sleep 10 seconds before retrying`

samimasad commented 1 week ago

from my side i see much improved behaviour

oat1 commented 1 week ago

@sanjoyg

Sorry I did not post everything.

Look below, think "attribute otaState with value readyToCheck not in list of device type light, ignoring update.." is the issue

2024-06-17 07:56:02.671 DEBUG (Thread-2) [custom_components.dirigera_platform] rcvd message : {"id":"ae9ddd0c-e3dd-413e-a43e-5c86440e720e","time":"2024-06-17T05:55:48.000Z","specversion":"3.154.0","source":"urn:com:ikea:homesmart:iotc:zigbee","type":"deviceStateChanged","data":{"id":"36fee6ac-4395-44c2-acac-a0ef7a2c9cc0_1","type":"light","deviceType":"light","lastSeen":"2024-06-17T05:55:48.000Z","attributes":{"otaState":"readyToCheck"},"remoteLinks":[]}} 2024-06-17 07:56:02.672 DEBUG (Thread-2) [custom_components.dirigera_platform] device type of message light 2024-06-17 07:56:02.672 DEBUG (Thread-2) [custom_components.dirigera_platform] attribute otaState with value readyToCheck not in list of device type light, ignoring update...

sanjoyg commented 1 week ago

I dont see any issue. in the first log that you sent the Bulb became "unreachable", and the integration marked "reachable" as false which should have reflected on the UI. In the second log, the log is not an issue. The integration doesnt use the attribute "otaState", thus it ignores that value as its not used.

oat1 commented 1 week ago

This is all I can see right now in the logs when I turn the electricity and the bulbs on. Shouldn't it have more data about state off every device ? I have 4 bulbs that create a set.

2024-06-17 15:04:11.883 DEBUG (Thread-2) [custom_components.dirigera_platform] rcvd message : {"id":"35b5e6cb-e87b-4d86-acf7-d96e042aae98","time":"2024-06-17T13:03:57.000Z","specversion":"3.154.0","source":"urn:com:ikea:homesmart:iotc:zigbee","type":"deviceStateChanged","data":{"id":"36fee6ac-4395-44c2-acac-a0ef7a2c9cc0_1","type":"light","deviceType":"light","lastSeen":"2024-06-17T13:03:57.000Z","attributes":{"otaState":"readyToCheck"},"remoteLinks":[]}} 2024-06-17 15:04:11.884 DEBUG (Thread-2) [custom_components.dirigera_platform] device type of message light 2024-06-17 15:04:11.884 DEBUG (Thread-2) [custom_components.dirigera_platform] attribute otaState with value readyToCheck not in list of device type light, ignoring update...

they remain unavailable until the refresh of the integration or restart of home assistant. image

attaching also the json

2024-06-17 15:28:42.931 INFO (SyncWorker_52) [custom_components.dirigera_platform] === START Devices JSON === 2024-06-17 15:28:42.932 INFO (SyncWorker_52) [custom_components.dirigera_platform] -------------- 2024-06-17 15:28:43.210 INFO (SyncWorker_52) [custom_components.dirigera_platform] [{'id': '085bd163-c0b0-40a4-bb31-8091328d6ce3_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:30.000Z', 'isReachable': True, 'lastSeen': '2024-06-17T13:03:12.000Z', 'attributes': {'customName': 'Światło 2', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': 'CCCCCCFFFE3C7738', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'colorTemperature': 3984, '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': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_blue_no_63', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': '36fee6ac-4395-44c2-acac-a0ef7a2c9cc0_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:22.000Z', 'isReachable': True, 'lastSeen': '2024-06-17T13:03:57.000Z', 'attributes': {'customName': 'Światło 1', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': '000D6FFFFE5ADEE7', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'colorTemperature': 3984, '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': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_blue_no_63', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': 'c8c88287-41d6-407a-b087-fcea6f3b0332_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:31.000Z', 'isReachable': True, 'lastSeen': '2024-06-17T13:03:15.000Z', 'attributes': {'customName': 'Światło 3', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': 'CCCCCCFFFE3C7DEA', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'colorTemperature': 3984, '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': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_blue_no_63', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': 'd613d6b7-098e-4bdd-adff-16cc16aaf161_1', 'type': 'light', 'deviceType': 'light', 'createdAt': '2024-03-05T18:42:33.000Z', 'isReachable': True, 'lastSeen': '2024-06-17T13:03:03.000Z', 'attributes': {'customName': 'Światło 4', 'model': 'TRADFRI bulb E27 WS opal 1000lm', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.3.095', 'hardwareVersion': '1', 'serialNumber': '680AE2FFFE11D61A', 'productCode': 'LED1732G11E27', 'isOn': True, 'startupOnOff': 'startOn', 'lightLevel': 100, 'startUpCurrentLevel': -1, 'colorTemperature': 3984, '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': 'da936cc0-f77b-48b6-83b5-7809a394f5d7', 'name': 'Salon', 'color': 'ikea_blue_no_63', 'icon': 'rooms_sofa'}, 'deviceSet': [{'id': '12f5e91a-bcb2-4dfb-841a-ba093c0a9e64', 'name': 'Żyrandol Salon', 'icon': 'lighting_chandelier'}], 'remoteLinks': [], 'isHidden': False}, {'id': 'd9572831-60bc-4e89-8f03-2a3a3a24be31_1', 'relationId': 'd9572831-60bc-4e89-8f03-2a3a3a24be31', 'type': 'gateway', 'deviceType': 'gateway', 'createdAt': '2023-12-15T15:44:20.614Z', 'isReachable': True, 'lastSeen': '2024-06-17T13:28:00.627Z', 'attributes': {'customName': 'Dom', 'model': 'DIRIGERA Hub for smart products', 'manufacturer': 'IKEA of Sweden', 'firmwareVersion': '2.588.0', 'hardwareVersion': 'P2.5', 'serialNumber': 'd9572831-60bc-4e89-8f03-2a3a3a24be31', 'identifyStarted': '2000-01-01T00:00:00.000Z', 'identifyPeriod': 0, 'otaStatus': 'upToDate', 'otaState': 'checkFailed', 'otaProgress': 0, 'otaPolicy': 'autoDownload', 'otaScheduleStart': '00:00', 'otaScheduleEnd': '00:00', 'permittingJoin': False, 'backendConnected': True, 'backendConnectionPersistent': True, 'backendOnboardingComplete': True, 'backendRegion': 'eu-central-1', 'backendCountryCode': 'PL', 'userConsents': [{'name': 'analytics', 'value': 'enabled'}, {'name': 'diagnostics', 'value': 'enabled'}], 'logLevel': 3, 'coredump': False, 'timezone': 'Europe/Warsaw', 'nextSunSet': '2024-06-17T19:01:00.000Z', 'nextSunRise': '2024-06-18T02:14:00.000Z', 'homestate': 'home', 'countryCode': 'XZ', 'coordinates': {'latitude': 52.306306306306304, 'longitude': 20.98133894019359, 'accuracy': -1}, 'isOn': False}, 'capabilities': {'canSend': [], 'canReceive': ['customName', 'permittingJoin', 'userConsents', 'logLevel', 'time', 'timezone', 'countryCode', 'coordinates']}, 'deviceSet': [], 'remoteLinks': []}] 2024-06-17 15:28:43.211 INFO (SyncWorker_52) [custom_components.dirigera_platform] -------------- 2024-06-17 15:28:43.211 INFO (SyncWorker_52) [custom_components.dirigera_platform] === END Devices JSON ===