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
743 stars 680 forks source link

[BUG] E1812 Ikea shortcut button does not fire zha_event #1752

Closed NdK73 closed 11 months ago

NdK73 commented 2 years ago

Describe the bug Similar to #1516 but different context.

I'm using supervised HA where I confugured ZHA to access a ZigStar LAN Gateway. I can succesfully bind a Sonoff SNZB-04 (door/window sensor) and a RSH-ZigBee-SC04 4-button scene switch. Both devices report events to HA. But both the Ikea E1812 I tested seems to have troubles both during discovery and after binding. I once saw events while testing a CC2531-based bridge, but only for a short time. (Actually, while collecting debug info, one of the buttons started generating events... hope it continues)

To Reproduce Steps to reproduce the behavior:

  1. Go to ZHA integration
  2. Put E1812 in pairing mode (4 clicks on bind button, red LED starts blinking)
  3. Click on add device
  4. The logs report:
    [0x0000:zdo] ZDO request ZDOCmd.Mgmt_Permit_Joining_rsp: [<Status.SUCCESS: 0>]
    [0x0000:zdo] No handler for ZDO request:ZDOCmd.Mgmt_Permit_Joining_rsp([<Status.SUCCESS: 0>])
    New device 0xd62c (8c:f6:81:ff:fe:2b:c6:6f) joined the network
    [0xd62c] Scheduling initialization
    Received frame on uninitialized device <Device model=None manuf=None nwk=0xD62C ieee=8c:f6:81:ff:fe:2b:c6:6f is_initialized=False> from ep 0 to ep 0, cluster 19: b'\x81,\xd6o\xc6+\xfe\xff\x81\xf6\x8c\x80'
    [0xd62c:zdo] ZDO request ZDOCmd.Device_annce: [0xD62C, 8c:f6:81:ff:fe:2b:c6:6f, 128]
    Tries remaining: 3
    [0xd62c] Requesting 'Node Descriptor'
    Tries remaining: 2
    [0xd62c] Extending timeout for 0x8d request
    Received frame on uninitialized device <Device model=None manuf=None nwk=0xD62C ieee=8c:f6:81:ff:fe:2b:c6:6f is_initialized=False> from ep 0 to ep 0, cluster 32770: b'\x8d\x00,\xd6\x02@\x80|\x11RR\x00\x00,R\x00\x00'
    [0xd62c] Got Node Descriptor: NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4476, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *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)
    [0xd62c] Discovering endpoints
    Tries remaining: 3
    [0xd62c] Extending timeout for 0x8e request
    Received frame on uninitialized device <Device model=None manuf=None nwk=0xD62C ieee=8c:f6:81:ff:fe:2b:c6:6f is_initialized=False> from ep 0 to ep 0, cluster 32773: b'\x8e\x00,\xd6\x01\x01'
    [0xd62c] Discovered endpoints: [1]
    [0xd62c] Initializing endpoints [<Endpoint id=1 in=[] out=[] status=<Status.NEW: 0>>]
    [0xd62c:1] Discovering endpoint information
    Tries remaining: 3
    [0xd62c] Extending timeout for 0x8f request
    Received frame on uninitialized device <Device model=None manuf=None nwk=0xD62C ieee=8c:f6:81:ff:fe:2b:c6:6f is_initialized=False> from ep 0 to ep 0, cluster 32772: b'\x8f\x00,\xd6"\x01\x04\x01 \x08\x01\x06\x00\x00\x01\x00\x03\x00\t\x00 \x00\x00\x10\x07\x03\x00\x04\x00\x06\x00\x08\x00\x19\x00\x02\x01\x00\x10'
    [0xd62c:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=2080, device_version=1, input_clusters=[0, 1, 3, 9, 32, 4096], output_clusters=[3, 4, 6, 8, 25, 258, 4096])
    [0xD62C:1:0x0000] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True, *is_reply=False), tsn=144, command_id=<GeneralCommand.Read_Attributes: 0>, *direction=<Direction.Server_to_Client: 0>, *is_reply=False)
    [0xD62C:1:0x0000] Sending request: Read_Attributes(attribute_ids=[4, 5])
    [0xd62c] Extending timeout for 0x90 request
    [0xD62C:1:0x0000] Received ZCL frame: b'\x18\x90\x01\x04\x00\x00\x42\x0E\x49\x4B\x45\x41\x20\x6F\x66\x20\x53\x77\x65\x64\x65\x6E\x05\x00\x00\x42\x17\x54\x52\x41\x44\x46\x52\x49\x20\x53\x48\x4F\x52\x54\x43\x55\x54\x20\x42\x75\x74\x74\x6F\x6E'
    [0xD62C:1:0x0000] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=144, command_id=1, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
    [0xD62C:1:0x0000] Decoded ZCL frame: Basic:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0004, status=<Status.SUCCESS: 0>, value=TypeValue(type=CharacterString, value='IKEA of Sweden')), ReadAttributeRecord(attrid=0x0005, status=<Status.SUCCESS: 0>, value=TypeValue(type=CharacterString, value='TRADFRI SHORTCUT Button'))])
    [0xd62c] Read model 'TRADFRI SHORTCUT Button' and manufacturer 'IKEA of Sweden' from <Endpoint id=1 in=[basic:0x0000, power:0x0001, identify:0x0003, alarms:0x0009, poll_control:0x0020, lightlink:0x1000] out=[identify:0x0003, groups:0x0004, on_off:0x0006, level:0x0008, ota:0x0019, window_covering:0x0102, lightlink:0x1000] status=<Status.ZDO_INIT: 1>>
    [0xd62c] Discovered basic device information for <Device model='TRADFRI SHORTCUT Button' manuf='IKEA of Sweden' nwk=0xD62C ieee=8c:f6:81:ff:fe:2b:c6:6f is_initialized=True>
    Device is initialized <Device model='TRADFRI SHORTCUT Button' manuf='IKEA of Sweden' nwk=0xD62C ieee=8c:f6:81:ff:fe:2b:c6:6f is_initialized=True>
    Checking quirks for IKEA of Sweden TRADFRI SHORTCUT Button (8c:f6:81:ff:fe:2b:c6:6f)
    Considering <class 'zhaquirks.ikea.shortcutbtn.IkeaTradfriShortcutBtn2'>
    Fail because input cluster mismatch on at least one endpoint
    Considering <class 'zhaquirks.ikea.shortcutbtn.IkeaTradfriShortcutBtn'>
    Found custom device replacement for 8c:f6:81:ff:fe:2b:c6:6f: <class 'zhaquirks.ikea.shortcutbtn.IkeaTradfriShortcutBtn'>
    'button' component -> 'ZHAIdentifyButton' using ['identify']
    'sensor' component -> 'Battery' using ['power']
    'sensor' component -> 'RSSISensor' using ['basic']
    'sensor' component -> 'LQISensor' using ['basic']
    device - 0xD62C:8c:f6:81:ff:fe:2b:c6:6f entering async_device_initialized - is_new_join: True
    device - 0xD62C:8c:f6:81:ff:fe:2b:c6:6f has joined the ZHA zigbee network
    [0xD62C](TRADFRI SHORTCUT Button): started configuration
    [0xD62C:ZDO](TRADFRI SHORTCUT Button): 'async_configure' stage succeeded
    [0xD62C:1:0x0000]: Configuring cluster attribute reporting
    Error handling '_save_attribute' event with (8c:f6:81:ff:fe:2b:c6:6f, 1, 0, 5, 'TRADFRI SHORTCUT Button') params: FOREIGN KEY constraint failed
    [0xD62C:1:0x1000] Received ZCL frame: b'\x19\x93\x41\x01\x00\x00'
    [0xD62C:1:0x1000] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=147, command_id=65, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
    [0xD62C:1:0x1000] Decoded ZCL frame: LightLinkCluster:get_group_identifiers_rsp(total=1, start_index=0, group_info_records=[])
    [0x0000:2] Cannot add 0x0000 group, no groups cluster
    [0x0000:1] Cannot add 0x0000 group, no groups cluster
    [0xD62C:1:0x0001]: bound 'power' cluster: Status.SUCCESS
    [0xD62C:1:0x0001] Received ZCL frame: b'\x08\x97\x07\x00'
    [0xD62C:1:0x0001] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=151, command_id=7, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
    [0xD62C:1:0x0001] Decoded ZCL frame: PowerConfiguration1CRCluster:Configure_Reporting_rsp(status_records=[ConfigureReportingResponseRecord(status=<Status.SUCCESS: 0>)])
    [0xD62C:1:0x0001]: Successfully configured reporting for '{'battery_voltage': (3600, 10800, 1), 'battery_percentage_remaining': (3600, 10800, 1)}' on 'power' cluster: [ConfigureReportingResponseRecord(status=<Status.SUCCESS: 0>)]
    [0xD62C:1:0x1000] Received ZCL frame: b'\x19\x93\x41\x01\x00\x00'
    [0xD62C:1:0x1000] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Client_to_Server: 1>, disable_default_response=1, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=147, command_id=65, *direction=<Direction.Client_to_Server: 1>, *is_reply=True)
    [0xD62C:1:0x1000] Decoded ZCL frame: LightLinkCluster:get_group_identifiers_rsp(total=1, start_index=0, group_info_records=[])
    [0xD62C:1:0x1000] Received command 0x41 (TSN 147): get_group_identifiers_rsp(total=1, start_index=0, group_info_records=[])
    [0xD62C:1:0x1000] No explicit handler for cluster command 0x41: get_group_identifiers_rsp(total=1, start_index=0, group_info_records=[])
    [0xBF0E](TS0044): Device seen - marking the device available and resetting counter
    [0xBF0E](TS0044): Update device availability -  device available: True - new availability: True - changed: False
    [0xD62C:1:0x0020]: Failed to bind 'poll_control' cluster: 
    [0xD62C:1:0x0102]: Failed to bind 'window_covering' cluster: 
    [0xD62C:1:0x0008]: Failed to bind 'level' cluster: 
    [0xD62C:1:0x0006]: Failed to bind 'on_off' cluster: 
    [0x7F6A](DS01): Device seen - marking the device available and resetting counter
    [0x7F6A](DS01): Update device availability -  device available: True - new availability: True - changed: False
    [0x20D3](TRADFRI SHORTCUT Button): Device seen - marking the device available and resetting counter
    [0x20D3](TRADFRI SHORTCUT Button): Update device availability -  device available: True - new availability: True - changed: False
    [0xD62C:1:0x0020]: Couldn't set check-in interval: Request failed after 5 attempts: <Status.NWK_NO_ROUTE: 205>
    [0xD62C:1:0x0020]: finished channel configuration
    [0xD62C:1:0x0000]: 'async_configure' stage succeeded
    [0xD62C:1:0x0001]: 'async_configure' stage succeeded
    [0xD62C:1:0x0003]: 'async_configure' stage succeeded
    [0xD62C:1:0x0020]: 'async_configure' stage succeeded
    [0xD62C:1:0x1000]: 'async_configure' stage succeeded
    [0xD62C:1:0x0102]: 'async_configure' stage succeeded
    [0xD62C:1:0x0008]: 'async_configure' stage succeeded
    [0xD62C:1:0x0006]: 'async_configure' stage succeeded
    [0xD62C:1:0x0019]: 'async_configure' stage succeeded
    [0xD62C](TRADFRI SHORTCUT Button): completed configuration
    [0xD62C:1:0x0003] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=False, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=False), tsn=153, command_id=64, *direction=<Direction.Server_to_Client: 0>, *is_reply=False)
    [0xD62C:1:0x0003] Sending request: trigger_effect(effect_id=<EffectIdentifier.Okay: 2>, effect_variant=<EffectVariant.Default: 0>)
    [0xd62c] Extending timeout for 0x99 request
    [0xD62C:1:0x0003]: command failed: 'trigger_effect' args: '(2, 0)' kwargs '{}' exception: 'Request failed after 5 attempts: <Status.NWK_NO_ROUTE: 205>'
    [0xD62C](TRADFRI SHORTCUT Button): started initialization
    [0xD62C:ZDO](TRADFRI SHORTCUT Button): 'async_initialize' stage succeeded
    [0xD62C:1:0x0000]: initializing channel: from_cache: False
    [0xD62C:1:0x0000]: finished channel initialization
    [0xD62C:1:0x0001]: initializing channel: from_cache: False
    [0xD62C:1:0x0001]: initializing uncached channel attributes: ['battery_voltage', 'battery_percentage_remaining'] - from cache[False]
    [0xD62C:1:0x0001]: Reading attributes in chunks: ['battery_voltage', 'battery_percentage_remaining']
    [0xD62C:1:0x0001] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True, *is_reply=False), tsn=154, command_id=<GeneralCommand.Read_Attributes: 0>, *direction=<Direction.Server_to_Client: 0>, *is_reply=False)
    [0xD62C:1:0x0001] Sending request: Read_Attributes(attribute_ids=[32, 33])
    [0xd62c] Extending timeout for 0x9a request
    [0xD62C:1:0x0003]: initializing channel: from_cache: False
    [0xD62C:1:0x0003]: finished channel initialization
    [0xD62C:1:0x0020]: initializing channel: from_cache: False
    [0xD62C:1:0x0020]: finished channel initialization
    [0xD62C:1:0x1000]: initializing channel: from_cache: False
    [0xD62C:1:0x1000]: finished channel initialization
    [0xD62C:1:0x0102]: initializing channel: from_cache: False
    [0xD62C:1:0x0102]: finished channel initialization
    [0xD62C:1:0x0008]: initializing channel: from_cache: False
    [0xD62C:1:0x0008]: finished channel initialization
    [0xD62C:1:0x0006]: initializing channel: from_cache: False
    [0xD62C:1:0x0006]: finished channel initialization
    [0xD62C:1:0x0019]: initializing channel: from_cache: False
    [0xD62C:1:0x0019]: finished channel initialization
    [0xD62C](TRADFRI SHORTCUT Button): Device seen - marking the device available and resetting counter
    [0xD62C](TRADFRI SHORTCUT Button): Update device availability -  device available: True - new availability: True - changed: False
    [0xD62C:1:0x0001]: failed to get attributes '['battery_voltage', 'battery_percentage_remaining']' on 'power' cluster: Request failed after 5 attempts: <Status.NWK_NO_ROUTE: 205>
    [0xD62C:1:0x0001]: async_initialize: retryable request #1 failed: Request failed after 5 attempts: <Status.NWK_NO_ROUTE: 205>. Retrying in 1.2s
    [0xD62C:1:0x0001]: initializing channel: from_cache: False
    [0xD62C:1:0x0001]: initializing uncached channel attributes: ['battery_voltage', 'battery_percentage_remaining'] - from cache[False]
    [0xD62C:1:0x0001]: Reading attributes in chunks: ['battery_voltage', 'battery_percentage_remaining']
    [0xD62C:1:0x0001] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True, *is_reply=False), tsn=155, command_id=<GeneralCommand.Read_Attributes: 0>, *direction=<Direction.Server_to_Client: 0>, *is_reply=False)
    [0xD62C:1:0x0001] Sending request: Read_Attributes(attribute_ids=[32, 33])
    [0xd62c] Extending timeout for 0x9b request
    [0xD62C:1:0x0001]: failed to get attributes '['battery_voltage', 'battery_percentage_remaining']' on 'power' cluster: Request failed after 5 attempts: <Status.NWK_NO_ROUTE: 205>
    [0xD62C:1:0x0001]: async_initialize: retryable request #2 failed: Request failed after 5 attempts: <Status.NWK_NO_ROUTE: 205>. Retrying in 0.9s
    [0xD62C:1:0x0001]: initializing channel: from_cache: False
    [0xD62C:1:0x0001]: initializing uncached channel attributes: ['battery_voltage', 'battery_percentage_remaining'] - from cache[False]
    [0xD62C:1:0x0001]: Reading attributes in chunks: ['battery_voltage', 'battery_percentage_remaining']
    [0xD62C:1:0x0001] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True, *is_reply=False), tsn=156, command_id=<GeneralCommand.Read_Attributes: 0>, *direction=<Direction.Server_to_Client: 0>, *is_reply=False)
    [0xD62C:1:0x0001] Sending request: Read_Attributes(attribute_ids=[32, 33])
    [0xd62c] Extending timeout for 0x9c request
    [0x7F6A](DS01): Device seen - marking the device available and resetting counter
    [0x7F6A](DS01): Update device availability -  device available: True - new availability: True - changed: False
    [0xD62C:1:0x0001]: failed to get attributes '['battery_voltage', 'battery_percentage_remaining']' on 'power' cluster: Request failed after 5 attempts: <Status.NWK_NO_ROUTE: 205>
    [0xD62C:1:0x0001]: async_initialize: retryable request #3 failed: Request failed after 5 attempts: <Status.NWK_NO_ROUTE: 205>. Retrying in 3.6s
    [0xD62C:1:0x0001]: initializing channel: from_cache: False
    [0xD62C:1:0x0001]: initializing uncached channel attributes: ['battery_voltage', 'battery_percentage_remaining'] - from cache[False]
    [0xD62C:1:0x0001]: Reading attributes in chunks: ['battery_voltage', 'battery_percentage_remaining']
    [0xD62C:1:0x0001] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.GLOBAL_COMMAND: 0>, is_manufacturer_specific=False, direction=<Direction.Server_to_Client: 0>, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True, *is_reply=False), tsn=157, command_id=<GeneralCommand.Read_Attributes: 0>, *direction=<Direction.Server_to_Client: 0>, *is_reply=False)
    [0xD62C:1:0x0001] Sending request: Read_Attributes(attribute_ids=[32, 33])
    [0xd62c] Extending timeout for 0x9d request
    [0xBF0E](TS0044): Device seen - marking the device available and resetting counter
    [0xBF0E](TS0044): Update device availability -  device available: True - new availability: True - changed: False

Note that the E1812 gets recognized twice, getting different addresses.

Expected behavior E1812 gets recognized once and generates events when clicked.

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": "0x0820", "in_clusters": [ "0x0000", "0x0001", "0x0003", "0x0009", "0x0020", "0x1000" ], "out_clusters": [ "0x0003", "0x0004", "0x0006", "0x0008", "0x0019", "0x0102", "0x1000" ] } }, "manufacturer": "IKEA of Sweden", "model": "TRADFRI SHORTCUT Button", "class": "zhaquirks.ikea.shortcutbtn.IkeaTradfriShortcutBtn" } ```
Diagnostic information ```yaml { "home_assistant": { "installation_type": "Home Assistant Supervised", "version": "2022.9.2", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.5", "docker": true, "arch": "x86_64", "timezone": "Europe/Rome", "os_name": "Linux", "os_version": "5.10.0-17-amd64", "supervisor": "2022.08.6", "host_os": "Debian GNU/Linux 11 (bullseye)", "docker_version": "20.10.17", "chassis": "vm", "run_as_root": true }, "custom_components": { "tasmota_irhvac": { "version": "2021.12.0", "requirements": [] }, "scheduler": { "version": "v0.0.0", "requirements": [] }, "nodered": { "version": "1.0.9", "requirements": [] }, "remote_homeassistant": { "version": "3.6", "requirements": [] }, "sonoff": { "version": "3.2.0", "requirements": [ "pycryptodome>=3.6.6" ] }, "shelly": { "version": "1.0.2", "requirements": [ "pyShelly==1.0.2", "paho-mqtt==1.6.1", "websocket-client" ] }, "hacs": { "version": "1.27.2", "requirements": [ "aiogithubapi>=22.2.4" ] }, "hisense_tv": { "version": "22.05.09", "requirements": [ "wakeonlan==2.0.1" ] }, "localtuya": { "version": "4.1.0", "requirements": [] }, "dual_smart_thermostat": { "version": "0.5.5", "requirements": [] }, "zha_toolkit": { "version": "v0.8.16", "requirements": [] }, "aquaariston": { "version": "1.0.50", "requirements": [] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/zha", "requirements": [ "bellows==0.33.1", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.79", "zigpy-deconz==0.18.1", "zigpy==0.50.3", "zigpy-xbee==0.15.0", "zigpy-zigate==0.9.2", "zigpy-znp==0.8.2" ], "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" ] } ], "codeowners": [ "@dmulcahey", "@adminiuga", "@puddly" ], "zeroconf": [ { "type": "_esphomelib._tcp.local.", "name": "tube*" }, { "type": "_zigate-zigbee-gateway._tcp.local.", "name": "*zigate*" } ], "dependencies": [ "file_upload" ], "after_dependencies": [ "onboarding", "usb", "zeroconf" ], "iot_class": "local_polling", "loggers": [ "aiosqlite", "bellows", "crccheck", "pure_pcapy3", "zhaquirks", "zigpy", "zigpy_deconz", "zigpy_xbee", "zigpy_zigate", "zigpy_znp" ], "is_built_in": true }, "data": { "ieee": "**REDACTED**", "nwk": 54828, "manufacturer": "IKEA of Sweden", "model": "TRADFRI SHORTCUT Button", "name": "IKEA of Sweden TRADFRI SHORTCUT Button", "quirk_applied": true, "quirk_class": "zhaquirks.ikea.shortcutbtn.IkeaTradfriShortcutBtn", "manufacturer_code": 4476, "power_source": "Battery or Unknown", "lqi": 178, "rssi": null, "last_seen": "2022-09-13T23:35:18", "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": "0x0820", "in_clusters": [ "0x0000", "0x0001", "0x0003", "0x0009", "0x0020", "0x1000" ], "out_clusters": [ "0x0003", "0x0004", "0x0006", "0x0008", "0x0019", "0x0102", "0x1000" ] } } }, "active_coordinator": false, "entities": [ { "entity_id": "button.ikea_of_sweden_tradfri_shortcut_button_identifybutton", "name": "IKEA of Sweden TRADFRI SHORTCUT Button" }, { "entity_id": "sensor.ikea_of_sweden_tradfri_shortcut_button_battery", "name": "IKEA of Sweden TRADFRI SHORTCUT Button" } ], "neighbors": [], "endpoint_names": [ { "name": "NON_COLOR_CONTROLLER" } ], "user_given_name": null, "device_reg_id": "4e502e76718b392a38c901651e439a42", "area_id": null, "cluster_details": { "1": { "device_type": { "name": "NON_COLOR_CONTROLLER", "id": 2080 }, "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": {} }, "0x0009": { "endpoint_attribute": "alarms", "attributes": {}, "unsupported_attributes": {} }, "0x0020": { "endpoint_attribute": "poll_control", "attributes": {}, "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": {} }, "0x0102": { "endpoint_attribute": "window_covering", "attributes": {}, "unsupported_attributes": {} }, "0x1000": { "endpoint_attribute": "lightlink", "attributes": {}, "unsupported_attributes": {} } } } } } } ```
Additional logs: one of the buttons started working while collecting report info Bind log: ``` [0x0000:zdo] ZDO request ZDOCmd.Mgmt_Permit_Joining_rsp: [] [0x0000:zdo] No handler for ZDO request:ZDOCmd.Mgmt_Permit_Joining_rsp([]) Sending 'zdo_leave_req' failed: [0xD19C](TRADFRI SHORTCUT Button): last_seen is 475186.8700120449 seconds ago and ping attempts have been exhausted, marking the device unavailable [0xD19C](TRADFRI SHORTCUT Button): Update device availability - device available: False - new availability: False - changed: False New device 0xd230 (84:ba:20:ff:fe:d4:0e:1f) joined the network [0xd230] Scheduling initialization Received frame on uninitialized device from ep 0 to ep 0, cluster 19: b'\x810\xd2\x1f\x0e\xd4\xfe\xff \xba\x84\x80' [0xd230:zdo] ZDO request ZDOCmd.Device_annce: [0xD230, 84:ba:20:ff:fe:d4:0e:1f, 128] Tries remaining: 3 [0xd230] Requesting 'Node Descriptor' Tries remaining: 2 [0xd230] Extending timeout for 0x1d request Received frame on uninitialized device from ep 0 to ep 0, cluster 32770: b'\x1d\x000\xd2\x02@\x80|\x11RR\x00\x00,R\x00\x00' [0xd230] Got 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) [0xd230] Discovering endpoints Tries remaining: 3 [0xd230] Extending timeout for 0x1e request Received frame on uninitialized device from ep 0 to ep 0, cluster 32773: b'\x1e\x000\xd2\x01\x01' [0xd230] Discovered endpoints: [1] [0xd230] Initializing endpoints [>] [0xd230:1] Discovering endpoint information Tries remaining: 3 [0xd230] Extending timeout for 0x1f request Received frame on uninitialized device from ep 0 to ep 0, cluster 32772: b'\x1f\x000\xd2"\x01\x04\x01 \x08\x01\x06\x00\x00\x01\x00\x03\x00\t\x00 \x00\x00\x10\x07\x03\x00\x04\x00\x06\x00\x08\x00\x19\x00\x02\x01\x00\x10' [0xd230:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=2080, device_version=1, input_clusters=[0, 1, 3, 9, 32, 4096], output_clusters=[3, 4, 6, 8, 25, 258, 4096]) [0xD230:1:0x0000] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True, *is_reply=False), tsn=32, command_id=, *direction=, *is_reply=False) [0xD230:1:0x0000] Sending request: Read_Attributes(attribute_ids=[4, 5]) [0xd230] Extending timeout for 0x20 request [0xD230:1:0x0000] Received ZCL frame: b'\x18\x20\x01\x04\x00\x00\x42\x0E\x49\x4B\x45\x41\x20\x6F\x66\x20\x53\x77\x65\x64\x65\x6E\x05\x00\x00\x42\x17\x54\x52\x41\x44\x46\x52\x49\x20\x53\x48\x4F\x52\x54\x43\x55\x54\x20\x42\x75\x74\x74\x6F\x6E' [0xD230:1:0x0000] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=32, command_id=1, *direction=, *is_reply=True) [0xD230:1:0x0000] Decoded ZCL frame: Basic:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0004, status=, value=TypeValue(type=CharacterString, value='IKEA of Sweden')), ReadAttributeRecord(attrid=0x0005, status=, value=TypeValue(type=CharacterString, value='TRADFRI SHORTCUT Button'))]) [0xd230] Read model 'TRADFRI SHORTCUT Button' and manufacturer 'IKEA of Sweden' from > [0xd230] Discovered basic device information for Device is initialized Checking quirks for IKEA of Sweden TRADFRI SHORTCUT Button (84:ba:20:ff:fe:d4:0e:1f) Considering Fail because input cluster mismatch on at least one endpoint Considering Found custom device replacement for 84:ba:20:ff:fe:d4:0e:1f: 'button' component -> 'ZHAIdentifyButton' using ['identify'] 'sensor' component -> 'Battery' using ['power'] 'sensor' component -> 'RSSISensor' using ['basic'] 'sensor' component -> 'LQISensor' using ['basic'] device - 0xD230:84:ba:20:ff:fe:d4:0e:1f entering async_device_initialized - is_new_join: True device - 0xD230:84:ba:20:ff:fe:d4:0e:1f has joined the ZHA zigbee network [0xD230](TRADFRI SHORTCUT Button): started configuration [0xD230:ZDO](TRADFRI SHORTCUT Button): 'async_configure' stage succeeded [0xD230:1:0x0000]: Configuring cluster attribute reporting Error handling '_save_attribute' event with (84:ba:20:ff:fe:d4:0e:1f, 1, 0, 5, 'TRADFRI SHORTCUT Button') params: FOREIGN KEY constraint failed [0xD230:1:0x1000] Received ZCL frame: b'\x19\x23\x41\x01\x00\x00' [0xD230:1:0x1000] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=35, command_id=65, *direction=, *is_reply=True) [0xD230:1:0x1000] Decoded ZCL frame: LightLinkCluster:get_group_identifiers_rsp(total=1, start_index=0, group_info_records=[]) [0x0000:2] Cannot add 0x0000 group, no groups cluster [0x0000:1] Cannot add 0x0000 group, no groups cluster [0xD230:1:0x0001]: bound 'power' cluster: Status.SUCCESS [0xD230:1:0x0001] Received ZCL frame: b'\x08\x27\x07\x00' [0xD230:1:0x0001] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=39, command_id=7, *direction=, *is_reply=True) [0xD230:1:0x0001] Decoded ZCL frame: PowerConfiguration1CRCluster:Configure_Reporting_rsp(status_records=[ConfigureReportingResponseRecord(status=)]) [0xD230:1:0x0001]: Successfully configured reporting for '{'battery_voltage': (3600, 10800, 1), 'battery_percentage_remaining': (3600, 10800, 1)}' on 'power' cluster: [ConfigureReportingResponseRecord(status=)] [0x7F6A](DS01): Device seen - marking the device available and resetting counter [0x7F6A](DS01): Update device availability - device available: True - new availability: True - changed: False Device 0xd230 (84:ba:20:ff:fe:d4:0e:1f) left the network [0xBF0E](TS0044): Device seen - marking the device available and resetting counter [0xBF0E](TS0044): Update device availability - device available: True - new availability: True - changed: False [0xD230:1:0x0020]: Failed to bind 'poll_control' cluster: [0xD230:1:0x0102]: Failed to bind 'window_covering' cluster: [0xD230:1:0x0008]: Failed to bind 'level' cluster: [0xD230:1:0x0006]: Failed to bind 'on_off' cluster: Device 0xc65a (84:ba:20:ff:fe:d4:0e:1f) joined the network Device 84:ba:20:ff:fe:d4:0e:1f changed id (0xd230 => 0xc65a) [0xc65a] Skipping initialization, device is fully initialized Device is initialized device - 0xC65A:84:ba:20:ff:fe:d4:0e:1f entering async_device_initialized - is_new_join: True device - 0xC65A:84:ba:20:ff:fe:d4:0e:1f has joined the ZHA zigbee network [0xC65A](TRADFRI SHORTCUT Button): started configuration [0xC65A:ZDO](TRADFRI SHORTCUT Button): 'async_configure' stage succeeded [0xC65A:1:0x0000]: Configuring cluster attribute reporting [0xC65A:1:0x0020]: Couldn't set check-in interval: Request failed after 5 attempts: [0xC65A:1:0x0020]: finished channel configuration [0xC65A:1:0x0000]: 'async_configure' stage succeeded [0xC65A:1:0x0003]: 'async_configure' stage succeeded [0xC65A:1:0x0001]: 'async_configure' stage succeeded [0xC65A:1:0x0020]: 'async_configure' stage succeeded [0xC65A:1:0x1000]: 'async_configure' stage succeeded [0xC65A:1:0x0102]: 'async_configure' stage succeeded [0xC65A:1:0x0008]: 'async_configure' stage succeeded [0xC65A:1:0x0006]: 'async_configure' stage succeeded [0xC65A:1:0x0019]: 'async_configure' stage succeeded [0xC65A](TRADFRI SHORTCUT Button): completed configuration [0xC65A:1:0x0003] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=False), tsn=47, command_id=64, *direction=, *is_reply=False) [0xC65A:1:0x0003] Sending request: trigger_effect(effect_id=, effect_variant=) [0xc65a] Extending timeout for 0x2f request Device 0x20d3 (84:ba:20:ff:fe:d4:0e:1f) joined the network Device 84:ba:20:ff:fe:d4:0e:1f changed id (0xc65a => 0x20d3) [0x20d3] Skipping initialization, device is fully initialized Device is initialized device - 0x20D3:84:ba:20:ff:fe:d4:0e:1f entering async_device_initialized - is_new_join: True device - 0x20D3:84:ba:20:ff:fe:d4:0e:1f has joined the ZHA zigbee network [0x20D3](TRADFRI SHORTCUT Button): started configuration [0x20D3:ZDO](TRADFRI SHORTCUT Button): 'async_configure' stage succeeded [0x20D3:1:0x0000]: Configuring cluster attribute reporting Device 0x20d3 (84:ba:20:ff:fe:d4:0e:1f) joined the network [0x20d3:zdo] ZDO request ZDOCmd.Device_annce: [0x20D3, 84:ba:20:ff:fe:d4:0e:1f, 128] [0x20D3:1:0x1000] Received ZCL frame: b'\x19\x32\x41\x01\x00\x00' [0x20D3:1:0x1000] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=50, command_id=65, *direction=, *is_reply=True) [0x20D3:1:0x1000] Decoded ZCL frame: LightLinkCluster:get_group_identifiers_rsp(total=1, start_index=0, group_info_records=[]) [0x0000:2] Cannot add 0x0000 group, no groups cluster [0x0000:1] Cannot add 0x0000 group, no groups cluster [0x20D3:1:0x0001]: bound 'power' cluster: Status.SUCCESS [0x20D3:1:0x0020]: bound 'poll_control' cluster: Status.SUCCESS [0x20D3:1:0x0001] Received ZCL frame: b'\x08\x36\x07\x00' [0x20D3:1:0x0001] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=54, command_id=7, *direction=, *is_reply=True) [0x20D3:1:0x0001] Decoded ZCL frame: PowerConfiguration1CRCluster:Configure_Reporting_rsp(status_records=[ConfigureReportingResponseRecord(status=)]) [0x20D3:1:0x0001]: Successfully configured reporting for '{'battery_voltage': (3600, 10800, 1), 'battery_percentage_remaining': (3600, 10800, 1)}' on 'power' cluster: [ConfigureReportingResponseRecord(status=)] [0x20D3:1:0x0020] Received ZCL frame: b'\x18\x37\x04\x00' [0x20D3:1:0x0020] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=55, command_id=4, *direction=, *is_reply=True) [0x20D3:1:0x0020] Decoded ZCL frame: PollControl:Write_Attributes_rsp(status_records=[WriteAttributesStatusRecord(status=)]) [0x20D3:1:0x0020]: 3300.0s check-in interval set: Write_Attributes_rsp(status_records=[WriteAttributesStatusRecord(status=)]) [0x20D3:1:0x0020]: finished channel configuration [0x20D3:1:0x1000] Received ZCL frame: b'\x19\x2B\x41\x01\x00\x00' [0x20D3:1:0x1000] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=True, *is_general=False, *is_reply=True), tsn=43, command_id=65, *direction=, *is_reply=True) [0x20D3:1:0x1000] Decoded ZCL frame: LightLinkCluster:get_group_identifiers_rsp(total=1, start_index=0, group_info_records=[]) [0x0000:2] Cannot add 0x0000 group, no groups cluster [0x0000:1] Cannot add 0x0000 group, no groups cluster [0x20D3:1:0x0003] Received ZCL frame: b'\x08\x2F\x0B\x40\x00' [0x20D3:1:0x0003] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=47, command_id=11, *direction=, *is_reply=True) [0x20D3:1:0x0003] Decoded ZCL frame: Identify:Default_Response(command_id=64, status=) [0x20D3:1:0x0003]: executed 'trigger_effect' command with args: '(2, 0)' kwargs: '{}' result: Default_Response(command_id=64, status=) [0x20D3](TRADFRI SHORTCUT Button): started initialization [0x20D3:ZDO](TRADFRI SHORTCUT Button): 'async_initialize' stage succeeded [0x20D3:1:0x0000]: initializing channel: from_cache: False [0x20D3:1:0x0000]: finished channel initialization [0x20D3:1:0x0003]: initializing channel: from_cache: False [0x20D3:1:0x0003]: finished channel initialization [0x20D3:1:0x0001]: initializing channel: from_cache: False [0x20D3:1:0x0001]: initializing uncached channel attributes: ['battery_voltage', 'battery_percentage_remaining'] - from cache[False] [0x20D3:1:0x0001]: Reading attributes in chunks: ['battery_voltage', 'battery_percentage_remaining'] [0x20D3:1:0x0001] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True, *is_reply=False), tsn=56, command_id=, *direction=, *is_reply=False) [0x20D3:1:0x0001] Sending request: Read_Attributes(attribute_ids=[32, 33]) [0x20d3] Extending timeout for 0x38 request [0x20D3:1:0x0020]: initializing channel: from_cache: False [0x20D3:1:0x0020]: finished channel initialization [0x20D3:1:0x1000]: initializing channel: from_cache: False [0x20D3:1:0x1000]: finished channel initialization [0x20D3:1:0x0102]: initializing channel: from_cache: False [0x20D3:1:0x0102]: finished channel initialization [0x20D3:1:0x0008]: initializing channel: from_cache: False [0x20D3:1:0x0008]: finished channel initialization [0x20D3:1:0x0006]: initializing channel: from_cache: False [0x20D3:1:0x0006]: finished channel initialization [0x20D3:1:0x0019]: initializing channel: from_cache: False [0x20D3:1:0x0019]: finished channel initialization [0x20d3:zdo] ZDO request ZDOCmd.Bind_rsp: [] [0x20d3:zdo] No handler for ZDO request:ZDOCmd.Bind_rsp([]) [0x20D3:1:0x0001] Received ZCL frame: b'\x18\x38\x01\x20\x00\x00\x20\x00\x21\x00\x00\x20\x64' [0x20D3:1:0x0001] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=56, command_id=1, *direction=, *is_reply=True) [0x20D3:1:0x0001] Decoded ZCL frame: PowerConfiguration1CRCluster:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0020, status=, value=TypeValue(type=uint8_t, value=0)), ReadAttributeRecord(attrid=0x0021, status=, value=TypeValue(type=uint8_t, value=100))]) [0x20D3:1:0x0001]: Performing channel specific initialization: ['battery_voltage', 'battery_percentage_remaining'] [0x20D3:1:0x0001]: Reading attributes in chunks: ['battery_size', 'battery_quantity'] [0x20D3:1:0x0001]: finished channel initialization [0x20D3:1:0x0000]: 'async_initialize' stage succeeded [0x20D3:1:0x0003]: 'async_initialize' stage succeeded [0x20D3:1:0x0001]: 'async_initialize' stage succeeded [0x20D3:1:0x0020]: 'async_initialize' stage succeeded [0x20D3:1:0x1000]: 'async_initialize' stage succeeded [0x20D3:1:0x0102]: 'async_initialize' stage succeeded [0x20D3:1:0x0008]: 'async_initialize' stage succeeded [0x20D3:1:0x0006]: 'async_initialize' stage succeeded [0x20D3:1:0x0019]: 'async_initialize' stage succeeded [0x20D3](TRADFRI SHORTCUT Button): power source: Battery or Unknown [0x20D3](TRADFRI SHORTCUT Button): completed initialization [0x20D3:1:0x0001] Received ZCL frame: b'\x08\x36\x07\x00' [0x20D3:1:0x0001] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=54, command_id=7, *direction=, *is_reply=True) [0x20D3:1:0x0001] Decoded ZCL frame: PowerConfiguration1CRCluster:Configure_Reporting_rsp(status_records=[ConfigureReportingResponseRecord(status=)]) [0x20D3:1:0x0001] Received command 0x07 (TSN 54): Configure_Reporting_rsp(status_records=[ConfigureReportingResponseRecord(status=)]) [0x20d3:zdo] ZDO request ZDOCmd.Bind_rsp: [] [0x20d3:zdo] No handler for ZDO request:ZDOCmd.Bind_rsp([]) [0x20D3:1:0x0001]: Failed to bind 'power' cluster: [0x20D3:1:0x0020]: Failed to bind 'poll_control' cluster: [0x20D3:1:0x0102]: Failed to bind 'window_covering' cluster: [0x20D3:1:0x0008]: Failed to bind 'level' cluster: [0x20D3:1:0x0006]: Failed to bind 'on_off' cluster: [0x20D3:1:0x0102]: Failed to bind 'window_covering' cluster: [0x20D3:1:0x0008]: Failed to bind 'level' cluster: [0x20D3:1:0x0006]: Failed to bind 'on_off' cluster: [0x20D3:1:0x0000]: 'async_configure' stage succeeded [0x20D3:1:0x0003]: 'async_configure' stage succeeded [0x20D3:1:0x0001]: 'async_configure' stage succeeded [0x20D3:1:0x0020]: 'async_configure' stage succeeded [0x20D3:1:0x1000]: 'async_configure' stage succeeded [0x20D3:1:0x0102]: 'async_configure' stage succeeded [0x20D3:1:0x0008]: 'async_configure' stage succeeded [0x20D3:1:0x0006]: 'async_configure' stage succeeded [0x20D3:1:0x0019]: 'async_configure' stage succeeded [0x20D3](TRADFRI SHORTCUT Button): completed configuration [0x20D3:1:0x0003] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=False), tsn=59, command_id=64, *direction=, *is_reply=False) [0x20D3:1:0x0003] Sending request: trigger_effect(effect_id=, effect_variant=) [0x20d3] Extending timeout for 0x3b request [0xD19C](TRADFRI SHORTCUT Button): last_seen is 475264.87036395073 seconds ago and ping attempts have been exhausted, marking the device unavailable [0xD19C](TRADFRI SHORTCUT Button): Update device availability - device available: False - new availability: False - changed: False [0x7F6A](DS01): Device seen - marking the device available and resetting counter [0x7F6A](DS01): Update device availability - device available: True - new availability: True - changed: False [0x20D3:1:0x0020]: Couldn't set check-in interval: Request failed after 5 attempts: [0x20D3:1:0x0020]: finished channel configuration [0x20D3:1:0x0001]: failed to set reporting on 'power' cluster for: Request failed after 5 attempts: [0x20D3:1:0x0000]: 'async_configure' stage succeeded [0x20D3:1:0x0003]: 'async_configure' stage succeeded [0x20D3:1:0x0001]: 'async_configure' stage succeeded [0x20D3:1:0x0020]: 'async_configure' stage succeeded [0x20D3:1:0x1000]: 'async_configure' stage succeeded [0x20D3:1:0x0102]: 'async_configure' stage succeeded [0x20D3:1:0x0008]: 'async_configure' stage succeeded [0x20D3:1:0x0006]: 'async_configure' stage succeeded [0x20D3:1:0x0019]: 'async_configure' stage succeeded [0x20D3](TRADFRI SHORTCUT Button): completed configuration [0x20D3:1:0x0003] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False, *is_reply=False), tsn=60, command_id=64, *direction=, *is_reply=False) [0x20D3:1:0x0003] Sending request: trigger_effect(effect_id=, effect_variant=) [0x20d3] Extending timeout for 0x3c request [0x20D3:1:0x0003]: command failed: 'trigger_effect' args: '(2, 0)' kwargs '{}' exception: 'Request failed after 5 attempts: ' [0x20D3](TRADFRI SHORTCUT Button): started initialization [0x20D3:ZDO](TRADFRI SHORTCUT Button): 'async_initialize' stage succeeded [0x20D3:1:0x0000]: initializing channel: from_cache: False [0x20D3:1:0x0000]: finished channel initialization [0x20D3:1:0x0003]: initializing channel: from_cache: False [0x20D3:1:0x0003]: finished channel initialization [0x20D3:1:0x0001]: initializing channel: from_cache: False [0x20D3:1:0x0001]: initializing uncached channel attributes: ['battery_voltage', 'battery_percentage_remaining'] - from cache[False] [0x20D3:1:0x0001]: Reading attributes in chunks: ['battery_voltage', 'battery_percentage_remaining'] [0x20D3:1:0x0001] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True, *is_reply=False), tsn=61, command_id=, *direction=, *is_reply=False) [0x20D3:1:0x0001] Sending request: Read_Attributes(attribute_ids=[32, 33]) [0x20d3] Extending timeout for 0x3d request [0x20D3:1:0x0020]: initializing channel: from_cache: False [0x20D3:1:0x0020]: finished channel initialization [0x20D3:1:0x1000]: initializing channel: from_cache: False [0x20D3:1:0x1000]: finished channel initialization [0x20D3:1:0x0102]: initializing channel: from_cache: False [0x20D3:1:0x0102]: finished channel initialization [0x20D3:1:0x0008]: initializing channel: from_cache: False [0x20D3:1:0x0008]: finished channel initialization [0x20D3:1:0x0006]: initializing channel: from_cache: False [0x20D3:1:0x0006]: finished channel initialization [0x20D3:1:0x0019]: initializing channel: from_cache: False [0x20D3:1:0x0019]: finished channel initialization [0x20D3](TRADFRI SHORTCUT Button): Device seen - marking the device available and resetting counter [0x20D3](TRADFRI SHORTCUT Button): Update device availability - device available: True - new availability: True - changed: False [0x20D3:1:0x0003]: command failed: 'trigger_effect' args: '(2, 0)' kwargs '{}' exception: 'Request failed after 5 attempts: ' [0x20D3](TRADFRI SHORTCUT Button): started initialization [0x20D3:ZDO](TRADFRI SHORTCUT Button): 'async_initialize' stage succeeded [0x20D3:1:0x0000]: initializing channel: from_cache: False [0x20D3:1:0x0000]: finished channel initialization [0x20D3:1:0x0003]: initializing channel: from_cache: False [0x20D3:1:0x0003]: finished channel initialization [0x20D3:1:0x0001]: initializing channel: from_cache: False [0x20D3:1:0x0001]: initializing uncached channel attributes: ['battery_voltage', 'battery_percentage_remaining'] - from cache[False] [0x20D3:1:0x0001]: Reading attributes in chunks: ['battery_voltage', 'battery_percentage_remaining'] [0x20D3:1:0x0001] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True, *is_reply=False), tsn=62, command_id=, *direction=, *is_reply=False) [0x20D3:1:0x0001] Sending request: Read_Attributes(attribute_ids=[32, 33]) [0x20d3] Extending timeout for 0x3e request [0x20D3:1:0x0020]: initializing channel: from_cache: False [0x20D3:1:0x0020]: finished channel initialization [0x20D3:1:0x1000]: initializing channel: from_cache: False [0x20D3:1:0x1000]: finished channel initialization [0x20D3:1:0x0102]: initializing channel: from_cache: False [0x20D3:1:0x0102]: finished channel initialization [0x20D3:1:0x0008]: initializing channel: from_cache: False [0x20D3:1:0x0008]: finished channel initialization [0x20D3:1:0x0006]: initializing channel: from_cache: False [0x20D3:1:0x0006]: finished channel initialization [0x20D3:1:0x0019]: initializing channel: from_cache: False [0x20D3:1:0x0019]: finished channel initialization [0x20D3:1:0x0001]: failed to get attributes '['battery_voltage', 'battery_percentage_remaining']' on 'power' cluster: Request failed after 5 attempts: [0x20D3:1:0x0001]: async_initialize: retryable request #1 failed: Request failed after 5 attempts: . Retrying in 1.0s [0x20D3:1:0x0001]: initializing channel: from_cache: False [0x20D3:1:0x0001]: initializing uncached channel attributes: ['battery_voltage', 'battery_percentage_remaining'] - from cache[False] [0x20D3:1:0x0001]: Reading attributes in chunks: ['battery_voltage', 'battery_percentage_remaining'] [0x20D3:1:0x0001] Sending request header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=0, reserved=0, *is_cluster=False, *is_general=True, *is_reply=False), tsn=63, command_id=, *direction=, *is_reply=False) [0x20D3:1:0x0001] Sending request: Read_Attributes(attribute_ids=[32, 33]) [0x20d3] Extending timeout for 0x3f request [0xBF0E](TS0044): Device seen - marking the device available and resetting counter [0xBF0E](TS0044): Update device availability - device available: True - new availability: True - changed: False ``` Device 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": "0x0820", "in_clusters": [ "0x0000", "0x0001", "0x0003", "0x0009", "0x0020", "0x1000" ], "out_clusters": [ "0x0003", "0x0004", "0x0006", "0x0008", "0x0019", "0x0102", "0x1000" ] } }, "manufacturer": "IKEA of Sweden", "model": "TRADFRI SHORTCUT Button", "class": "zhaquirks.ikea.shortcutbtn.IkeaTradfriShortcutBtn" } ```
MattWestb commented 2 years ago

<Status.NWK_NO_ROUTE: 205> and Extending timeout for 0x9d request = the device is sleeping. Try waking the device up then its paring by pressing the button every 2 seconds then its looks its failing in sleep and not receiving the configuration OK.

Also if its paired OK do one reconfigure this device from the device card and not forgetting waking it up then sending things to it.

I can see you is having more sleepers but do you also have some routers that can helping the network preforms better ? Also wot coordinator is you using ?

NdK73 commented 2 years ago

Seems the anwer via mail got lost. But I now have news.

Just before re-pairing, I retested the button that yesterday didn't work and now it's working. The only change was a system upgrade (including a HA update to 2022.9.4) and a reboot. None of those changes was about the bridge, and previously I didn't see button presses in bridge's console. I'm really confused. But maybe the hint could help others: update and reboot! And wait the next day before trying do pair again.

Tks and sorry for the noise.

NdK73 commented 2 years ago

I already tried pressing the button at regular intervals w/ no luck :( The (currently...) working one did not require any presses, and its log is the one I attached at the end of the report.

I also read that newer fw on the button only allows binding to another device, so I also tried binding it to the coordinator from the device page in HA before retrying pairing.

The coordinator is a ZigStar Lan Gateway (link at the beginning of the report).

Tks, Diego

Il mer 14 set 2022, 08:46 MattWestb @.***> ha scritto:

<Status.NWK_NO_ROUTE: 205> and Extending timeout for 0x9d request = the device is sleeping. Try waking the device up then its paring by pressing the button every 2 seconds then its looks its failing in sleep and not receiving the configuration OK.

Also if its paired OK do one reconfigure this device from the device card and not forgetting waking it up then sending things to it.

I can see you is having more sleepers but do you also have some routers that can helping the network preforms better ? Also wot coordinator is you using ?

— Reply to this email directly, view it on GitHub https://github.com/zigpy/zha-device-handlers/issues/1752#issuecomment-1246316754, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAODXYJLLAZIF52364AK7HTV6FYFXANCNFSM6AAAAAAQL22PTA . You are receiving this because you authored the thread.Message ID: @.***>

TheJulianJES commented 1 year ago

Is there still an issue here? IKEA devices often need to be woken up again after re-pairing to reconfigure them.

So, open the device page -> click reconfigure device and shortly after starting the reconfiguration, press a button on the remote to wake it up.

NdK73 commented 1 year ago

issue seems device-dependant. One of the buttons is working w/o issues. The other one gets paired and then disappears. Sometimes it works for some time but suddenly stops. Also tried pressing the action button, start reconfiguration, press the button again every few seconds to keep it awake: reconfiguration failed anyway. BUT if I single-press the pairing button just before starting reconfiguration, it fails very early and events start to come thru.

MattWestb commented 1 year ago

Its can being problems if paring direct with the coordinator or one router (depends of the coordinator type). And IT coordinator is not setting up them OK then having them as direct children. Try paring thru on router and its very likely working OK and also reconfigure after its being paired.

NdK73 commented 1 year ago

Actually I couldn't pair it with various routers, but only with coordinator. I now moved it where it does have to go thru 2 or 3 routers and seems it's still working. But pairing is a nightmare.

aykevl commented 1 year ago

Had a similar issue. This did the trick for me:

The reconfigure went really fast, exited with an error, but it works nonetheless. I've tried removing/repairing/reconfiguring many times and removing the battery was the thing that finally did the trick for me.

donoghdb commented 1 year ago

@aykevl I have the same issue, even got IKEA to send another one but neither of them i can detect events. I have tried custom quirks but nothing is working :(

aykevl commented 1 year ago

@donoghdb I've now switched over to zigbee2mqtt and they got recognized instantly, no issues whatsoever. At least it shows that the issue really is with ZHA and not with any hardware.

donoghdb commented 1 year ago

Thank you @aykevl. I now have two working buttons :). ZHA is the issue.

malfurion commented 1 year ago

Hey there,

i have the same issue.

i've switched vom deconz to zha with my conbee 2 stick.

i use 3 tradfri shortcut buttons but only 1 is working after i tried hours of reconfiguration and so on but the 2 other buttons won't work.

does someone figured out a method to get them work ?

MattWestb commented 1 year ago

After getting the the device paired you shall doing one reconfigure from the device card and waking the device up by pressing one key so its not sleeping and can receiving the commands.

It can being tricky getting it working and with the new 24.5 firmware for IKEA controllers its the best way taking the battery out and waiting one half minute and putting it back then start the reconfigure at the same time (I know its not easy, im a Man ;-).

radian997 commented 1 year ago

I had the same issue with pairing Shortcut Button with my ZHA and CC2652P. I made several attempts to pair the button. The successful attempt was when I pressed the button regularly (every 1-2 seconds) during pairing and ~2 minutes after pairing. Now I see button events in the Home Assistant logbook

MattWestb commented 1 year ago

@radian997 I think TI is having one bug that is making problem adding all Zigbee 3 controllers / sleeping end devices direct to the coordinator. If having some router devices try joining them thru them and is very likely working better.

NdK73 commented 1 year ago

Already tried both workarounds (also combined):

Other devices (including a Tuya 4-button scene switch) work w/o issues. One of the two buttons also worked for some months then decided to not fire events. My Z2M-managed dongle (also CC2652P) w/ no routers attached ( = buttons are bound to the coordinator) sees events from both buttons. That makes me think it's a ZHA/zigpy issue, maybe in a quirk.

NdK73 commented 1 year ago

Seems the only procedure that seems to work quite often is: 1) delete shortcut button 2) restart HA 3) re-bind the button

Without step 2, events do not appear.

HIH.

MattWestb commented 1 year ago

After new paring IKEA controller always do one reconfigure for getting the reporting working OK and also dot forgetting binding the group for older for firmware / devices for latest versions if searing lights with them.

Edit: Then deleting one device wait one minute for letting (Z)HA writing the changes in the DB before joining the device or restart HA is also working well or ZHA is reusing the old data and not doing one new paring.

github-actions[bot] commented 11 months 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.