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
721 stars 669 forks source link

Button "Push ME" from Marmitek #2891

Closed frank-schubidoo closed 1 month ago

frank-schubidoo commented 8 months ago

Problem description

The button pairs just fine with ZHA but doesn't generate anything that can be used in an automation (onoff etc.).

Solution description

Very much a newbie here: guess a quirk is needed that makes that button be used in automations.

Screenshots/Video

Screenshots/Video [Paste/upload your media here]

Device signature

Device signature ```json { "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=4098, 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": "0x0104", "device_type": "0x0000", "input_clusters": [ "0x0000", "0x0001", "0x0006" ], "output_clusters": [ "0x0006", "0x000a", "0x0019" ] } }, "manufacturer": "_TYZB01_1xktopx6", "model": "TS0041A", "class": "zigpy.device.Device" } ```

Diagnostic information

Diagnostic information ```json { "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=4098, 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": "0x0104", "device_type": "0x0000", "input_clusters": [ "0x0000", "0x0001", "0x0006" ], "output_clusters": [ "0x0006", "0x000a", "0x0019" ] } }, "manufacturer": "_TYZB01_1xktopx6", "model": "TS0041A", "class": "zigpy.device.Device" } ```

Logs

Logs ```python 2024-01-08 14:28:08.731 DEBUG (MainThread) [zigpy.application] Feeding watchdog 2024-01-08 14:28:08.731 DEBUG (MainThread) [bellows.ezsp.protocol] Send command readCounters: () 2024-01-08 14:28:08.733 DEBUG (bellows.thread_0) [bellows.uart] Sending: b'414121a9a52a9fcd7e' 2024-01-08 14:28:08.751 DEBUG (bellows.thread_0) [bellows.uart] Data frame: b'1541a1a9a52a15b23f940e25aa5592499c4e27abedce688bfdc66389fc7e3fa7ebcdde6f8fffc7dbd5d2698c4623a9ec763ba5ea758241984c2613b1e070381c0e07bbe5ca658a459a4d9e4f9ff7c3d9d46a35a251904824bfc27e' 2024-01-08 14:28:08.752 DEBUG (bellows.thread_0) [bellows.uart] Sending: b'82503a7e' 2024-01-08 14:28:08.754 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame received readCounters: [[0, 102, 68, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] 2024-01-08 14:28:08.756 DEBUG (MainThread) [bellows.ezsp.protocol] Send command getValue: (,) 2024-01-08 14:28:08.758 DEBUG (bellows.thread_0) [bellows.uart] Sending: b'524621a9fe2a1644267e' 2024-01-08 14:28:08.765 DEBUG (bellows.thread_0) [bellows.uart] Data frame: b'2646a1a9fe2a15b3a5ee207e' 2024-01-08 14:28:08.766 DEBUG (bellows.thread_0) [bellows.uart] Sending: b'83401b7e' 2024-01-08 14:28:08.767 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame received getValue: [, b'\xfc'] 2024-01-08 14:28:08.768 DEBUG (MainThread) [bellows.zigbee.application] Free buffers status EzspStatus.SUCCESS, value: 252 2024-01-08 14:28:08.768 DEBUG (MainThread) [bellows.zigbee.application] ezsp_counters: [MAC_RX_BROADCAST = 147, MAC_TX_BROADCAST = 6119, MAC_RX_UNICAST = 1879, MAC_TX_UNICAST_SUCCESS = 306, MAC_TX_UNICAST_RETRY = 26, MAC_TX_UNICAST_FAILED = 22, APS_DATA_RX_BROADCAST = 11, APS_DATA_TX_BROADCAST = 11, APS_DATA_RX_UNICAST = 414, APS_DATA_TX_UNICAST_SUCCESS = 94, APS_DATA_TX_UNICAST_RETRY = 0, APS_DATA_TX_UNICAST_FAILED = 0, ROUTE_DISCOVERY_INITIATED = 0, NEIGHBOR_ADDED = 2, NEIGHBOR_REMOVED = 2, NEIGHBOR_STALE = 0, JOIN_INDICATION = 5, CHILD_REMOVED = 4, ASH_OVERFLOW_ERROR = 0, ASH_FRAMING_ERROR = 0, ASH_OVERRUN_ERROR = 0, NWK_FRAME_COUNTER_FAILURE = 0, APS_FRAME_COUNTER_FAILURE = 0, UTILITY = 0, APS_LINK_KEY_NOT_AUTHORIZED = 0, NWK_DECRYPTION_FAILURE = 0, APS_DECRYPTION_FAILURE = 0, ALLOCATE_PACKET_BUFFER_FAILURE = 0, RELAYED_UNICAST = 0, PHY_TO_MAC_QUEUE_LIMIT_REACHED = 0, PACKET_VALIDATE_LIBRARY_DROPPED_COUNT = 0, TYPE_NWK_RETRY_OVERFLOW = 0, PHY_CCA_FAIL_COUNT = 8, BROADCAST_TABLE_FULL = 0, PTA_LO_PRI_REQUESTED = 0, PTA_HI_PRI_REQUESTED = 0, PTA_LO_PRI_DENIED = 0, PTA_HI_PRI_DENIED = 0, PTA_LO_PRI_TX_ABORTED = 0, PTA_HI_PRI_TX_ABORTED = 0, ADDRESS_CONFLICT_SENT = 0, EZSP_FREE_BUFFERS = 252] 2024-01-08 14:28:09.469 WARNING (MainThread) [hahomematic.client.json_rpc] GET_ALL_SYSTEM_VARIABLES failed: ValueError [invalid literal for int() with base 10: ''] Failed to parse SysVar ${sysVarAlarmMessages} 2024-01-08 14:28:09.976 DEBUG (bellows.thread_0) [bellows.uart] Data frame: b'3646b1a9112a15b658924a24ab5593499ca16306cdcd9874f9c75174fd7c5f947e' 2024-01-08 14:28:09.977 DEBUG (bellows.thread_0) [bellows.uart] Sending: b'8430fc7e' 2024-01-08 14:28:09.979 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame received incomingMessageHandler: [, EmberApsFrame(profileId=260, clusterId=6, sourceEndpoint=1, destinationEndpoint=1, options=, groupId=0, sequence=239), 68, -83, 0x0320, 255, 255, b'\x012\xfd\x01'] 2024-01-08 14:28:09.980 DEBUG (MainThread) [bellows.ezsp.protocol] Frame contains trailing data: b'\x02' 2024-01-08 14:28:09.980 DEBUG (MainThread) [bellows.zigbee.application] Received incomingMessageHandler frame with [, EmberApsFrame(profileId=260, clusterId=6, sourceEndpoint=1, destinationEndpoint=1, options=, groupId=0, sequence=239), 68, -83, 0x0320, 255, 255, b'\x012\xfd\x01'] 2024-01-08 14:28:09.980 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(timestamp=datetime.datetime(2024, 1, 8, 13, 28, 9, 980841, tzinfo=datetime.timezone.utc), src=AddrModeAddress(addr_mode=, address=0x0320), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=239, profile_id=260, cluster_id=6, data=Serialized[b'\x012\xfd\x01'], tx_options=, radius=0, non_member_radius=0, lqi=68, rssi=-83) 2024-01-08 14:28:09.982 DEBUG (MainThread) [zigpy.zcl] [0x0320:1:0x0006] Received ZCL frame: b'\x012\xfd\x01' 2024-01-08 14:28:09.983 DEBUG (MainThread) [zigpy.zcl] [0x0320:1:0x0006] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False), tsn=50, command_id=253, *direction=) 2024-01-08 14:28:09.984 WARNING (MainThread) [zigpy.zcl] [0x0320:1:0x0006] Unknown cluster command 253 b'\x01' 2024-01-08 14:28:09.984 DEBUG (MainThread) [zigpy.zcl] [0x0320:1:0x0006] Received command 0xFD (TSN 50): b'\x01' 2024-01-08 14:28:09.984 DEBUG (MainThread) [zigpy.zcl] [0x0320:1:0x0006] No explicit handler for cluster command 0xfd: b'\x01' 2024-01-08 14:28:09.984 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0320:1:0x0006]: received '0xFD' command with b'\x01' args on cluster_id '6' tsn '50' 2024-01-08 14:28:09.986 DEBUG (Thread-8) [aiosqlite] executing functools.partial(, 'UPDATE devices_v12\n SET last_seen=:ts\n WHERE ieee=:ieee AND :ts - last_seen > :min_update_delta', {'ts': 1704720489.980841, 'ieee': 8c:f6:81:ff:fe:f4:92:d5, 'min_update_delta': 30.0}) 2024-01-08 14:28:09.991 DEBUG (Thread-8) [aiosqlite] operation functools.partial(, 'UPDATE devices_v12\n SET last_seen=:ts\n WHERE ieee=:ieee AND :ts - last_seen > :min_update_delta', {'ts': 1704720489.980841, 'ieee': 8c:f6:81:ff:fe:f4:92:d5, 'min_update_delta': 30.0}) completed 2024-01-08 14:28:09.995 DEBUG (Thread-8) [aiosqlite] executing functools.partial() 2024-01-08 14:28:09.996 DEBUG (Thread-8) [aiosqlite] operation functools.partial() completed 2024-01-08 14:28:10.684 DEBUG (bellows.thread_0) [bellows.uart] Data frame: b'4646b1a9112a15b658924a24ab5593499cbe1302cdcd9874f9c75174fd7c98367e' 2024-01-08 14:28:10.685 DEBUG (bellows.thread_0) [bellows.uart] Sending: b'8520dd7e' 2024-01-08 14:28:10.687 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame received incomingMessageHandler: [, EmberApsFrame(profileId=260, clusterId=6, sourceEndpoint=1, destinationEndpoint=1, options=, groupId=0, sequence=240), 52, -87, 0x0320, 255, 255, b'\x012\xfd\x01'] 2024-01-08 14:28:10.687 DEBUG (MainThread) [bellows.ezsp.protocol] Frame contains trailing data: b'\x02' 2024-01-08 14:28:10.688 DEBUG (MainThread) [bellows.zigbee.application] Received incomingMessageHandler frame with [, EmberApsFrame(profileId=260, clusterId=6, sourceEndpoint=1, destinationEndpoint=1, options=, groupId=0, sequence=240), 52, -87, 0x0320, 255, 255, b'\x012\xfd\x01'] 2024-01-08 14:28:10.688 DEBUG (MainThread) [zigpy.application] Received a packet: ZigbeePacket(timestamp=datetime.datetime(2024, 1, 8, 13, 28, 10, 688550, tzinfo=datetime.timezone.utc), src=AddrModeAddress(addr_mode=, address=0x0320), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=240, profile_id=260, cluster_id=6, data=Serialized[b'\x012\xfd\x01'], tx_options=, radius=0, non_member_radius=0, lqi=52, rssi=-87) 2024-01-08 14:28:10.690 DEBUG (MainThread) [zigpy.zcl] [0x0320:1:0x0006] Received ZCL frame: b'\x012\xfd\x01' 2024-01-08 14:28:10.690 DEBUG (MainThread) [zigpy.zcl] [0x0320:1:0x0006] Decoded ZCL frame header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=0, direction=, disable_default_response=0, reserved=0, *is_cluster=True, *is_general=False), tsn=50, command_id=253, *direction=) 2024-01-08 14:28:10.691 WARNING (MainThread) [zigpy.zcl] [0x0320:1:0x0006] Unknown cluster command 253 b'\x01' 2024-01-08 14:28:10.692 DEBUG (MainThread) [zigpy.zcl] [0x0320:1:0x0006] Received command 0xFD (TSN 50): b'\x01' 2024-01-08 14:28:10.692 DEBUG (MainThread) [zigpy.zcl] [0x0320:1:0x0006] No explicit handler for cluster command 0xfd: b'\x01' 2024-01-08 14:28:10.692 DEBUG (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x0320:1:0x0006]: received '0xFD' command with b'\x01' args on cluster_id '6' tsn '50' 2024-01-08 14:28:10.694 DEBUG (Thread-8) [aiosqlite] executing functools.partial(, 'UPDATE devices_v12\n SET last_seen=:ts\n WHERE ieee=:ieee AND :ts - last_seen > :min_update_delta', {'ts': 1704720490.68855, 'ieee': 8c:f6:81:ff:fe:f4:92:d5, 'min_update_delta': 30.0}) 2024-01-08 14:28:10.696 DEBUG (Thread-8) [aiosqlite] operation functools.partial(, 'UPDATE devices_v12\n SET last_seen=:ts\n WHERE ieee=:ieee AND :ts - last_seen > :min_update_delta', {'ts': 1704720490.68855, 'ieee': 8c:f6:81:ff:fe:f4:92:d5, 'min_update_delta': 30.0}) completed 2024-01-08 14:28:10.698 DEBUG (Thread-8) [aiosqlite] executing functools.partial() 2024-01-08 14:28:10.698 DEBUG (Thread-8) [aiosqlite] operation functools.partial() completed ```

Custom quirk

Custom quirk ```python [Paste your custom quirk here] ```

Additional information

No response

Eth030 commented 7 months ago

man i am so sad, just bought it ;( grafik it paired with skyconnect without issues but you cant use it for nothing

Eth030 commented 7 months ago

i found this quirk, added a quirk folder to ha and added that path to config: https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/tuya/ts0041.py now it works

frank-schubidoo commented 7 months ago

@Eth030 , how did you find that quirk and knew that this applies to this button? Just so next time I know where to look and what to do. thanks!

Eth030 commented 7 months ago

I’m sorry I don’t have a fact-based response. I just googled the device number, etc., and found a similar product and the quirk. I wasn’t sure if it would work, but it’s the same product, just differently branded. So, I tried, and it worked.Am 29.01.2024 um 11:06 schrieb frank-schubidoo @.***>: @Eth030 , how did you find that quirk and knew that this applies to this button? Just so next time I know where to look and what to do. thanks!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

frank-schubidoo commented 7 months ago

Nothing wrong with gut feeling. Thanks again!

I’m sorry I don’t have a fact-based response. I just googled the device number, etc., and found a similar product and the quirk. I wasn’t sure if it would work, but it’s the same product, just differently branded. So, I tried, and it worked.Am 29.01.2024 um 11:06 schrieb frank-schubidoo @.***>:

@Eth030 , how did you find that quirk and knew that this applies to this button? Just so next time I know where to look and what to do. thanks!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

github-actions[bot] commented 1 month 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.