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
741 stars 674 forks source link

[Device Support Request] [Device UPDATE] Woox TS0202 motion sensor #1799

Closed fantnhu closed 1 year ago

fantnhu commented 2 years ago

Is your feature request related to a problem? Please describe. I have several Woox TS0202 motion sensors. I recently bought new ones. The new ones don't work well, it doesn't detect movement and a door opening sensor also appeared on this device. I noticed that the old ones (which work well) are all by the manufacturer: _TYZB01_2b8f6cio The manufacturer of the new ones is different: _TZ3000_sr0vaafi However, the device type is the same: TS0202

Describe the solution you'd like The old and new signatures are different. Please confirm it

This is the old signature that works: ```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=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": "0x0402", "in_clusters": [ "0x0000", "0x0001", "0x0500" ], "out_clusters": [ "0x000a", "0x0019" ] } }, "manufacturer": "_TYZB01_2b8f6cio", "model": "TS0202", "class": "zigpy.device.Device" } ```
And this is the new one, it doesn't work ``` { "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": "0x0402", "in_clusters": [ "0x0000", "0x0001", "0x0003", "0x0500" ], "out_clusters": [ "0x0006", "0x000a", "0x0019", "0x1000" ] } }, "manufacturer": "_TZ3000_sr0vaafi", "model": "TS0202", "class": "zigpy.device.Device" } ```
**This is the new stuff that doesn't work:** ```yaml { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2022.9.7", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.5", "docker": true, "arch": "x86_64", "timezone": "Europe/Budapest", "os_name": "Linux", "os_version": "5.15.67", "supervisor": "2022.09.1", "host_os": "Home Assistant OS 9.0", "docker_version": "20.10.17", "chassis": "vm", "run_as_root": true }, "custom_components": { "samsungtv_encrypted": { "version": "2022.3.1", "requirements": [ "wakeonlan>=1.1.6", "beautifulsoup4>=4.6.0", "netdisco>=2.8.3" ] }, "webrtc": { "version": "v2.3.1", "requirements": [] }, "xiaomi_miot": { "version": "0.6.13", "requirements": [ "construct==2.10.56", "python-miio>=0.5.6", "micloud>=0.3" ] }, "pyscript": { "version": "1.3.3", "requirements": [ "croniter==1.3.4", "watchdog==2.1.6" ] }, "browser_mod": { "version": "2.1.2", "requirements": [] }, "localtuya": { "version": "4.1.0", "requirements": [] }, "xiaomi_miio_plug": { "version": "2022.8.0.0", "requirements": [ "construct==2.10.56", "python-miio>=0.5.12" ] }, "average": { "version": "2.3.0", "requirements": [] }, "tapo": { "version": "1.2.15", "requirements": [ "plugp100==2.1.18" ] }, "xiaomi_miot_raw": { "version": "v1.3.1", "requirements": [ "construct", "python-miio>=0.5.3" ] }, "nodered": { "version": "1.1.2", "requirements": [] }, "miwifi": { "version": "2.8.2", "requirements": [] }, "edge_tts": { "version": "0.0.1", "requirements": [ "edge-tts==5.0.6" ] }, "plant": { "version": "2.0.0", "requirements": [] }, "szep_kartya": { "version": "1.0.3", "requirements": [ "beautifulsoup4", "requests" ] }, "xiaomi_remote": { "version": "0", "requirements": [] }, "ble_monitor": { "version": "10.4.0", "requirements": [ "pycryptodomex>=3.14.1", "janus>=1.0.0", "aioblescan>=0.2.13", "btsocket>=0.2.0", "pyric>=0.1.6.3" ] }, "xiaomi_miio_philipslight": { "version": "2022.8.0.0", "requirements": [ "construct==2.10.56", "python-miio>=0.5.12" ] }, "tapo_control": { "version": "3.7.0", "requirements": [ "pytapo==2.3", "onvif-zeep-async==1.2.0" ] }, "dijnet": { "version": "0.5.6", "requirements": [ "PyQuery==1.4.3" ] }, "xiaomi_miio_raw": { "version": "2022.8.0.0", "requirements": [ "construct==2.10.56", "python-miio>=0.5.12" ] }, "hacs": { "version": "1.27.2", "requirements": [ "aiogithubapi>=22.2.4" ] }, "xiaomi_miio_airpurifier": { "version": "0.6.13", "requirements": [ "construct==2.10.56", "python-miio>=0.5.8" ] }, "xiaomi_airfryer": { "version": "0.0.1", "requirements": [ "construct==2.10.56", "micloud==0.4", "python-miio>=0.5.7" ] }, "frigate": { "version": "3.0.0", "requirements": [] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/zha", "requirements": [ "bellows==0.33.1", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.79", "zigpy-deconz==0.18.1", "zigpy==0.50.3", "zigpy-xbee==0.15.0", "zigpy-zigate==0.9.2", "zigpy-znp==0.8.2" ], "usb": [ { "vid": "10C4", "pid": "EA60", "description": "*2652*", "known_devices": [ "slae.sh cc2652rb stick" ] }, { "vid": "1A86", "pid": "55D4", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus v2" ] }, { "vid": "10C4", "pid": "EA60", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus" ] }, { "vid": "10C4", "pid": "EA60", "description": "*tubeszb*", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "*tubeszb*", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "*zigstar*", "known_devices": [ "ZigStar Coordinators" ] }, { "vid": "1CF1", "pid": "0030", "description": "*conbee*", "known_devices": [ "Conbee II" ] }, { "vid": "10C4", "pid": "8A2A", "description": "*zigbee*", "known_devices": [ "Nortek HUSBZB-1" ] }, { "vid": "0403", "pid": "6015", "description": "*zigate*", "known_devices": [ "ZiGate+" ] }, { "vid": "10C4", "pid": "EA60", "description": "*zigate*", "known_devices": [ "ZiGate" ] }, { "vid": "10C4", "pid": "8B34", "description": "*bv 2010/10*", "known_devices": [ "Bitron Video AV2010/10" ] } ], "codeowners": [ "@dmulcahey", "@adminiuga", "@puddly" ], "zeroconf": [ { "type": "_esphomelib._tcp.local.", "name": "tube*" }, { "type": "_zigate-zigbee-gateway._tcp.local.", "name": "*zigate*" } ], "dependencies": [ "file_upload" ], "after_dependencies": [ "onboarding", "usb", "zeroconf" ], "iot_class": "local_polling", "loggers": [ "aiosqlite", "bellows", "crccheck", "pure_pcapy3", "zhaquirks", "zigpy", "zigpy_deconz", "zigpy_xbee", "zigpy_zigate", "zigpy_znp" ], "is_built_in": true }, "data": { "ieee": "**REDACTED**", "nwk": 49146, "manufacturer": "_TYZB01_2b8f6cio", "model": "TS0202", "name": "_TYZB01_2b8f6cio TS0202", "quirk_applied": false, "quirk_class": "zigpy.device.Device", "manufacturer_code": 4098, "power_source": "Battery or Unknown", "lqi": null, "rssi": null, "last_seen": "2022-10-01T20:58:36", "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=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": 260, "device_type": "0x0402", "in_clusters": [ "0x0000", "0x0001", "0x0500" ], "out_clusters": [ "0x000a", "0x0019" ] } } }, "active_coordinator": false, "entities": [ { "entity_id": "binary_sensor.bathroom_mirror_motion_ias_zone", "name": "_TYZB01_2b8f6cio TS0202" }, { "entity_id": "sensor.bathroom_mirror_motion_power", "name": "_TYZB01_2b8f6cio TS0202" }, { "entity_id": "sensor.tyzb01_2b8f6cio_ts0202_c8f893fe_basic_rssi", "name": "_TYZB01_2b8f6cio TS0202" }, { "entity_id": "sensor.tyzb01_2b8f6cio_ts0202_c8f893fe_basic_lqi", "name": "_TYZB01_2b8f6cio TS0202" } ], "neighbors": [], "endpoint_names": [ { "name": "IAS_ZONE" } ], "user_given_name": "Bathroom - mirror motion", "device_reg_id": "35d61dea99ba17f8fa9077029a5513d5", "area_id": "7f1ce9b6353facd7cc45c9499311d5e4", "cluster_details": { "1": { "device_type": { "name": "IAS_ZONE", "id": 1026 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0004": { "attribute_name": "manufacturer", "value": "_TYZB01_2b8f6cio" }, "0x0005": { "attribute_name": "model", "value": "TS0202" } }, "unsupported_attributes": {} }, "0x0001": { "endpoint_attribute": "power", "attributes": { "0x0020": { "attribute_name": "battery_voltage", "value": 29 }, "0x0021": { "attribute_name": "battery_percentage_remaining", "value": 178 } }, "unsupported_attributes": { "0x0033": { "attribute_name": "battery_quantity" }, "0x0031": { "attribute_name": "battery_size" } } }, "0x0500": { "endpoint_attribute": "ias_zone", "attributes": { "0x0000": { "attribute_name": "zone_state", "value": 1 }, "0x0001": { "attribute_name": "zone_type", "value": 13 }, "0x0002": { "attribute_name": "zone_status", "value": 5 }, "0x0013": { "attribute_name": "current_zone_sensitivity_level", "value": 1 } }, "unsupported_attributes": {} } }, "out_clusters": { "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} }, "0x000a": { "endpoint_attribute": "time", "attributes": {}, "unsupported_attributes": {} } } } } } } ```

Additional context The new and the old device look the same, there is no difference on the box image image

javicalle commented 2 years ago

Please, edit the first post and format the device's signatures. If you don't get it, just put all the 'code' between ``` marks.

Said that, that seems to me a pretty standar zigbee device. Are you sure that is not a pairing problem? Battery powered devices often need to be kept 'awake' during pairing. To do this, it is necessary that during the time that the pairing of the device lasts, you briefly press the pairing button.

fantnhu commented 2 years ago

Please, edit the first post and format the device's signatures. If you don't get it, just put all the 'code' between ``` marks.

Said that, that seems to me a pretty standar zigbee device. Are you sure that is not a pairing problem? Battery powered devices often need to be kept 'awake' during pairing. To do this, it is necessary that during the time that the pairing of the device lasts, you briefly press the pairing button.

Hi! Thanks for the reply. I did, ``` marked it (hope it's good now). I have tried to re-pair the devices many times, but those with a different manufacturer do not work. The opening entity always appears and the motion detection does not work well either. The movement: 'Ias_zone' this works for the old one. For the new one: 'Iaszone' I don't know if that matters. Thanks for the help!

javicalle commented 2 years ago

it's still hard to read. Please, edit again and remove any <detail> and/or <summary> tag from the post (keep the ```). It's strange that Ias_zone vs Iaszone, but I don't think that may be related.

Can you enable the debug logs and attach the relevant info?:

fballiano commented 1 year ago

@fantnhu did you solve it? I also have the same TZ3000 and I don't even have the binary sensor exposed in ZHA :-(

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.