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
688 stars 638 forks source link

Tuya TS0601 MmwRadarMotion does not support any configuration #1863

Closed aquemy closed 1 year ago

aquemy commented 1 year ago

Hi,

Is your feature request related to a problem? Please describe.

I have a Tuya TS0601 mmWave and light motion detector. It is paired properly and works OK out of the box. However, there is no way to control anything that the sensor is supposed to expose (see here).

I have seen that there is an issue opened for the same sensor here https://github.com/zigpy/zha-device-handlers/issues/1850 but in my case, the quirk is properly loaded:

TS0601 by _TZE200_ztc6ggyl 
...
Quirk: zhaquirks.tuya.ts0601_motion.MmwRadarMotion

Describe the solution you'd like Being able to access the attributes/entities in such a way: image

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=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)", "endpoints": { "1": { "profile_id": 260, "device_type": "0x0107", "in_clusters": [ "0x0000", "0x0004", "0x0005", "0x000c", "0x0400", "0x0406", "0xef00" ], "out_clusters": [ "0x000a", "0x0019" ] } }, "manufacturer": "_TZE200_ztc6ggyl", "model": "TS0601", "class": "zhaquirks.tuya.ts0601_motion.MmwRadarMotion" } ```
Diagnostic information ```yaml { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2022.10.5", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.5", "docker": true, "arch": "aarch64", "timezone": "Europe/Warsaw", "os_name": "Linux", "os_version": "5.15.61-v8", "supervisor": "2022.10.0", "host_os": "Home Assistant OS 9.2", "docker_version": "20.10.17", "chassis": "embedded", "run_as_root": true }, "custom_components": { "miio_yeelink": { "version": "0.1.12", "requirements": [ "construct==2.10.56", "python-miio>=0.5.6" ] }, "hacs": { "version": "1.27.2", "requirements": [ "aiogithubapi>=22.2.4" ] }, "danfoss_ally": { "version": "v1.0.7", "requirements": [ "pydanfossally==0.0.26" ] }, "bodymiscale": { "version": "3.0.3", "requirements": [ "cachetools==5.1.0" ] }, "ble_monitor": { "version": "4.6.2", "requirements": [ "pycryptodomex>=3.10.1", "janus>=0.6.1", "aioblescan>=0.2.8" ] }, "localtuya": { "version": "4.1.0", "requirements": [] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/zha", "requirements": [ "bellows==0.34.2", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.83", "zigpy-deconz==0.19.0", "zigpy==0.51.3", "zigpy-xbee==0.16.2", "zigpy-zigate==0.10.2", "zigpy-znp==0.9.1" ], "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*" }, { "type": "_zigstar_gw._tcp.local.", "name": "*zigstar*" } ], "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": 27220, "manufacturer": "_TZE200_ztc6ggyl", "model": "TS0601", "name": "_TZE200_ztc6ggyl TS0601", "quirk_applied": true, "quirk_class": "zhaquirks.tuya.ts0601_motion.MmwRadarMotion", "manufacturer_code": 4098, "power_source": "Mains", "lqi": 255, "rssi": -65, "last_seen": "2022-10-24T19:02:24", "available": true, "device_type": "Router", "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=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)", "endpoints": { "1": { "profile_id": 260, "device_type": "0x0107", "in_clusters": [ "0x0000", "0x0004", "0x0005", "0x000c", "0x0400", "0x0406", "0xef00" ], "out_clusters": [ "0x000a", "0x0019" ] } } }, "active_coordinator": false, "entities": [ { "entity_id": "binary_sensor.presence_detector_1_occupancy", "name": "_TZE200_ztc6ggyl TS0601" }, { "entity_id": "sensor.presence_detector_1_illuminance", "name": "_TZE200_ztc6ggyl TS0601" } ], "neighbors": [ { "device_type": "Coordinator", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x0000", "permit_joining": "Unknown", "depth": "0", "lqi": "155" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x035F", "permit_joining": "Unknown", "depth": "15", "lqi": "97" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x1A12", "permit_joining": "Unknown", "depth": "15", "lqi": "100" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x3E66", "permit_joining": "Unknown", "depth": "15", "lqi": "122" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x3FF7", "permit_joining": "Unknown", "depth": "15", "lqi": "134" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x50A0", "permit_joining": "Unknown", "depth": "15", "lqi": "71" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x714F", "permit_joining": "Unknown", "depth": "15", "lqi": "137" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Parent", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x8005", "permit_joining": "Unknown", "depth": "15", "lqi": "251" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0x9963", "permit_joining": "Unknown", "depth": "15", "lqi": "187" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xC6AA", "permit_joining": "Unknown", "depth": "15", "lqi": "69" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xDFBD", "permit_joining": "Unknown", "depth": "15", "lqi": "139" }, { "device_type": "Router", "rx_on_when_idle": "On", "relationship": "Sibling", "extended_pan_id": "**REDACTED**", "ieee": "**REDACTED**", "nwk": "0xE0A7", "permit_joining": "Unknown", "depth": "15", "lqi": "112" } ], "endpoint_names": [ { "name": "OCCUPANCY_SENSOR" } ], "user_given_name": "Presence Detector 1", "device_reg_id": "805a4d8f5f461af0428c8dc0cb882dc1", "area_id": null, "cluster_details": { "1": { "device_type": { "name": "OCCUPANCY_SENSOR", "id": 263 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0001": { "attribute_name": "app_version", "value": 65 }, "0x0004": { "attribute_name": "manufacturer", "value": "_TZE200_ztc6ggyl" }, "0x0005": { "attribute_name": "model", "value": "TS0601" } }, "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.2" }, "0xef02": { "attribute_name": "dp_2", "value": 7 }, "0xef03": { "attribute_name": "dp_3", "value": 0 }, "0xef04": { "attribute_name": "dp_4", "value": 600 }, "0xef06": { "attribute_name": "dp_6", "value": 1 }, "0xef65": { "attribute_name": "dp_101", "value": 0 }, "0xef66": { "attribute_name": "dp_102", "value": 600 }, "0xef67": { "attribute_name": "dp_103", "value": " " } }, "unsupported_attributes": {} }, "0x0406": { "endpoint_attribute": "occupancy", "attributes": { "0x0000": { "attribute_name": "occupancy", "value": 1 } }, "unsupported_attributes": { "0x0010": { "attribute_name": "pir_o_to_u_delay" }, "0x0022": { "attribute_name": "ultrasonic_u_to_o_threshold" }, "0x0001": { "attribute_name": "occupancy_sensor_type" }, "0x0012": { "attribute_name": "pir_u_to_o_threshold" }, "0x0011": { "attribute_name": "pir_u_to_o_delay" } } }, "0x000c": { "endpoint_attribute": "analog_input", "attributes": { "0x0055": { "attribute_name": "present_value", "value": 1.33 } }, "unsupported_attributes": {} }, "0x0400": { "endpoint_attribute": "illuminance", "attributes": { "0x0000": { "attribute_name": "measured_value", "value": 6021.599913279624 } }, "unsupported_attributes": {} } }, "out_clusters": { "0x000a": { "endpoint_attribute": "time", "attributes": {}, "unsupported_attributes": {} }, "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} } } } } } } ```

Additional context

It looks like the actual quirk is missing these features.
I've never touched quirk and Zigbee dev but I'd be happy to participate if anyone can guide me.

TheJulianJES commented 1 year ago

It's not ideal but you might be able to use the "manage Zigbee device" -> "cluster" dialog to change the attributes on one of these clusters at the moment:

on MmwRadarManufCluster: https://github.com/zigpy/zha-device-handlers/blob/fe65de18df765449bef8dda706f8e93227891f6d/zhaquirks/tuya/ts0601_motion.py#L121-L149

aquemy commented 1 year ago

I am not certain which attribute exactly I should modify.
In fact, I have two attributes (dp_102 and dp_4) with value 600. I suspect it to be a time in ms.

However, I tried to modify it in the field "Value" using "Write attribute" but when I "Read attribute" again it is back to 600. Apologies if the question is stupid but I've never modified any attribute through this UI.

javicalle commented 1 year ago

There are no stupid questions, but we can't always give the expected answers. We are working on improving the interaction through the UI, but on some devices it is still quite limited, and some manufacturers do not help us in this regard.

The steps you have taken are correct. If the device does not accept the values, it is possible that the quirk requires some more adjustment.

Some people has been working in another implementation for this devices. If you want to try, here is the implementation:

You will need to enable the local quirk in your instalation. There is a guide about enabling custom quirks:

Create a ts0601_motion.py in your local quirk folder and put the suggested quirk in the file.

Restart HA, remove and pair you device again. Check that the device is loading the quirk and that the device signature has changed.

TheJulianJES commented 1 year ago

Also, make sure to leave the "manufacturer override code" field completely empty: image

Only change the value in the upper field and then press "write attribute". You can check if it wrote successfully by checking "read attribute". But again, make sure the lower field is completely empty all the time.

sparkydave1981 commented 1 year ago

As I've mentioned in issue #1645 I also can't get the new values to stay set. Hitting 'read value' shows the original/factory setting again.

aquemy commented 1 year ago

I confirm that the custom quirk in #1645 works perfectly.

aquemy commented 1 year ago

I am re-opening with a strange issue.

I now have _TZE200_ztc6ggyl but also _TZE204_ztc6ggyl. For some time the quirk specified in #1645 worked perfectly, so I adjusted the settings and forgot about the sensor that works perfectly since then,

Yesterday I added the new _TZE204_ztc6ggyl to ZHA with the exact same quirk. I was surprised that I could not modify any setting although the entities/sliders were there. Whenever I tried to modify one of these sliders, it was reset to the original position after the sensor got triggered. I thought this was due to this particular model but I then tried to modify the setting of the other one ( _TZE200_ztc6ggyl) and got the exact same result.

image

What is crazy is that I can set the Sensitivity parameters, but none of the others. I clearly see that when I modify the sensitivity, the service is called (see below), but not for any other parameter.

See the logbook: we clearly see the service number.set_value triggered by myself, but the slider min range moved to the max did not trigger anything (and 2 sec later was reset to 0s). image

My quirk for both:

Quirk ```python """Tuya mmw radar occupancy sensor.""" import math from typing import Dict, Optional, Tuple, Union from zigpy.profiles import zha from zigpy.quirks import CustomDevice import zigpy.types as t from zigpy.zcl import foundation from zigpy.zcl.clusters.general import ( AnalogInput, AnalogOutput, Basic, GreenPowerProxy, Groups, Identify, Ota, Scenes, Time, ) from zigpy.zcl.clusters.measurement import ( IlluminanceMeasurement, OccupancySensing ) from zigpy.zcl.clusters.security import IasZone from zhaquirks import Bus, LocalDataCluster, MotionOnEvent from zhaquirks.const import ( DEVICE_TYPE, ENDPOINTS, INPUT_CLUSTERS, MODEL, MOTION_EVENT, OUTPUT_CLUSTERS, PROFILE_ID, ) from zhaquirks.tuya import ( NoManufacturerCluster, TuyaLocalCluster, TuyaNewManufCluster, ) from zhaquirks.tuya.mcu import ( TuyaDPType, DPToAttributeMapping, TuyaAttributesCluster, TuyaMCUCluster, ) class TuyaMmwRadarSelfTest(t.enum8): """Mmw radar self test values.""" TESTING = 0 TEST_SUCCESS = 1 TEST_FAILURE = 2 OTHER = 3 COMM_FAULT = 4 RADAR_FAULT = 5 class TuyaOccupancySensing(OccupancySensing, TuyaLocalCluster): """Tuya local OccupancySensing cluster.""" class TuyaIlluminanceMeasurement(IlluminanceMeasurement, TuyaLocalCluster): """Tuya local IlluminanceMeasurement cluster.""" class TuyaMmwRadarSensitivity(TuyaAttributesCluster, AnalogOutput): """AnalogOutput cluster for sensitivity.""" def __init__(self, *args, **kwargs): """Init.""" super().__init__(*args, **kwargs) self._update_attribute( self.attributes_by_name["description"].id, "Sensitivity" ) self._update_attribute(self.attributes_by_name["min_present_value"].id, 1) self._update_attribute(self.attributes_by_name["max_present_value"].id, 9) self._update_attribute(self.attributes_by_name["resolution"].id, 1) class TuyaMmwRadarMinRange(TuyaAttributesCluster, AnalogOutput): """AnalogOutput cluster for min range.""" def __init__(self, *args, **kwargs): """Init.""" super().__init__(*args, **kwargs) self._update_attribute( self.attributes_by_name["description"].id, "Min range" ) self._update_attribute(self.attributes_by_name["min_present_value"].id, 0) self._update_attribute(self.attributes_by_name["max_present_value"].id, 950) self._update_attribute(self.attributes_by_name["resolution"].id, 10) self._update_attribute( self.attributes_by_name["engineering_units"].id, 118 ) # 31: meters class TuyaMmwRadarMaxRange(TuyaAttributesCluster, AnalogOutput): """AnalogOutput cluster for max range.""" def __init__(self, *args, **kwargs): """Init.""" super().__init__(*args, **kwargs) self._update_attribute( self.attributes_by_name["description"].id, "Max range" ) self._update_attribute(self.attributes_by_name["min_present_value"].id, 0) self._update_attribute(self.attributes_by_name["max_present_value"].id, 950) self._update_attribute(self.attributes_by_name["resolution"].id, 10) self._update_attribute( self.attributes_by_name["engineering_units"].id, 118 ) # 31: meters class TuyaMmwRadarDetectionDelay(TuyaAttributesCluster, AnalogOutput): """AnalogOutput cluster for detection delay.""" def __init__(self, *args, **kwargs): """Init.""" super().__init__(*args, **kwargs) self._update_attribute( self.attributes_by_name["description"].id, "Detection delay" ) self._update_attribute(self.attributes_by_name["min_present_value"].id, 000) self._update_attribute(self.attributes_by_name["max_present_value"].id, 20000) self._update_attribute(self.attributes_by_name["resolution"].id, 100) self._update_attribute( self.attributes_by_name["engineering_units"].id, 159 ) # 73: seconds class TuyaMmwRadarFadingTime(TuyaAttributesCluster, AnalogOutput): """AnalogOutput cluster for fading time.""" def __init__(self, *args, **kwargs): """Init.""" super().__init__(*args, **kwargs) self._update_attribute( self.attributes_by_name["description"].id, "Fading time" ) self._update_attribute(self.attributes_by_name["min_present_value"].id, 0000) self._update_attribute(self.attributes_by_name["max_present_value"].id, 200000) self._update_attribute(self.attributes_by_name["resolution"].id, 1000) self._update_attribute( self.attributes_by_name["engineering_units"].id, 159 ) # 73: seconds class TuyaMmwRadarTargetDistance(TuyaAttributesCluster, AnalogInput): """AnalogInput cluster for target distance.""" def __init__(self, *args, **kwargs): """Init.""" super().__init__(*args, **kwargs) self._update_attribute( self.attributes_by_name["description"].id, "Target distance" ) self._update_attribute( self.attributes_by_name["engineering_units"].id, 31 ) # 31: meters class TuyaMmwRadarCluster(NoManufacturerCluster, TuyaMCUCluster): """Mmw radar cluster.""" attributes = TuyaMCUCluster.attributes.copy() attributes.update( { # ramdom attribute IDs 0xEF01: ("occupancy", t.uint32_t, True), 0xEF02: ("sensitivity", t.uint32_t, True), 0xEF03: ("min_range", t.uint32_t, True), 0xEF04: ("max_range", t.uint32_t, True), 0xEF06: ("self_test", TuyaMmwRadarSelfTest, True), 0xEF09: ("target_distance", t.uint32_t, True), 0xEF65: ("detection_delay", t.uint32_t, True), 0xEF66: ("fading_time", t.uint32_t, True), 0xEF67: ("cli", t.CharacterString, True), 0xEF68: ("illuminance", t.uint32_t, True), } ) dp_to_attribute: Dict[int, DPToAttributeMapping] = { 1: DPToAttributeMapping( TuyaOccupancySensing.ep_attribute, "occupancy", dp_type=TuyaDPType.BOOL, ), 2: DPToAttributeMapping( TuyaMmwRadarSensitivity.ep_attribute, "present_value", dp_type=TuyaDPType.VALUE, ), 3: DPToAttributeMapping( TuyaMmwRadarMinRange.ep_attribute, "present_value", dp_type=TuyaDPType.VALUE, endpoint_id=2, #converter=lambda x: x / 100, #dp_converter=lambda x: x * 100, ), 4: DPToAttributeMapping( TuyaMmwRadarMaxRange.ep_attribute, "present_value", dp_type=TuyaDPType.VALUE, endpoint_id=3, #converter=lambda x: x / 100, #dp_converter=lambda x: x * 100, ), 6: DPToAttributeMapping( TuyaMCUCluster.ep_attribute, "self_test", dp_type=TuyaDPType.ENUM, ), 9: DPToAttributeMapping( TuyaMmwRadarTargetDistance.ep_attribute, "present_value", #converter=lambda x: x / 100, dp_type=TuyaDPType.VALUE, ), 101: DPToAttributeMapping( TuyaMmwRadarDetectionDelay.ep_attribute, "present_value", dp_type=TuyaDPType.VALUE, converter=lambda x: x * 100, dp_converter=lambda x: x // 100, endpoint_id=4, ), 102: DPToAttributeMapping( TuyaMmwRadarFadingTime.ep_attribute, "present_value", dp_type=TuyaDPType.VALUE, converter=lambda x: x * 100, dp_converter=lambda x: x // 100, endpoint_id=5, ), 103: DPToAttributeMapping( TuyaMCUCluster.ep_attribute, "cli", dp_type=TuyaDPType.STRING, ), 104: DPToAttributeMapping( TuyaIlluminanceMeasurement.ep_attribute, "measured_value", dp_type=TuyaDPType.VALUE, converter=lambda x: math.log10(x) * 10000 + 1, ), } data_point_handlers = { 1: "_dp_2_attr_update", 2: "_dp_2_attr_update", 3: "_dp_2_attr_update", 4: "_dp_2_attr_update", 6: "_dp_2_attr_update", 9: "_dp_2_attr_update", 101: "_dp_2_attr_update", 102: "_dp_2_attr_update", 103: "_dp_2_attr_update", 104: "_dp_2_attr_update", } class TuyaMmwRadarOccupancy(CustomDevice): """Millimeter wave occupancy sensor.""" signature = { # endpoint=1, profile=260, device_type=81, device_version=1, # input_clusters=[0, 4, 5, 61184], output_clusters=[25, 10] "models_info": [ ("_TZE200_ar0slwnd", "TS0601"), ("_TZE200_sfiy5tfs", "TS0601"), ("_TZE200_mrf6vtua", "TS0601"), ("_TZE200_ztc6ggyl", "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, TuyaNewManufCluster.cluster_id, ], OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id], }, }, } replacement = { ENDPOINTS: { 1: { PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.OCCUPANCY_SENSOR, INPUT_CLUSTERS: [ Basic.cluster_id, Groups.cluster_id, Scenes.cluster_id, TuyaMmwRadarCluster, TuyaIlluminanceMeasurement, TuyaOccupancySensing, TuyaMmwRadarTargetDistance, TuyaMmwRadarSensitivity, ], OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id], }, 2: { PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.COMBINED_INTERFACE, INPUT_CLUSTERS: [ TuyaMmwRadarMinRange, ], OUTPUT_CLUSTERS: [], }, 3: { PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.COMBINED_INTERFACE, INPUT_CLUSTERS: [ TuyaMmwRadarMaxRange, ], OUTPUT_CLUSTERS: [], }, 4: { PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.COMBINED_INTERFACE, INPUT_CLUSTERS: [ TuyaMmwRadarDetectionDelay, ], OUTPUT_CLUSTERS: [], }, 5: { PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.COMBINED_INTERFACE, INPUT_CLUSTERS: [ TuyaMmwRadarFadingTime, ], OUTPUT_CLUSTERS: [], }, } } ```

The devices signatures:

_TZE200_ztc6ggyl ``` { "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=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", "endpoints": { "1": { "profile_id": 260, "device_type": "0x0107", "in_clusters": [ "0x0000", "0x0004", "0x0005", "0x000c", "0x000d", "0x0400", "0x0406", "0xef00" ], "out_clusters": [ "0x000a", "0x0019" ] }, "2": { "profile_id": 260, "device_type": "0x0007", "in_clusters": [ "0x000d" ], "out_clusters": [] }, "3": { "profile_id": 260, "device_type": "0x0007", "in_clusters": [ "0x000d" ], "out_clusters": [] }, "4": { "profile_id": 260, "device_type": "0x0007", "in_clusters": [ "0x000d" ], "out_clusters": [] }, "5": { "profile_id": 260, "device_type": "0x0007", "in_clusters": [ "0x000d" ], "out_clusters": [] } }, "manufacturer": "_TZE200_ztc6ggyl", "model": "TS0601", "class": "ts0601_motion.TuyaMmwRadarOccupancy" } ```
_TZE204_ztc6ggyl TS0601 (without the quirk) ``` { "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=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)", "endpoints": { "1": { "profile_id": 260, "device_type": "0x0107", "in_clusters": [ "0x0000", "0x0004", "0x0005", "0x000c", "0x0400", "0x0406", "0xef00" ], "out_clusters": [ "0x000a", "0x0019" ] } }, "manufacturer": "_TZE204_ztc6ggyl", "model": "TS0601", "class": "zhaquirks.tuya.ts0601_motion.MmwRadarMotion" } ```
Diagnostic ``` { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2022.12.1", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.7", "docker": true, "arch": "aarch64", "timezone": "Europe/Warsaw", "os_name": "Linux", "os_version": "5.15.61-v8", "supervisor": "2022.11.2", "host_os": "Home Assistant OS 9.3", "docker_version": "20.10.18", "chassis": "embedded", "run_as_root": true }, "custom_components": { "dwains_dashboard": { "version": "3.3.0", "requirements": [] }, "miio_yeelink": { "version": "0.1.12", "requirements": [ "construct==2.10.56", "python-miio>=0.5.6" ] }, "hacs": { "version": "1.28.3", "requirements": [ "aiogithubapi>=22.2.4" ] }, "danfoss_ally": { "version": "1.1.0", "requirements": [ "pydanfossally==0.0.27" ] }, "browser_mod": { "version": "2.1.2", "requirements": [] }, "bodymiscale": { "version": "3.0.4", "requirements": [ "cachetools==5.1.0" ] }, "ble_monitor": { "version": "4.6.2", "requirements": [ "pycryptodomex>=3.10.1", "janus>=0.6.1", "aioblescan>=0.2.8" ] }, "fullykiosk": { "version": "1.1.0", "requirements": [ "python-fullykiosk==0.0.11" ] }, "localtuya": { "version": "4.1.0", "requirements": [] }, "ui_lovelace_minimalist": { "version": "v1.1.6-hotfix", "requirements": [ "aiofiles==0.8.0", "aiogithubapi>=22.2.4" ] }, "ytube_music_player": { "version": "20220205.01", "requirements": [ "ytmusicapi==0.19.5", "pytube==10.5.1", "integrationhelper==0.2.2" ] }, "jellyfin": { "version": "1.1.1", "requirements": [ "jellyfin-apiclient-python==1.7.2" ] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/zha", "requirements": [ "bellows==0.34.5", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.88", "zigpy-deconz==0.19.2", "zigpy==0.52.3", "zigpy-xbee==0.16.2", "zigpy-zigate==0.10.3", "zigpy-znp==0.9.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*" }, { "type": "_zigstar_gw._tcp.local.", "name": "*zigstar*" } ], "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": 58113, "manufacturer": "_TZE204_ztc6ggyl", "model": "TS0601", "name": "_TZE204_ztc6ggyl TS0601", "quirk_applied": true, "quirk_class": "zhaquirks.tuya.ts0601_motion.MmwRadarMotion", "manufacturer_code": 4098, "power_source": "Mains", "lqi": 255, "rssi": -45, "last_seen": "2022-12-12T20:56:23", "available": true, "device_type": "Router", "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=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)", "endpoints": { "1": { "profile_id": 260, "device_type": "0x0107", "in_clusters": [ "0x0000", "0x0004", "0x0005", "0x000c", "0x0400", "0x0406", "0xef00" ], "out_clusters": [ "0x000a", "0x0019" ] } } }, "active_coordinator": false, "entities": [ { "entity_id": "binary_sensor.presence_detector_2_occupancy", "name": "_TZE204_ztc6ggyl TS0601" } ], "neighbors": [], "routes": [], "endpoint_names": [ { "name": "OCCUPANCY_SENSOR" } ], "user_given_name": "Presence Detector 2", "device_reg_id": "b4e9a71fa803eaf642feafb3757fa4fc", "area_id": "office", "cluster_details": { "1": { "device_type": { "name": "OCCUPANCY_SENSOR", "id": 263 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0001": { "attribute_name": "app_version", "value": 70 } }, "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.2" }, "0xef02": { "attribute_name": "dp_2", "value": 7 }, "0xef03": { "attribute_name": "dp_3", "value": 0 }, "0xef04": { "attribute_name": "dp_4", "value": 0 }, "0xef06": { "attribute_name": "dp_6", "value": 1 }, "0xef65": { "attribute_name": "dp_101", "value": 0 }, "0xef66": { "attribute_name": "dp_102", "value": 5 }, "0xef67": { "attribute_name": "dp_103", "value": " " } }, "unsupported_attributes": {} }, "0x0406": { "endpoint_attribute": "occupancy", "attributes": { "0x0000": { "attribute_name": "occupancy", "value": 0 } }, "unsupported_attributes": { "0x0000": { "attribute_name": "occupancy" } } }, "0x000c": { "endpoint_attribute": "analog_input", "attributes": { "0x0055": { "attribute_name": "present_value", "value": 0.0 } }, "unsupported_attributes": {} }, "0x0400": { "endpoint_attribute": "illuminance", "attributes": { "0x0000": { "attribute_name": "measured_value", "value": 7782.512503836437 } }, "unsupported_attributes": { "0x0000": { "attribute_name": "measured_value" } } } }, "out_clusters": { "0x000a": { "endpoint_attribute": "time", "attributes": {}, "unsupported_attributes": {} }, "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} } } } } } } ```
github-actions[bot] commented 1 year ago

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