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
692 stars 639 forks source link

[Device Support Request] TS0601 by _TZE200_cirvgep4 #2304

Open pete1019 opened 1 year ago

pete1019 commented 1 year ago

TS0601 by _TZE200_cirvgep4

No Humidity, Temperature or Battery Time and Date not updating either.

image

This had Humidity, Temperature or Battery but UNKNOWN value: https://github.com/zigpy/zha-device-handlers/issues/1944#issuecomment-1486634014

Signature 1 before:

Diagnostic information ```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=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, 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": "0x0051", "in_clusters": [ "0x0000", "0x0004", "0x0005", "0xef00" ], "out_clusters": [ "0x000a", "0x0019" ] } }, "manufacturer": "_TZE200_cirvgep4", "model": "TS0601", "class": "zigpy.device.Device" } ```

Signature 2 after:

Diagnostic information ```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=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, 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": "0x0302", "in_clusters": [ "0x0000", "0x0001", "0x0004", "0x0005", "0x0402", "0x0405", "0xef00" ], "out_clusters": [ "0x000a", "0x0019" ] } }, "manufacturer": "_TZE200_cirvgep4", "model": "TS0601", "class": "ts0601_sensor.TuyaTempHumiditySensorVar03" } ```
Orthodux commented 1 year ago

Can you share the full code of your quirk?

pete1019 commented 1 year ago

Which quirk have you tried?

This one: class TuyaTempHumiditySensorVar03(CustomDevice)

This has Humidity, Temperature and Battery but UNKNOWN values. No Time and no Date.

Orthodux commented 1 year ago

Can you try this?

``` """Tuya Air Quality sensor.""" from zigpy.profiles import zha from zigpy.quirks import CustomDevice from zigpy.zcl.clusters.general import Basic, GreenPowerProxy, Groups, Ota, Scenes, Time from zhaquirks.const import ( DEVICE_TYPE, ENDPOINTS, INPUT_CLUSTERS, MODELS_INFO, OUTPUT_CLUSTERS, PROFILE_ID, ) from zhaquirks.tuya.air import ( TuyaAirQualityCO2, TuyaAirQualityFormaldehyde, TuyaAirQualityHumidity, TuyaAirQualityTemperature, TuyaAirQualityVOC, TuyaCO2ManufCluster, ) class TuyaCO2Sensor(CustomDevice): """Tuya Air quality device.""" signature = { # 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=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)] # device_version=1 # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1, # input_clusters=[0, 4, 5, 61184], # output_clusters=[25, 10]) MODELS_INFO: [ ("_TZE200_8ygsuhe1", "TS0601"), ("_TZE200_yvx5lh6k", "TS0601"), ("_TZE200_dwcarsat", "TS0601"), ("_TZE200_cirvgep4", "TS0601"), ], ENDPOINTS: { 1: { PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.SMART_PLUG, INPUT_CLUSTERS: [ Basic.cluster_id, Groups.cluster_id, Scenes.cluster_id, TuyaCO2ManufCluster.cluster_id, ], OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id], } }, } replacement = { ENDPOINTS: { 1: { DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT, INPUT_CLUSTERS: [ Basic.cluster_id, Groups.cluster_id, Scenes.cluster_id, TuyaCO2ManufCluster, TuyaAirQualityCO2, TuyaAirQualityFormaldehyde, TuyaAirQualityHumidity, TuyaAirQualityTemperature, TuyaAirQualityVOC, ], OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id], } } } class TuyaCO2SensorGPP(CustomDevice): """Tuya Air quality device with GPP.""" signature = { # 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=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)] # device_version=1 # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1, # input_clusters=[0, 4, 5, 61184], # output_clusters=[25, 10]) MODELS_INFO: [ ("_TZE200_ryfmq5rl", "TS0601"), ("_TZE200_yvx5lh6k", "TS0601"), ("_TZE200_dwcarsat", "TS0601"), ("_TZE200_c2fmom5z", "TS0601"), ("_TZE200_cirvgep4", "TS0601"), ], ENDPOINTS: { 1: { PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.SMART_PLUG, INPUT_CLUSTERS: [ Basic.cluster_id, Groups.cluster_id, Scenes.cluster_id, TuyaCO2ManufCluster.cluster_id, ], OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id], }, 242: { # , complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False) # device_version=1 # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1, # input_clusters=[0, 4, 5, 61184], # output_clusters=[25, 10]) MODELS_INFO: [ ("_TZE200_ogkdpgy2", "TS0601"), ("_TZE200_cirvgep4", "TS0601"), ], ENDPOINTS: { 1: { PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.SMART_PLUG, INPUT_CLUSTERS: [ Basic.cluster_id, Groups.cluster_id, Scenes.cluster_id, TuyaCO2ManufCluster.cluster_id, ], OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id], }, 242: { #
pete1019 commented 1 year ago

You added this everywhere: should only be there once, huh? ("_TZE200_cirvgep4", "TS0601"),

Orthodux commented 1 year ago

Correct but only to see which quirk was getting used by the device. Once I knew which quirk was used, I removed the others.

image

pete1019 commented 1 year ago

Good but think you only got lucky and it always uses the last entry.

MattWestb commented 1 year ago

ZHA is reading the quirks from top to bottom and if its match one device class its stopping and using that class.

pete1019 commented 1 year ago

ZHA is reading the quirks from top to bottom and if its match one device class its stopping and using that class.

thanks, still everything UNKNOWN. And no Time and Date update. What can i do?

image

Orthodux commented 1 year ago

You did a restart of HA? As it still reads the old quirk? Or am I mistaken?

pete1019 commented 1 year ago

I tried yours but there was nothing but VOC Sensor which i dont have.

javicalle commented 1 year ago

Enable the debug logs (with the quirk applied) and attach them. Usually the logs after putting battery on the device gives most of the relevant info.

pete1019 commented 1 year ago

Enable the debug logs (with the quirk applied) and attach them. Usually the logs after putting battery on the device gives most of the relevant info.

Here is the log:

``` Device 0xe518 (a4:c1:38:56:18:b8:1f:bc) joined the network [0xE518:1:0x0004] 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=77, command_id=2, *direction=, *is_reply=False) [0xE518:1:0x0004] Sending request: get_membership(groups=[]) [0xe518] Extending timeout for 0x4d request Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=0, dst=AddrModeAddress(addr_mode=, address=), dst_ep=0, source_route=None, extended_timeout=False, tsn=19, profile_id=0, cluster_id=19, data=Serialized[b'\x01\x18\xe5\xbc\x1f\xb8\x18V8\xc1\xa4\x80'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-36) Device 0xe518 (a4:c1:38:56:18:b8:1f:bc) joined the network [0xe518] Cancelling old group rescan [0xe518:zdo] ZDO request ZDOCmd.Device_annce: [0xE518, a4:c1:38:56:18:b8:1f:bc, 128] [0xE518:1:0x0004] 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=79, command_id=2, *direction=, *is_reply=False) [0xE518:1:0x0004] Sending request: get_membership(groups=[]) [0xe518] Extending timeout for 0x4f request Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=20, profile_id=260, cluster_id=4, data=Serialized[b'\x19M\x02\x10\x00'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-36) [0xE518:1:0x0004] Received ZCL frame: b'\x19M\x02\x10\x00' [0xE518:1:0x0004] 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=77, command_id=2, *direction=, *is_reply=True) [0xE518:1:0x0004] Decoded ZCL frame: Groups:get_membership_response(capacity=16, groups=[]) [0xe518] Invalid state on future for 0x4d seq -- probably duplicate response Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=21, profile_id=260, cluster_id=4, data=Serialized[b'\x18M\x0b\x02\x00'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-36) [0xE518:1:0x0004] Received ZCL frame: b'\x18M\x0b\x02\x00' [0xE518:1:0x0004] 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=77, command_id=11, *direction=, *is_reply=True) [0xE518:1:0x0004] Decoded ZCL frame: Groups:Default_Response(command_id=2, status=) [0xe518] Invalid state on future for 0x4d seq -- probably duplicate response Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=22, profile_id=260, cluster_id=4, data=Serialized[b'\x19O\x02\x10\x00'], tx_options=, radius=0, non_member_radius=0, lqi=252, rssi=-37) [0xE518:1:0x0004] Received ZCL frame: b'\x19O\x02\x10\x00' [0xE518:1:0x0004] 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=79, command_id=2, *direction=, *is_reply=True) [0xE518:1:0x0004] Decoded ZCL frame: Groups:get_membership_response(capacity=16, groups=[]) Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=23, profile_id=260, cluster_id=4, data=Serialized[b'\x18O\x0b\x02\x00'], tx_options=, radius=0, non_member_radius=0, lqi=255, rssi=-36) [0xE518:1:0x0004] Received ZCL frame: b'\x18O\x0b\x02\x00' [0xE518:1:0x0004] 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=79, command_id=11, *direction=, *is_reply=True) [0xE518:1:0x0004] Decoded ZCL frame: Groups:Default_Response(command_id=2, status=) [0xE518:1:0x0004] Received command 0x0B (TSN 79): Default_Response(command_id=2, status=) Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=0, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=0, source_route=None, extended_timeout=False, tsn=24, profile_id=0, cluster_id=2, data=Serialized[b'\x02\x00\x00'], tx_options=, radius=0, non_member_radius=0, lqi=240, rssi=-40) [0xe518:zdo] ZDO request ZDOCmd.Node_Desc_req: [0x0000] [0xe518:zdo] No handler for ZDO request:ZDOCmd.Node_Desc_req([0x0000]) Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=0, dst=AddrModeAddress(addr_mode=, address=), dst_ep=0, source_route=None, extended_timeout=False, tsn=27, profile_id=0, cluster_id=54, data=Serialized[b'\x03\xb4\x01'], tx_options=, radius=0, non_member_radius=0, lqi=244, rssi=-39) [0xe518:zdo] ZDO request ZDOCmd.Mgmt_Permit_Joining_req: [180, ] Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=28, profile_id=260, cluster_id=61184, data=Serialized[b'\t4\x11\x00\x06@'], tx_options=, radius=0, non_member_radius=0, lqi=244, rssi=-39) [0xE518:1:0xef00] Received ZCL frame: b'\t4\x11\x00\x06@' [0xE518:1:0xef00] 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, *is_reply=True), tsn=52, command_id=17, *direction=, *is_reply=True) [0xE518:1:0xef00] Decoded ZCL frame: TemperatureHumidityManufCluster:mcu_version_response(version=MCUVersion(status=0, tsn=6, version_raw=64, *version='1.0.0')) [0xE518:1:0xef00] Received command 0x11 (TSN 52): mcu_version_response(version=MCUVersion(status=0, tsn=6, version_raw=64, *version='1.0.0')) [0xE518:1:0xef00] MCU version: 1.0.0 [0xE518:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=52, command_id=, *direction=, *is_reply=True) [0xE518:1:0xef00] Sending reply: Default_Response(command_id=17, status=) Error handling '_save_attribute' event with (a4:c1:38:56:18:b8:1f:bc, 1, 61184, 61184, '1.0.0') params: FOREIGN KEY constraint failed Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=29, profile_id=260, cluster_id=0, data=Serialized[b'\x085\n\x01\x00 H\xe2\xff 8\xe4\xff \x01'], tx_options=, radius=0, non_member_radius=0, lqi=244, rssi=-39) [0xE518:1:0x0000] Received ZCL frame: b'\x085\n\x01\x00 H\xe2\xff 8\xe4\xff \x01' [0xE518:1:0x0000] 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=53, command_id=10, *direction=, *is_reply=True) [0xE518:1:0x0000] Decoded ZCL frame: Basic:Report_Attributes(attribute_reports=[Attribute(attrid=0x0001, value=TypeValue(type=uint8_t, value=72)), Attribute(attrid=0xFFE2, value=TypeValue(type=uint8_t, value=56)), Attribute(attrid=0xFFE4, value=TypeValue(type=uint8_t, value=1))]) [0xE518:1:0x0000] Received command 0x0A (TSN 53): Report_Attributes(attribute_reports=[Attribute(attrid=0x0001, value=TypeValue(type=uint8_t, value=72)), Attribute(attrid=0xFFE2, value=TypeValue(type=uint8_t, value=56)), Attribute(attrid=0xFFE4, value=TypeValue(type=uint8_t, value=1))]) [0xE518:1:0x0000] Attribute report received: app_version=72, 0xFFE2=56, 0xFFE4=1 [0xE518:1:0x0000] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=53, command_id=, *direction=, *is_reply=True) [0xE518:1:0x0000] Sending reply: Default_Response(command_id=10, status=) Error handling '_save_attribute' event with (a4:c1:38:56:18:b8:1f:bc, 1, 0, 1, 72) params: FOREIGN KEY constraint failed Error handling '_save_attribute' event with (a4:c1:38:56:18:b8:1f:bc, 1, 0, 65506, 56) params: FOREIGN KEY constraint failed Error handling '_save_attribute' event with (a4:c1:38:56:18:b8:1f:bc, 1, 0, 65508, 1) params: FOREIGN KEY constraint failed Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=30, profile_id=260, cluster_id=10, data=Serialized[b'\x006\x00\x07\x00'], tx_options=, radius=0, non_member_radius=0, lqi=244, rssi=-39) [0xE518:1:0x000a] Received ZCL frame: b'\x006\x00\x07\x00' [0xE518:1:0x000a] 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=False), tsn=54, command_id=0, *direction=, *is_reply=False) [0xE518:1:0x000a] Decoded ZCL frame: Time:Read_Attributes(attribute_ids=[7]) [0xE518:1:0x000a] Received command 0x00 (TSN 54): Read_Attributes(attribute_ids=[7]) [0xE518:1:0x000a] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=54, command_id=, *direction=, *is_reply=True) [0xE518:1:0x000a] Sending reply: Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0007, status=, value=TypeValue(type=LocalTime, value=733364525))]) [0x0D6F](TS0004): Attempting to checkin with device - missed checkins: 1 [0x0D6F: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=84, command_id=, *direction=, *is_reply=False) [0x0D6F:1:0x0000] Sending request: Read_Attributes(attribute_ids=[4]) Sending 'zdo_leave_req' failed: [0x7A5F](lumi.weather): Device seen - marking the device available and resetting counter [0x7A5F](lumi.weather): Update device availability - device available: True - new availability: True - changed: False [0x4737](lumi.sensor_magnet.aq2): last_seen is 138059.5460395813 seconds ago and ping attempts have been exhausted, marking the device unavailable [0x4737](lumi.sensor_magnet.aq2): Update device availability - device available: False - new availability: False - changed: False [0x16FD](lumi.sensor_magnet.aq2): last_seen is 137910.55700683594 seconds ago and ping attempts have been exhausted, marking the device unavailable [0x16FD](lumi.sensor_magnet.aq2): Update device availability - device available: False - new availability: False - changed: False [0x6A0E](lumi.weather): Device seen - marking the device available and resetting counter [0x6A0E](lumi.weather): Update device availability - device available: True - new availability: True - changed: False [0xD993](lumi.weather): Device seen - marking the device available and resetting counter [0xD993](lumi.weather): Update device availability - device available: True - new availability: True - changed: False New device 0xe518 (a4:c1:38:56:18:b8:1f:bc) joined the network [0xe518] Scheduling initialization Tries remaining: 3 [0xe518] Requesting 'Node Descriptor' Tries remaining: 2 [0xe518] Extending timeout for 0x56 request Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=0, dst=AddrModeAddress(addr_mode=, address=), dst_ep=0, source_route=None, extended_timeout=False, tsn=86, profile_id=0, cluster_id=19, data=Serialized[b'\x00\x18\xe5\xbc\x1f\xb8\x18V8\xc1\xa4\x80'], tx_options=, radius=0, non_member_radius=0, lqi=232, rssi=-42) Device 0xe518 (a4:c1:38:56:18:b8:1f:bc) joined the network [0xe518] Scheduling initialization [0xe518] Canceling old initialize call Received frame on uninitialized device from ep 0 to ep 0, cluster 19: b'\x00\x18\xe5\xbc\x1f\xb8\x18V8\xc1\xa4\x80' [0xe518:zdo] ZDO request ZDOCmd.Device_annce: [0xE518, a4:c1:38:56:18:b8:1f:bc, 128] Tries remaining: 3 [0xe518] Requesting 'Node Descriptor' Tries remaining: 2 [0xe518] Extending timeout for 0x58 request Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=0, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=0, source_route=None, extended_timeout=False, tsn=87, profile_id=0, cluster_id=32770, data=Serialized[b'V\x00\x18\xe5\x02@\x80A\x11BB\x00\x00*B\x00\x00'], tx_options=, radius=0, non_member_radius=0, lqi=232, rssi=-42) Received frame on uninitialized device from ep 0 to ep 0, cluster 32770: b'V\x00\x18\xe5\x02@\x80A\x11BB\x00\x00*B\x00\x00' [0xe518] Invalid state on future for 0x56 seq -- probably duplicate response Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=0, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=0, source_route=None, extended_timeout=False, tsn=88, profile_id=0, cluster_id=32770, data=Serialized[b'X\x00\x18\xe5\x02@\x80A\x11BB\x00\x00*B\x00\x00'], tx_options=, radius=0, non_member_radius=0, lqi=236, rssi=-41) Received frame on uninitialized device from ep 0 to ep 0, cluster 32770: b'X\x00\x18\xe5\x02@\x80A\x11BB\x00\x00*B\x00\x00' [0xe518] 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=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, 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) [0xe518] Discovering endpoints Tries remaining: 3 [0xe518] Extending timeout for 0x5a request Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=0, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=0, source_route=None, extended_timeout=False, tsn=89, profile_id=0, cluster_id=32773, data=Serialized[b'Z\x00\x18\xe5\x01\x01'], tx_options=, radius=0, non_member_radius=0, lqi=232, rssi=-42) Received frame on uninitialized device from ep 0 to ep 0, cluster 32773: b'Z\x00\x18\xe5\x01\x01' [0xe518] Discovered endpoints: [1] [0xe518] Initializing endpoints [>] [0xe518:1] Discovering endpoint information Tries remaining: 3 [0xe518] Extending timeout for 0x5c request Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=0, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=0, source_route=None, extended_timeout=False, tsn=90, profile_id=0, cluster_id=32772, data=Serialized[b'\\\x00\x18\xe5\x14\x01\x04\x01Q\x00\x01\x04\x04\x00\x05\x00\x00\xef\x00\x00\x02\x19\x00\n\x00'], tx_options=, radius=0, non_member_radius=0, lqi=232, rssi=-42) Received frame on uninitialized device from ep 0 to ep 0, cluster 32772: b'\\\x00\x18\xe5\x14\x01\x04\x01Q\x00\x01\x04\x04\x00\x05\x00\x00\xef\x00\x00\x02\x19\x00\n\x00' [0xe518:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=81, device_version=1, input_clusters=[4, 5, 61184, 0], output_clusters=[25, 10]) Unknown cluster 0xEF00 [0xE518: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=94, command_id=, *direction=, *is_reply=False) [0xE518:1:0x0000] Sending request: Read_Attributes(attribute_ids=[4, 5]) [0xe518] Extending timeout for 0x5e request [0x4358](TS011F): Attempting to checkin with device - missed checkins: 1 [0x4358: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=96, command_id=, *direction=, *is_reply=False) [0x4358:1:0x0000] Sending request: Read_Attributes(attribute_ids=[4]) Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=91, profile_id=260, cluster_id=0, data=Serialized[b'\x18^\x01\x04\x00\x00B\x10_TZE200_cirvgep4\x05\x00\x00B\x06TS0601'], tx_options=, radius=0, non_member_radius=0, lqi=236, rssi=-41) [0xE518:1:0x0000] Received ZCL frame: b'\x18^\x01\x04\x00\x00B\x10_TZE200_cirvgep4\x05\x00\x00B\x06TS0601' [0xE518: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=94, command_id=1, *direction=, *is_reply=True) [0xE518:1:0x0000] Decoded ZCL frame: Basic:Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0004, status=, value=TypeValue(type=CharacterString, value='_TZE200_cirvgep4')), ReadAttributeRecord(attrid=0x0005, status=, value=TypeValue(type=CharacterString, value='TS0601'))]) [0xe518] Read model 'TS0601' and manufacturer '_TZE200_cirvgep4' from > [0xe518] Discovered basic device information for Device is initialized Checking quirks for _TZE200_cirvgep4 TS0601 (a4:c1:38:56:18:b8:1f:bc) Considering Found custom device replacement for a4:c1:38:56:18:b8:1f:bc: 'sensor' component -> 'Battery' using ['power'] 'sensor' component -> 'Temperature' using ['temperature'] 'sensor' component -> 'RSSISensor' using ['basic'] 'sensor' component -> 'LQISensor' using ['basic'] 'sensor' component -> 'Humidity' using ['humidity'] device - 0xE518:a4:c1:38:56:18:b8:1f:bc entering async_device_initialized - is_new_join: True device - 0xE518:a4:c1:38:56:18:b8:1f:bc has joined the ZHA zigbee network [0xE518](TS0601): started configuration [0xE518:ZDO](TS0601): 'async_configure' stage succeeded Error handling '_save_attribute' event with (a4:c1:38:56:18:b8:1f:bc, 1, 0, 4, '_TZE200_cirvgep4') params: FOREIGN KEY constraint failed [0xE518:1:0x0001]: skipping channel configuration [0xE518:1:0x0405]: skipping channel configuration [0xE518:1:0x0000]: skipping channel configuration [0xE518:1:0x0402]: skipping channel configuration [0xE518:1:0xef00]: skipping channel configuration [0xE518:1:0x0019]: skipping channel configuration Error handling '_save_attribute' event with (a4:c1:38:56:18:b8:1f:bc, 1, 0, 5, 'TS0601') params: FOREIGN KEY constraint failed [0xE518:1:0x0001]: 'async_configure' stage succeeded [0xE518:1:0x0405]: 'async_configure' stage succeeded [0xE518:1:0x0000]: 'async_configure' stage succeeded [0xE518:1:0x0402]: 'async_configure' stage succeeded [0xE518:1:0xef00]: 'async_configure' stage succeeded [0xE518:1:0x0019]: 'async_configure' stage succeeded [0xE518](TS0601): completed configuration [0xE518](TS0601): started initialization [0xE518:ZDO](TS0601): 'async_initialize' stage succeeded [0xE518:1:0x0001]: Skipping channel initialization [0xE518:1:0x0405]: Skipping channel initialization [0xE518:1:0x0000]: Skipping channel initialization [0xE518:1:0x0402]: Skipping channel initialization [0xE518:1:0xef00]: Skipping channel initialization [0xE518:1:0x0019]: Skipping channel initialization [0xE518:1:0x0001]: 'async_initialize' stage succeeded [0xE518:1:0x0405]: 'async_initialize' stage succeeded [0xE518:1:0x0000]: 'async_initialize' stage succeeded [0xE518:1:0x0402]: 'async_initialize' stage succeeded [0xE518:1:0xef00]: 'async_initialize' stage succeeded [0xE518:1:0x0019]: 'async_initialize' stage succeeded [0xE518](TS0601): power source: Battery or Unknown [0xE518](TS0601): completed initialization Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=92, profile_id=260, cluster_id=10, data=Serialized[b'\x00)\x00\x07\x00'], tx_options=, radius=0, non_member_radius=0, lqi=252, rssi=-37) [0xE518:1:0x000a] Received ZCL frame: b'\x00)\x00\x07\x00' [0xE518:1:0x000a] 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=False), tsn=41, command_id=0, *direction=, *is_reply=False) [0xE518:1:0x000a] Decoded ZCL frame: Time:Read_Attributes(attribute_ids=[7]) [0xE518:1:0x000a] Received command 0x00 (TSN 41): Read_Attributes(attribute_ids=[7]) [0xE518:1:0x000a] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=41, command_id=, *direction=, *is_reply=True) [0xE518:1:0x000a] Sending reply: Read_Attributes_rsp(status_records=[ReadAttributeRecord(attrid=0x0007, status=, value=TypeValue(type=LocalTime, value=733364557))]) Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=93, profile_id=260, cluster_id=0, data=Serialized[b'\x08*\n\x01\x00 H\xe2\xff 8\xe4\xff \x01'], tx_options=, radius=0, non_member_radius=0, lqi=240, rssi=-40) [0xE518:1:0x0000] Received ZCL frame: b'\x08*\n\x01\x00 H\xe2\xff 8\xe4\xff \x01' [0xE518:1:0x0000] 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=42, command_id=10, *direction=, *is_reply=True) [0xE518:1:0x0000] Decoded ZCL frame: Basic:Report_Attributes(attribute_reports=[Attribute(attrid=0x0001, value=TypeValue(type=uint8_t, value=72)), Attribute(attrid=0xFFE2, value=TypeValue(type=uint8_t, value=56)), Attribute(attrid=0xFFE4, value=TypeValue(type=uint8_t, value=1))]) [0xE518:1:0x0000] Received command 0x0A (TSN 42): Report_Attributes(attribute_reports=[Attribute(attrid=0x0001, value=TypeValue(type=uint8_t, value=72)), Attribute(attrid=0xFFE2, value=TypeValue(type=uint8_t, value=56)), Attribute(attrid=0xFFE4, value=TypeValue(type=uint8_t, value=1))]) [0xE518:1:0x0000] Attribute report received: app_version=72, 0xFFE2=56, 0xFFE4=1 [0xE518:1:0x0000] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=42, command_id=, *direction=, *is_reply=True) [0xE518:1:0x0000] Sending reply: Default_Response(command_id=10, status=) Received a packet: ZigbeePacket(src=AddrModeAddress(addr_mode=, address=0xE518), src_ep=1, dst=AddrModeAddress(addr_mode=, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=94, profile_id=260, cluster_id=61184, data=Serialized[b'\t+\x11\x00\x03@'], tx_options=, radius=0, non_member_radius=0, lqi=244, rssi=-39) [0xE518:1:0xef00] Received ZCL frame: b'\t+\x11\x00\x03@' [0xE518:1:0xef00] 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, *is_reply=True), tsn=43, command_id=17, *direction=, *is_reply=True) [0xE518:1:0xef00] Decoded ZCL frame: TemperatureHumidityManufCluster:mcu_version_response(version=MCUVersion(status=0, tsn=3, version_raw=64, *version='1.0.0')) [0xE518:1:0xef00] Received command 0x11 (TSN 43): mcu_version_response(version=MCUVersion(status=0, tsn=3, version_raw=64, *version='1.0.0')) [0xE518:1:0xef00] MCU version: 1.0.0 [0xE518:1:0xef00] Sending reply header: ZCLHeader(frame_control=FrameControl(frame_type=, is_manufacturer_specific=False, direction=, disable_default_response=1, reserved=0, *is_cluster=False, *is_general=True, *is_reply=True), tsn=43, command_id=, *direction=, *is_reply=True) [0xE518:1:0xef00] Sending reply: Default_Response(command_id=17, status=) ```
javicalle commented 1 year ago

We need the logs just after these, once device is initialized, it would send a status report with values. I also would expect the time synchronization command. Maybe this device needs some Tuya magic.

pete1019 commented 1 year ago

@javicalle Where I see and save the debug log now for you? Thanks!

Diagnostics file here:

``` { "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/Berlin", "os_name": "Linux", "os_version": "5.15.90", "supervisor": "2023.03.2", "host_os": "Home Assistant OS 9.5", "docker_version": "20.10.22", "chassis": "vm", "run_as_root": true }, "custom_components": { "hacs": { "version": "1.31.0", "requirements": [ "aiogithubapi>=22.10.1" ] } }, "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": 58648, "manufacturer": "_TZE200_cirvgep4", "model": "TS0601", "name": "_TZE200_cirvgep4 TS0601", "quirk_applied": true, "quirk_class": "ts0601_sensor.TuyaTempHumiditySensorVar03", "manufacturer_code": 4417, "power_source": "Battery or Unknown", "lqi": 255, "rssi": -36, "last_seen": "2023-03-29T08:58:50", "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=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, 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": "0x0302", "in_clusters": [ "0x0000", "0x0001", "0x0004", "0x0005", "0x0402", "0x0405", "0xef00" ], "out_clusters": [ "0x000a", "0x0019" ] } } }, "active_coordinator": false, "entities": [ { "entity_id": "sensor.tze200_cirvgep4_ts0601_battery", "name": "_TZE200_cirvgep4 TS0601" }, { "entity_id": "sensor.tze200_cirvgep4_ts0601_temperature", "name": "_TZE200_cirvgep4 TS0601" }, { "entity_id": "sensor.tze200_cirvgep4_ts0601_humidity", "name": "_TZE200_cirvgep4 TS0601" } ], "neighbors": [], "routes": [], "endpoint_names": [ { "name": "TEMPERATURE_SENSOR" } ], "user_given_name": null, "device_reg_id": "4a5748b11996696439578e87fd20be35", "area_id": null, "cluster_details": { "1": { "device_type": { "name": "TEMPERATURE_SENSOR", "id": 770 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0001": { "attribute_name": "app_version", "value": 72 } }, "unsupported_attributes": {} }, "0x0004": { "endpoint_attribute": "groups", "attributes": {}, "unsupported_attributes": {} }, "0x0005": { "endpoint_attribute": "scenes", "attributes": {}, "unsupported_attributes": {} }, "0xef00": { "endpoint_attribute": "tuya_manufacturer", "attributes": { "0xef00": { "attribute_name": "mcu_version", "value": "1.0.0" } }, "unsupported_attributes": {} }, "0x0402": { "endpoint_attribute": "temperature", "attributes": {}, "unsupported_attributes": {} }, "0x0405": { "endpoint_attribute": "humidity", "attributes": {}, "unsupported_attributes": {} }, "0x0001": { "endpoint_attribute": "power", "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": { "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} }, "0x000a": { "endpoint_attribute": "time", "attributes": {}, "unsupported_attributes": {} } } } } } } ```
pete1019 commented 1 year ago

And here is the debug log: https://www.securesha.re/?#u=2e9ee6270acc583ad4ff730f8cb660da.bin&p=nFqoWJqNruXzUCxH9WeDmQuuZmnxwaKVJdWpZJIC2es

javicalle commented 1 year ago

Sorry, the links has expired. Can you post the logs here like you have done with the diagnostic info?

pete1019 commented 1 year ago

@javicalle File was too big.

here it is: home-assistant (3) (1).log

javicalle commented 1 year ago

I can't see any report from device. Have you tried to remove the device, wait a couple of minutes and pair the device again? Check in the logs for logs like this ones:

[zigpy.zcl] [0xE518:1:0xef00] Received ZCL frame:

That ones will be Tuya reports from your device. Any information from that reports will be relevant.

dm94 commented 1 year ago

I have this same device, how can I help to implement it?

So far I have seen this https://github.com/Koenkk/zigbee2mqtt/issues/17008

petr-nov commented 11 months ago

I can confirm that the following quirk works for me for the device _TZE200_cirvgep4 : https://github.com/zigpy/zha-device-handlers/files/10940201/ts0601_temperature.zip The device identification must be added to the file TS0601, _TZE200_cirvgep4

Temperature and humidity are displayed correctly. Battery not available. After connecting, you need to wait a few minutes - then the date and time will be updated and the temperature and humidity will begin to be transmitted. The transfer lasts until you press the backlight button. Then the signal symbol starts flashing and the transmission is interrupted.

It would be great if someone could solve this problem.

TheDonPaul commented 11 months ago

I can confirm this, including the problem with the button being pressed. It is quite tricky to connect the cirvgep4, but once running the connection is stable - until the button is pressed. As soon as this is done, the connection is broken, and you need to remove/re-add the device again. So yes, this problem really needs to be solved. I do not quite understand how this works with other Zigbee devices - presumably the device needs to KNOW it is already paired, and not enter in another 'searching' state again.

amibumping commented 8 months ago

I can confirm that the following quirk works for me for the device _TZE200_cirvgep4 : https://github.com/zigpy/zha-device-handlers/files/10940201/ts0601_temperature.zip The device identification must be added to the file TS0601, _TZE200_cirvgep4

Temperature and humidity are displayed correctly. Battery not available. After connecting, you need to wait a few minutes - then the date and time will be updated and the temperature and humidity will begin to be transmitted. The transfer lasts until you press the backlight button. Then the signal symbol starts flashing and the transmission is interrupted.

It would be great if someone could solve this problem.

Hi, can you please help me setting that custom quirk, it's the first time I do it.

I have added to config.yaml

zha:
  enable_quirks: true
  custom_quirks_path: /mnt/dietpi_userdata/homeassistant/config/custom_zha_quirks/

Then I added the file you attached to that new created folder, and then I restarted HA, but nothing happen. I re-add the sensor again, but no reporting, or update.

I don`t know where to do what you say here:

The device identification must be added to the file TS0601, _TZE200cirvgep4 EDIT: Ok, found it!

If it helps to others: Replace line 157 with this. MODELS_INFO: [("_TZE200_locansqn", "TS0601"), ("_TZE200_cirvgep4", "TS0601")],

Thank you!

Fogh commented 8 months ago

I can confirm that the following quirk works for me for the device _TZE200_cirvgep4 : https://github.com/zigpy/zha-device-handlers/files/10940201/ts0601_temperature.zip The device identification must be added to the file TS0601, _TZE200_cirvgep4

Temperature and humidity are displayed correctly. Battery not available. After connecting, you need to wait a few minutes - then the date and time will be updated and the temperature and humidity will begin to be transmitted. The transfer lasts until you press the backlight button. Then the signal symbol starts flashing and the transmission is interrupted.

It would be great if someone could solve this problem.

Thanks! That quirk works after device identification is added to the file, but it seems like the clock is set to UTC time. Is this a Home Assistant issue?

scotrod commented 7 months ago

I feel like a total noob, but I just got this device delivered by the mail, I've got the official Home Assistant USB Zigbee stick, what can I do to add this device in my instance? Any help would be appreciated. Thanks.

NeoMod commented 7 months ago

I feel like a total noob, but I just got this device delivered by the mail, I've got the official Home Assistant USB Zigbee stick, what can I do to add this device in my instance? Any help would be appreciated. Thanks.

Don't worry, it's the whole system that's not really user-friendly. Honestly, you could use a custom quirk to make this device appear in HA but in all the months that I have had, it never quite worked fine. Most of the time it misbehaves, loses connection with ZHA, stops reporting a value, or simply won't pair at all. I ended up using it as an overpriced paperweight, a testament to reminding myself to never assume "it will work with HA" and in general with Zigbee accessories, whether they are cheap or not.

Me2d81 commented 7 months ago

This quirk is only partially functional. The battery level display does not work for me. I have no idea how it will behave after pressing the button and I have no idea if the time will be adjusted correctly. But still, great job! Thanks

petr-nov commented 7 months ago

After three months of use, I can confirm that the temperature and humidity are transmitted correctly, the date and time are kept accurately. I haven't had a single signal outage since the first connection. It is necessary to avoid pressing the button, which will cause the connection to be disconnected. I have two of these thermometers.

scotrod commented 7 months ago

After three months of use, I can confirm that the temperature and humidity are transmitted correctly, the date and time are kept accurately. I haven't had a single signal outage since the first connection. It is necessary to avoid pressing the button, which will cause the connection to be disconnected. I have two of these thermometers.

Can you point me to some step-by-step guide how to include these "quirks" or whatever is that you use in order to integrate the sensor to my HA instance? I don't know where to start from really.

petr-nov commented 7 months ago

After three months of use, I can confirm that the temperature and humidity are transmitted correctly, the date and time are kept accurately. I haven't had a single signal outage since the first connection. It is necessary to avoid pressing the button, which will cause the connection to be disconnected. I have two of these thermometers.

Can you point me to some step-by-step guide how to include these "quirks" or whatever is that you use in order to integrate the sensor to my HA instance? I don't know where to start from really.

  1. On HA create directory like /config/custom_zha_quirks/
  2. Download this zip file https://github.com/zigpy/zha-device-handlers/files/10940201/ts0601_temperature.zip
  3. Unzip and edit file ts0601_temperature.py Replace line 157 with this. MODELS_INFO: [("_TZE200_locansqn", "TS0601"), ("_TZE200_cirvgep4", "TS0601")],
  4. Copy edited ts0601_temperature.py into HA in directory/config/custom_zha_quirks/
  5. Add this lines into Configuration.yaml file: zha: enable_quirks: true custom_quirks_path: /config/custom_zha_quirks/
  6. Restart HA
  7. Pair thermometer in the usual way
  8. After connecting, you need to wait a few minutes - then the date and time will be updated and the temperature and humidity will begin to be transmitted.
  9. Avoid pressing the button on thermometer!
scotrod commented 7 months ago

After three months of use, I can confirm that the temperature and humidity are transmitted correctly, the date and time are kept accurately. I haven't had a single signal outage since the first connection. It is necessary to avoid pressing the button, which will cause the connection to be disconnected. I have two of these thermometers.

Can you point me to some step-by-step guide how to include these "quirks" or whatever is that you use in order to integrate the sensor to my HA instance? I don't know where to start from really.

1. On HA create directory like  /config/custom_zha_quirks/

2. Download this zip file https://github.com/zigpy/zha-device-handlers/files/10940201/ts0601_temperature.zip

3. Unzip and edit file ts0601_temperature.py
   Replace line 157 with this.
   MODELS_INFO: [("_TZE200_locansqn", "TS0601"), ("_TZE200_cirvgep4", "TS0601")],

4. Copy edited ts0601_temperature.py into HA in directory/config/custom_zha_quirks/

5. Add this lines into Configuration.yaml file:
   zha:
   enable_quirks: true
   custom_quirks_path: /config/custom_zha_quirks/

6. Restart HA

7. Pair thermometer in the usual way

8. After connecting, you need to wait a few minutes - then the date and time will be updated and the temperature and humidity will begin to be transmitted.

9. Avoid pressing the button on thermometer!

Someone should frame this post, thank you so much!

The quirk worked like a charm - data & time synced in under 10 seconds from pairing the device.

truongsinh commented 6 months ago

After three months of use, I can confirm that the temperature and humidity are transmitted correctly, the date and time are kept accurately. I haven't had a single signal outage since the first connection. It is necessary to avoid pressing the button, which will cause the connection to be disconnected. I have two of these thermometers.

Can you point me to some step-by-step guide how to include these "quirks" or whatever is that you use in order to integrate the sensor to my HA instance? I don't know where to start from really.

  1. On HA create directory like /config/custom_zha_quirks/
  2. Download this zip file https://github.com/zigpy/zha-device-handlers/files/10940201/ts0601_temperature.zip
  3. Unzip and edit file ts0601_temperature.py Replace line 157 with this. MODELS_INFO: [("_TZE200_locansqn", "TS0601"), ("_TZE200_cirvgep4", "TS0601")],
  4. Copy edited ts0601_temperature.py into HA in directory/config/custom_zha_quirks/
  5. Add this lines into Configuration.yaml file: zha: enable_quirks: true custom_quirks_path: /config/custom_zha_quirks/
  6. Restart HA
  7. Pair thermometer in the usual way
  8. After connecting, you need to wait a few minutes - then the date and time will be updated and the temperature and humidity will begin to be transmitted.
  9. Avoid pressing the button on thermometer!

Thanks, it also works for me. However, any idea how I can set the timezone for the device? My HA do have timezone configured to local tz, but my linux server tz is set to UTC. The device now shows UTC.

Update: Actually, only time sync works for me. Temp and Humidity report not available, even though every 30 minutes, the device does check-in successfully.

JGeeforce commented 5 months ago

Got this device as a present and going to try this quirk today. But I already saw the temperature is 0,5 degrees too high, compared to 2 other thermometers. Can this be adjusted?

nono031 commented 3 months ago

I'm testing the PR: https://github.com/zigpy/zha-device-handlers/pull/3036

There is also this repository but there are some issues with the battery and the firmware version : https://github.com/jojo01fr/TS0601-by-_TZE200_cirvgep4-Quirk/tree/main

grericht commented 3 months ago

is there something new? up to now i got all my devices working with zha. but this never sends data.

grericht commented 3 months ago

after hours of searching i found a working sollution: https://github.com/jacekk015/zha_quirks/blob/main/ts0601_temphumid.py no battery but temp, huminity, clock and date in seconds!

nono031 commented 3 months ago

On my side, I decided to switch to Z2M but it's not linked to this issue, it's mainly for OTA update of the device firmware.

sgorpi commented 3 months ago

after hours of searching i found a working sollution: https://github.com/jacekk015/zha_quirks/blob/main/ts0601_temphumid.py no battery but temp, huminity, clock and date in seconds!

This quirk works here too. But, it took a while for it to sync up or so, after that, date/time were displayed and temp/humidity values received regularly.