zigpy / zha-device-handlers

ZHA device handlers bridge the functionality gap created when manufacturers deviate from the ZCL specification, handling deviations and exceptions by parsing custom messages to and from Zigbee devices.
Apache License 2.0
749 stars 687 forks source link

[BUG] IKEA Symfonisk Controller send 3-4 times the commands on ZHA #2317

Closed MrHollowPS closed 1 year ago

MrHollowPS commented 1 year ago

Describe the bug After removing and readding the ikea symfonisk controller a few times, ZHA starts to double triple or quadruple commands executed by the end device

To Reproduce I do not have exact steps but it was something along these lines

  1. Add Symfonisk controller to HA
  2. Controller goes offline for whatever reason (bad battery for example)
  3. Remove controller from ZHA
  4. Re-add controller
  5. Repeat step 1 a few times (i think i did like like 10 times)
  6. Sometimes pairing would fail so i would just re-add it so i think the issue is related to re-adding and removing or just re-adding it multiple times.

Expected behavior If i execute a command it should be executed ONCE not 2-3-4 times like it happens now..

Screenshots You can notice on the right that the command is executed 4 times in a row at the same time. https://community-assets.home-assistant.io/original/4X/6/d/6/6d6fcd9234f9475d2238de6376c454b2ceeca996.png

Device Signature ```yaml { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4476, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)", "endpoints": { "1": { "profile_id": 260, "device_type": "0x0006", "in_clusters": [ "0x0000", "0x0001", "0x0003", "0x0020", "0x1000" ], "out_clusters": [ "0x0003", "0x0004", "0x0006", "0x0008", "0x0019", "0x1000" ] } }, "manufacturer": "IKEA of Sweden", "model": "SYMFONISK Sound Controller", "class": "zhaquirks.ikea.symfonisk.IkeaSYMFONISK1" } ```
Diagnostic information ```yaml { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.3.6", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.10", "docker": true, "arch": "x86_64", "timezone": "Europe/Bucharest", "os_name": "Linux", "os_version": "5.15.90", "supervisor": "2023.03.3", "host_os": "Home Assistant OS 9.5", "docker_version": "20.10.22", "chassis": "vm", "run_as_root": true }, "custom_components": { "tado": { "version": "0.0.1", "requirements": [ "jorgenvatle-python-tado==0.14.dev3" ] }, "hacs": { "version": "1.31.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "fontawesome": { "version": "2.1.5", "requirements": [] }, "smartthinq_sensors": { "version": "0.31.4", "requirements": [ "pycountry>=20.7.3", "xmltodict>=0.12.0", "cchardet>=2.1.7" ] }, "dwains_dashboard": { "version": "3.3.0", "requirements": [] }, "browser_mod": { "version": "2.2.0", "requirements": [] }, "xiaomi_cloud_map_extractor": { "version": "v2.2.0", "requirements": [ "pillow", "pybase64", "python-miio", "requests", "pycryptodome" ] }, "simpleicons": { "version": "v2.2.0", "requirements": [ "simpleicons==7.14.0" ] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "after_dependencies": [ "onboarding", "usb" ], "codeowners": [ "@dmulcahey", "@adminiuga", "@puddly" ], "config_flow": true, "dependencies": [ "file_upload" ], "documentation": "https://www.home-assistant.io/integrations/zha", "iot_class": "local_polling", "loggers": [ "aiosqlite", "bellows", "crccheck", "pure_pcapy3", "zhaquirks", "zigpy", "zigpy_deconz", "zigpy_xbee", "zigpy_zigate", "zigpy_znp" ], "requirements": [ "bellows==0.34.10", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.94", "zigpy-deconz==0.19.2", "zigpy==0.53.2", "zigpy-xbee==0.16.2", "zigpy-zigate==0.10.3", "zigpy-znp==0.9.3" ], "usb": [ { "vid": "10C4", "pid": "EA60", "description": "*2652*", "known_devices": [ "slae.sh cc2652rb stick" ] }, { "vid": "1A86", "pid": "55D4", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus v2" ] }, { "vid": "10C4", "pid": "EA60", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus" ] }, { "vid": "10C4", "pid": "EA60", "description": "*tubeszb*", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "*tubeszb*", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "*zigstar*", "known_devices": [ "ZigStar Coordinators" ] }, { "vid": "1CF1", "pid": "0030", "description": "*conbee*", "known_devices": [ "Conbee II" ] }, { "vid": "10C4", "pid": "8A2A", "description": "*zigbee*", "known_devices": [ "Nortek HUSBZB-1" ] }, { "vid": "0403", "pid": "6015", "description": "*zigate*", "known_devices": [ "ZiGate+" ] }, { "vid": "10C4", "pid": "EA60", "description": "*zigate*", "known_devices": [ "ZiGate" ] }, { "vid": "10C4", "pid": "8B34", "description": "*bv 2010/10*", "known_devices": [ "Bitron Video AV2010/10" ] } ], "zeroconf": [ { "type": "_esphomelib._tcp.local.", "name": "tube*" }, { "type": "_zigate-zigbee-gateway._tcp.local.", "name": "*zigate*" }, { "type": "_zigstar_gw._tcp.local.", "name": "*zigstar*" }, { "type": "_slzb-06._tcp.local.", "name": "slzb-06*" } ], "is_built_in": true }, "data": { "ieee": "**REDACTED**", "nwk": 8668, "manufacturer": "IKEA of Sweden", "model": "SYMFONISK Sound Controller", "name": "IKEA of Sweden SYMFONISK Sound Controller", "quirk_applied": true, "quirk_class": "zhaquirks.ikea.symfonisk.IkeaSYMFONISK1", "manufacturer_code": 4476, "power_source": "Battery or Unknown", "lqi": 168, "rssi": -58, "last_seen": "2023-04-03T10:22:43", "available": true, "device_type": "EndDevice", "signature": { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4476, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)", "endpoints": { "1": { "profile_id": 260, "device_type": "0x0006", "in_clusters": [ "0x0000", "0x0001", "0x0003", "0x0020", "0x1000" ], "out_clusters": [ "0x0003", "0x0004", "0x0006", "0x0008", "0x0019", "0x1000" ] } } }, "active_coordinator": false, "entities": [ { "entity_id": "button.ikea_of_sweden_symfonisk_sound_controller_identify", "name": "IKEA of Sweden SYMFONISK Sound Controller" }, { "entity_id": "sensor.ikea_of_sweden_symfonisk_sound_controller_battery", "name": "IKEA of Sweden SYMFONISK Sound Controller" } ], "neighbors": [], "routes": [], "endpoint_names": [ { "name": "REMOTE_CONTROL" } ], "user_given_name": null, "device_reg_id": "c01983d074020bc40e3aa3b8f09eb56f", "area_id": null, "cluster_details": { "1": { "device_type": { "name": "REMOTE_CONTROL", "id": 6 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": {}, "unsupported_attributes": {} }, "0x0001": { "endpoint_attribute": "power", "attributes": {}, "unsupported_attributes": {} }, "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} }, "0x0020": { "endpoint_attribute": "poll_control", "attributes": { "0x0000": { "attribute_name": "checkin_interval", "value": 13200 } }, "unsupported_attributes": {} }, "0x1000": { "endpoint_attribute": "lightlink", "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": { "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} }, "0x0004": { "endpoint_attribute": "groups", "attributes": {}, "unsupported_attributes": {} }, "0x0006": { "endpoint_attribute": "on_off", "attributes": {}, "unsupported_attributes": {} }, "0x0008": { "endpoint_attribute": "level", "attributes": {}, "unsupported_attributes": {} }, "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} }, "0x1000": { "endpoint_attribute": "lightlink", "attributes": {}, "unsupported_attributes": {} } } } } } } ```
Additional logs ``` Paste any additional debug logs here. Don't remove the extra line breaks outside the ``` marks. ```

Additional context The controller ran out of batteries twice, probably bad batteries, might be related to this issue.

MattWestb commented 1 year ago

If you is not need group binding update you device firmware to the latest production version is doing unicast and you is only getting one event for every command from the remote.

MrHollowPS commented 1 year ago

I don't have group bindings or anything. Also how do i update the firmware from ZHA? I read that updates are done automatically in ZHA.

MattWestb commented 1 year ago

You need configuring it and you can find how in the Wiki https://github.com/zigpy/zigpy/wiki/OTA-Device-Firmware-Updates

MrHollowPS commented 1 year ago

@MattWestb Thanks, very useful.

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.