Closed MattWestb closed 1 year ago
Wast trying putting the coordinator IEEE as data:
service: zha_toolkit.bind_ieee
data:
ieee: 1c:34:f1:ff:fe:78:57:15
command_data: 00:0d:6f:ff:fe:12:db:36
cluster: 64640
tries: 5
And then ZHA is sending the bind request and the device is responding success and start sending commands from EP 2 and 3.
So i think the data 0 is not working for binding the coordinator as in the instruction.
Edit:
ZHA log:
2023-03-05 11:03:13.809 DEBUG (MainThread) [zigpy.zcl] [0xBD72:1:0x0006] Decoded ZCL frame: OnOff:toggle()
2023-03-05 11:03:13.813 DEBUG (MainThread) [zigpy.zcl] [0xBD72:1:0x0006] Received command 0x02 (TSN 25): toggle()
2023-03-05 11:03:13.815 DEBUG (MainThread) [zigpy.zcl] [0xBD72:1:0x0006] No explicit handler for cluster command 0x02: toggle()
2023-03-05 11:03:14.197 INFO (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Running websocket_api script
2023-03-05 11:03:14.198 INFO (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Executing step call service
2023-03-05 11:03:14.202 INFO (MainThread) [custom_components.zha_toolkit] Running ZHA Toolkit service: <ServiceCall zha_toolkit.bind_ieee (c:01GTRKKCWKBHPTJA37CCJGYSMB): ieee=1c:34:f1:ff:fe:78:57:15, command_data=00:0d:6f:ff:fe:12:db:36, cluster=64640, tries=5>
2023-03-05 11:03:14.283 DEBUG (MainThread) [custom_components.zha_toolkit] module is <module 'custom_components.zha_toolkit' from '/config/custom_components/zha_toolkit/__init__.py'>
2023-03-05 11:03:14.295 DEBUG (MainThread) [custom_components.zha_toolkit.utils] Parameters '{'ieee': 1c:34:f1:ff:fe:78:57:15, 'command_data': '00:0d:6f:ff:fe:12:db:36', 'cluster': 64640, 'tries': 5}'
2023-03-05 11:03:14.296 DEBUG (MainThread) [custom_components.zha_toolkit.utils] Final manf 'None'
2023-03-05 11:03:14.300 DEBUG (MainThread) [custom_components.zha_toolkit] 'ieee' parameter: '1c:34:f1:ff:fe:78:57:15' -> IEEE Addr: '1c:34:f1:ff:fe:78:57:15'
2023-03-05 11:03:14.301 DEBUG (MainThread) [custom_components.zha_toolkit] Default handler for bind_ieee
2023-03-05 11:03:14.302 DEBUG (MainThread) [custom_components.zha_toolkit] Handler: <function command_handler_default at 0x8babeec8>
2023-03-05 11:03:14.303 DEBUG (MainThread) [custom_components.zha_toolkit] running default command: <ServiceCall zha_toolkit.bind_ieee (c:01GTRKKCWKBHPTJA37CCJGYSMB): ieee=1c:34:f1:ff:fe:78:57:15, command_data=00:0d:6f:ff:fe:12:db:36, cluster=64640, tries=5>
2023-03-05 11:03:14.314 DEBUG (MainThread) [custom_components.zha_toolkit.default] Trying to import custom_components.zha_toolkit.binds to call bind_ieee
2023-03-05 11:03:14.333 DEBUG (MainThread) [custom_components.zha_toolkit.utils] IEEE for get_device: 00:0d:6f:ff:fe:12:db:36
2023-03-05 11:03:14.334 DEBUG (MainThread) [custom_components.zha_toolkit.binds] 0xBD72: got endpoints [2, 3] for out-cluster 0xFC80
2023-03-05 11:03:14.336 DEBUG (MainThread) [custom_components.zha_toolkit.binds] 0xbd72: binding 1c:34:f1:ff:fe:78:57:15/EP:2, out-cluster 0xFC80 to 00:0d:6f:ff:fe:12:db:36/EP:1
2023-03-05 11:03:14.338 DEBUG (MainThread) [zigpy.device] [0xbd72] Extending timeout for 0x0e request
2023-03-05 11:03:14.930 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0xBD72), src_ep=0, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=0, source_route=None, extended_timeout=False, tsn=6, profile_id=0, cluster_id=32801, data=Serialized[b'\x0e\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=196, rssi=-54)
2023-03-05 11:03:14.935 DEBUG (MainThread) [custom_components.zha_toolkit.binds] 0xbd72: binding ieee 00:0d:6f:ff:fe:12:db:36: [<Status.SUCCESS: 0>]
2023-03-05 11:03:14.936 DEBUG (MainThread) [custom_components.zha_toolkit.binds] 0xbd72: binding 1c:34:f1:ff:fe:78:57:15/EP:3, out-cluster 0xFC80 to 00:0d:6f:ff:fe:12:db:36/EP:1
2023-03-05 11:03:14.943 DEBUG (MainThread) [zigpy.device] [0xbd72] Extending timeout for 0x10 request
2023-03-05 11:03:15.888 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0xBD72), src_ep=0, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=0, source_route=None, extended_timeout=False, tsn=7, profile_id=0, cluster_id=32801, data=Serialized[b'\x10\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=204, rssi=-52)
2023-03-05 11:03:15.899 DEBUG (MainThread) [custom_components.zha_toolkit.binds] 0xbd72: binding ieee 00:0d:6f:ff:fe:12:db:36: [<Status.SUCCESS: 0>]
2023-03-05 11:03:15.900 DEBUG (MainThread) [custom_components.zha_toolkit.binds] 0xBD72: got endpoints [2, 3] for in cluster 0xFC80
2023-03-05 11:03:15.902 DEBUG (MainThread) [custom_components.zha_toolkit.binds] 0xBD72: binding 1c:34:f1:ff:fe:78:57:15/EP:2, in-cluster: 0xFC80 to 00:0d:6f:ff:fe:12:db:36/EP:1
2023-03-05 11:03:15.908 DEBUG (MainThread) [zigpy.device] [0xbd72] Extending timeout for 0x12 request
2023-03-05 11:03:16.732 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x2F6F](TRADFRI motion sensor): Device seen - marking the device available and resetting counter
2023-03-05 11:03:16.733 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x2F6F](TRADFRI motion sensor): Update device availability - device available: True - new availability: True - changed: False
2023-03-05 11:03:16.904 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0xBD72), src_ep=0, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=0, source_route=None, extended_timeout=False, tsn=8, profile_id=0, cluster_id=32801, data=Serialized[b'\x12\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=204, rssi=-54)
2023-03-05 11:03:16.912 DEBUG (MainThread) [custom_components.zha_toolkit.binds] 0xBD72: binding ieee 00:0d:6f:ff:fe:12:db:36: [<Status.SUCCESS: 0>]
2023-03-05 11:03:16.913 DEBUG (MainThread) [custom_components.zha_toolkit.binds] 0xBD72: binding 1c:34:f1:ff:fe:78:57:15/EP:3, in-cluster: 0xFC80 to 00:0d:6f:ff:fe:12:db:36/EP:1
2023-03-05 11:03:16.916 DEBUG (MainThread) [zigpy.device] [0xbd72] Extending timeout for 0x14 request
2023-03-05 11:03:17.230 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0xBD72), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=9, profile_id=260, cluster_id=6, data=Serialized[b'\x11\x1a\x02'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=204, rssi=-54)
2023-03-05 11:03:17.234 DEBUG (MainThread) [zigpy.zcl] [0xBD72:1:0x0006] Received ZCL frame: b'\x11\x1a\x02'
2023-03-05 11:03:17.250 DEBUG (MainThread) [zigpy.zcl] [0xBD72:1:0x0006] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=<FrameType.CLUSTER_COMMAND: 1>, is_manufacturer_specific=0, direction=<Direction.Server_to_Client: 0>, disable_default_response=1, reserved=0, *is_cluster=True, *is_general=False, *is_reply=False), tsn=26, command_id=2, *direction=<Direction.Server_to_Client: 0>, *is_reply=False)
2023-03-05 11:03:17.256 DEBUG (MainThread) [zigpy.zcl] [0xBD72:1:0x0006] Decoded ZCL frame: OnOff:toggle()
2023-03-05 11:03:17.259 DEBUG (MainThread) [zigpy.zcl] [0xBD72:1:0x0006] Received command 0x02 (TSN 26): toggle()
2023-03-05 11:03:17.269 DEBUG (MainThread) [zigpy.zcl] [0xBD72:1:0x0006] No explicit handler for cluster command 0x02: toggle()
2023-03-05 11:03:18.282 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0xBD72), src_ep=0, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=0, source_route=None, extended_timeout=False, tsn=10, profile_id=0, cluster_id=32801, data=Serialized[b'\x14\x00'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=200, rssi=-52)
2023-03-05 11:03:18.287 DEBUG (MainThread) [custom_components.zha_toolkit.binds] 0xBD72: binding ieee 00:0d:6f:ff:fe:12:db:36: [<Status.SUCCESS: 0>]
2023-03-05 11:03:18.288 DEBUG (MainThread) [custom_components.zha_toolkit] event_data {'zha_toolkit_version': 'dev', 'zigpy_version': '0.53.2', 'zigpy_rf_version': '0.34.9', 'ieee_org': 1c:34:f1:ff:fe:78:57:15, 'ieee': '1c:34:f1:ff:fe:78:57:15', 'command': 'bind_ieee', 'command_data': '00:0d:6f:ff:fe:12:db:36', 'start_time': '2023-03-05T10:03:14.299793+00:00', 'errors': [], 'params': {'cluster_id': 64640, 'dir': 0, 'tries': 5, 'expect_reply': True, 'args': [], 'read_before_write': True, 'read_after_write': True}, 'result': {2: {'src_endpoint_id': 2, 'dst_endpoint_id': 1, 'cluster_id': 64640, 'result': [<Status.SUCCESS: 0>]}, 3: {'src_endpoint_id': 3, 'dst_endpoint_id': 1, 'cluster_id': 64640, 'result': [<Status.SUCCESS: 0>]}}, 'success': True}
Thank you @MattWestb for reporting this with precision.
The code did check for 0 but in this case it is a string that is "0" so it does not match the number 0.
I updated the code to match "0" as well.
It is likely that if you do not specify command_data or if you leave empty that it also worked.
I do not release a new version specifically for this, but it will be in a future release.
Thanks for you great work with this tool !!
I was struggling and was getting it working more or less mistake then your instructions is very good and i was first thinking it was one bug.
Was testing without data in the GUI but the system dont like it and throwing one error.
Ok, I see - I changed the code so that the "command_data" is not longer required for that service.
I have one new device IKEA Symfonisk 2 with updated firmware and i need binding cluster
0xfc80
on EP 2 and 3 to the coordinator for getting the command from them and implanting them in one device quirk. Device signature:I trying bind IEEE with this command but wireshark is showing ZHA is not sending it.
If is trying couster 6 is doing binding on EP 1 OK. ZHA log then trying binding:
Can you pleas hinting my what i is doing wrong ?
Thanks in advance !!