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
719 stars 664 forks source link

[Device Support Request] _TZE284_fzo2pocs TS0601 Zemismart blind motor variant #3270

Open Classical-Gas opened 1 month ago

Classical-Gas commented 1 month ago

Problem description

The blind motor is detected but no controls are present.

Solution description

I would like it to have cover controls as per my other blind motors (TS0601 by _TZE200_fzo2pocs).

Screenshots/Video

Screenshots/Video ![image](https://github.com/user-attachments/assets/cf32ed18-b2fa-4a3f-b4cd-78393d8415f3) ![image](https://github.com/user-attachments/assets/857f9b70-dc6b-42d2-a9c8-3596213f7edb)

Device signature

Device signature ```json { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=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": "0x0104", "device_type": "0x0051", "input_clusters": [ "0x0000", "0x0004", "0x0005", "0xed00", "0xef00" ], "output_clusters": [ "0x000a", "0x0019" ] } }, "manufacturer": "_TZE284_fzo2pocs", "model": "TS0601", "class": "zigpy.device.Device" } ```

Diagnostic information

Diagnostic information ```json { "home_assistant": { "installation_type": "Home Assistant Supervised", "version": "2024.7.3", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.12.4", "docker": true, "arch": "aarch64", "timezone": "Australia/Sydney", "os_name": "Linux", "os_version": "6.1.21-v8+", "supervisor": "2024.06.2", "host_os": "Debian GNU/Linux 11 (bullseye)", "docker_version": "24.0.2", "chassis": "", "run_as_root": true }, "custom_components": { "ytube_music_player": { "documentation": "https://github.com/KoljaWindeler/ytube_music_player", "version": "20240709.01", "requirements": [ "ytmusicapi==1.7.4", "pytube==15.0.0", "integrationhelper==0.2.2" ] }, "bureau_of_meteorology": { "documentation": "https://github.com/bremor/bureau_of_meteorology", "version": "1.2.0", "requirements": [ "iso8601" ] }, "hacs": { "documentation": "https://hacs.xyz/docs/configuration/start", "version": "1.34.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "scheduler": { "documentation": "https://github.com/nielsfaber/scheduler-component", "version": "v0.0.0", "requirements": [] }, "mass": { "documentation": "https://music-assistant.io", "version": "2024.6.2", "requirements": [ "music-assistant==2.0.6" ] }, "ui_lovelace_minimalist": { "documentation": "https://ui-lovelace-minimalist.github.io/UI/", "version": "v1.3.10", "requirements": [ "aiofiles==0.8.0", "aiogithubapi>=22.2.4" ] }, "thermal_comfort": { "documentation": "https://github.com/dolezsa/thermal_comfort/blob/master/README.md", "version": "2.2.2", "requirements": [] }, "switchbotremote": { "documentation": "https://github.com/KiraPC/ha-switchbot-remote#readme", "version": "1.0.0", "requirements": [ "pyhumps" ] }, "browser_mod": { "documentation": "https://github.com/thomasloven/hass-browser_mod/blob/master/README.md", "version": "2.3.0", "requirements": [] }, "teamtracker": { "documentation": "https://github.com/vasqued2/ha-teamtracker", "version": "0.1", "requirements": [ "arrow", "aiofiles" ] }, "pyscript": { "documentation": "https://github.com/custom-components/pyscript", "version": "1.5.0", "requirements": [ "croniter==1.3.8", "watchdog==2.3.1" ] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "after_dependencies": [ "onboarding", "usb" ], "codeowners": [ "dmulcahey", "adminiuga", "puddly", "TheJulianJES" ], "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", "universal_silabs_flasher" ], "requirements": [ "bellows==0.39.1", "pyserial==3.5", "zha-quirks==0.0.117", "zigpy-deconz==0.23.2", "zigpy==0.64.1", "zigpy-xbee==0.20.1", "zigpy-zigate==0.12.1", "zigpy-znp==0.12.2", "universal-silabs-flasher==0.0.20", "pyserial-asyncio-fast==0.11" ], "usb": [ { "vid": "10C4", "pid": "EA60", "description": "*2652*", "known_devices": [ "slae.sh cc2652rb stick" ] }, { "vid": "10C4", "pid": "EA60", "description": "*slzb-07*", "known_devices": [ "smlight slzb-07" ] }, { "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": "0403", "pid": "6015", "description": "*conbee*", "known_devices": [ "Conbee III" ] }, { "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": "_uzg-01._tcp.local.", "name": "uzg-01*" }, { "type": "_slzb-06._tcp.local.", "name": "slzb-06*" }, { "type": "_xzg._tcp.local.", "name": "xzg*" }, { "type": "_czc._tcp.local.", "name": "czc*" } ], "is_built_in": true }, "setup_times": { "null": { "setup": 0.00017642485909163952 }, "6a369ebb9632b606e56cec8ba7804fcf": { "wait_import_platforms": -0.0006630891002714634, "config_entry_setup": 18.450104748131707 } }, "data": { "ieee": "**REDACTED**", "nwk": 6643, "manufacturer": "_TZE284_fzo2pocs", "model": "TS0601", "name": "_TZE284_fzo2pocs TS0601", "quirk_applied": false, "quirk_class": "zigpy.device.Device", "quirk_id": null, "manufacturer_code": 4098, "power_source": "Mains", "lqi": 255, "rssi": -36, "last_seen": "2024-07-24T23:08:01", "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": "0x0104", "device_type": "0x0051", "input_clusters": [ "0x0000", "0x0004", "0x0005", "0xed00", "0xef00" ], "output_clusters": [ "0x000a", "0x0019" ] } }, "manufacturer": "_TZE284_fzo2pocs", "model": "TS0601" }, "active_coordinator": false, "entities": [ { "entity_id": "update.tze284_fzo2pocs_ts0601_firmware", "name": "_TZE284_fzo2pocs TS0601" } ], "neighbors": [], "routes": [], "endpoint_names": [ { "name": "SMART_PLUG" } ], "user_given_name": null, "device_reg_id": "711d92484b344cb246ad0644032a3d24", "area_id": null, "cluster_details": { "1": { "device_type": { "name": "SMART_PLUG", "id": 81 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0001": { "attribute_name": "app_version", "value": 68 }, "0x0004": { "attribute_name": "manufacturer", "value": "_TZE284_fzo2pocs" }, "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": null, "attributes": {}, "unsupported_attributes": {} }, "0xed00": { "endpoint_attribute": null, "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": { "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": { "0x0002": { "attribute_name": "current_file_version" } } }, "0x000a": { "endpoint_attribute": "time", "attributes": {}, "unsupported_attributes": {} } } } } } } ```

Logs

Logs ```python [Paste the logs here] ```

Custom quirk

Custom quirk ```python """Tuya based cover and blinds.""" from zigpy.profiles import zha from zigpy.zcl.clusters.general import Basic, Groups, Identify, OnOff, Ota, Scenes, Time from zhaquirks.const import ( DEVICE_TYPE, ENDPOINTS, INPUT_CLUSTERS, MODELS_INFO, OUTPUT_CLUSTERS, PROFILE_ID, ) from zhaquirks.tuya import ( TuyaManufacturerWindowCover, TuyaManufCluster, TuyaWindowCover, TuyaWindowCoverControl, ) class TuyaMoesCover0601_4(TuyaWindowCover): """Tuya Zemismart blind cover motor.""" signature = { # MODELS_INFO: [ ("_TZE284_fzo2pocs", "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, TuyaManufCluster.cluster_id, 0xed00 ], OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id], } }, } replacement = { ENDPOINTS: { 1: { DEVICE_TYPE: zha.DeviceType.WINDOW_COVERING_DEVICE, INPUT_CLUSTERS: [ Basic.cluster_id, Groups.cluster_id, Scenes.cluster_id, TuyaManufacturerWindowCover, TuyaWindowCoverControl, ], OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id], } } } ```

Additional information

I tried adding the model number to the ts0601_cover.py quirk without success

Classical-Gas commented 1 month ago

I was able to get this to work by modifying the ts601_cover.py quirk by using the logic discussed here. The endpoint "0xed00" was the issue. This endpoint is currently not being addressed, I'm unsure if this is needed, so I'll keep this open,

https://github.com/zigpy/zha-device-handlers/issues/1687