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
749 stars 687 forks source link

[Device Support Request] TS0601 Cover. Zemismart (Tuya) TZE204_1fuxihti curtain motor #2753

Closed Silicon51 closed 5 months ago

Silicon51 commented 11 months ago

Problem description

Tuya released new version of curtain motor with a name (manufacturer) TZE204_1fuxihti, device is same as described in #1245 and #1602 and #1953 but none of those solutions worked. with a blank configuration it show no entities, once i create a quirk with following code there appear 3 buttons (open, close, stop). If I click any button then error message occur "Failed to call service cover/close_cover. Failed to close cover: <Status.UNSUP_MANUF_CLUSTER_COMMAND: 131>"

What is important - integration show if curtain is open or close, it could read state of curtain, just cannot send anything.

Solution description

Best solution would be upgrade of code which I send to allow remote communication

Screenshots/Video

Screenshot ![image](https://github.com/zigpy/zha-device-handlers/assets/104772433/487a7a19-e091-4703-a8dc-583412334040)

Device signature

Device signature ```json { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.11.2", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.11.6", "docker": true, "arch": "x86_64", "timezone": "Europe/Warsaw", "os_name": "Linux", "os_version": "6.1.59", "supervisor": "2023.11.3", "host_os": "Home Assistant OS 11.1", "docker_version": "24.0.6", "chassis": "embedded", "run_as_root": true }, "custom_components": { "alarmo": { "version": "v1.9.10", "requirements": [] }, "hacs": { "version": "1.33.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "xiaomi_miot": { "version": "0.7.13", "requirements": [ "construct>=2.10.56", "python-miio>=0.5.6", "micloud>=0.3" ] } }, "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", "universal_silabs_flasher" ], "requirements": [ "bellows==0.36.8", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.106", "zigpy-deconz==0.21.1", "zigpy==0.59.0", "zigpy-xbee==0.19.0", "zigpy-zigate==0.11.0", "zigpy-znp==0.11.6", "universal-silabs-flasher==0.0.14", "pyserial-asyncio-fast==0.11" ], "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": "_uzg-01._tcp.local.", "name": "uzg-01*" }, { "type": "_slzb-06._tcp.local.", "name": "slzb-06*" } ], "is_built_in": true }, "data": { "ieee": "**REDACTED**", "nwk": 57680, "manufacturer": "_TZE204_1fuxihti", "model": "TS0601", "name": "_TZE204_1fuxihti TS0601", "quirk_applied": true, "quirk_class": "curt_v5.TuyaCover0601_GP", "quirk_id": null, "manufacturer_code": 4417, "power_source": "Mains", "lqi": 136, "rssi": -66, "last_seen": "2023-11-15T20:24:53", "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=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)", "endpoints": { "1": { "profile_id": "0x0104", "device_type": "0x0202", "input_clusters": [ "0x0000", "0x0004", "0x0005", "0x0102", "0xef00" ], "output_clusters": [ "0x000a", "0x0019" ] }, "242": { "profile_id": "0xa1e0", "device_type": "0x0061", "input_clusters": [], "output_clusters": [ "0x0021" ] } }, "manufacturer": "_TZE204_1fuxihti", "model": "TS0601" }, "active_coordinator": false, "entities": [ { "entity_id": "cover.kar1_cover", "name": "_TZE204_1fuxihti TS0601" } ], "neighbors": [], "routes": [], "endpoint_names": [ { "name": "WINDOW_COVERING_DEVICE" }, { "name": "PROXY_BASIC" } ], "user_given_name": "KAR1", "device_reg_id": "eb8c73609b96a2d9b9a2fc2acdffb2bb", "area_id": "sypialnia", "cluster_details": { "1": { "device_type": { "name": "WINDOW_COVERING_DEVICE", "id": 514 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0001": { "attribute_name": "app_version", "value": 74 }, "0x0004": { "attribute_name": "manufacturer", "value": "_TZE204_1fuxihti" }, "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": {}, "unsupported_attributes": {} }, "0x0102": { "endpoint_attribute": "window_covering", "attributes": { "0x0008": { "attribute_name": "current_position_lift_percentage", "value": 0 } }, "unsupported_attributes": { "0x0008": { "attribute_name": "current_position_lift_percentage" }, "0x0009": { "attribute_name": "current_position_tilt_percentage" } } } }, "out_clusters": { "0x000a": { "endpoint_attribute": "time", "attributes": {}, "unsupported_attributes": {} }, "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} } } }, "242": { "device_type": { "name": "PROXY_BASIC", "id": 97 }, "profile_id": 41440, "in_clusters": {}, "out_clusters": { "0x0021": { "endpoint_attribute": "green_power", "attributes": {}, "unsupported_attributes": {} } } } } } } ```

Diagnostic information

Diagnostic information ```json [Paste the diagnostic information here] ```

Logs

Logs ```python Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:230 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 19:46:46 (12 occurrences) Last logged: 20:23:52 [139681897782592] Failed to close cover: [139682099123136] Failed to close cover: [139681737586624] Failed to close cover: [139681734085440] Failed to close cover: [139681735934912] Failed to close cover: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 230, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 2035, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2072, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service return await service.entity_service_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 876, in entity_service_call response_data = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/zha/cover.py", line 174, in async_close_cover raise HomeAssistantError(f"Failed to close cover: {res[1]}") homeassistant.exceptions.HomeAssistantError: Failed to close cover: ```

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, GreenPowerProxy from zhaquirks.const import ( DEVICE_TYPE, ENDPOINTS, INPUT_CLUSTERS, MODELS_INFO, OUTPUT_CLUSTERS, PROFILE_ID, ) from zhaquirks.tuya import ( TuyaManufacturerWindowCover, TuyaManufCluster, TuyaWindowCover, TuyaWindowCoverControl, ) class TuyaCover0601_GP(TuyaWindowCover): """Tuya blind controller device.""" signature = { # "node_descriptor": "NodeDescriptor(byte1=2, byte2=64, mac_capability_flags=128, manufacturer_code=4098, # maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, # maximum_outgoing_transfer_size=82, descriptor_capability_field=0)", # "endpoints": { # "1": { "profile_id": 260, "device_type": "0x0051", "in_clusters": [ "0x0000", "0x0004","0x0005","0xef00"], "out_clusters": ["0x000a","0x0019"] } # }, # "manufacturer": "_TZE200_zah67ekd", # "model": "TS0601", # "class": "zigpy.device.Device" # } MODELS_INFO: [ ("_TZE204_1fuxihti", "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, ], OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id], }, #

Additional information

No response

AlterSu24 commented 11 months ago

My model is TZE200_xu4a5rhj and my situation is the same as you are. It showed no entities at first, so I asked for support and add the custom quirk porvided by @javicalle. Then the 3 buttons appeared, but cannot be controlled at all. https://github.com/zigpy/zha-device-handlers/issues/2483#issue-1813225750

I replyed my debug log and waited for a few months until now. No further tips or instructions.

Seems like the tuya cover motor do have a problem with ZHA. https://github.com/zigpy/zha-device-handlers/issues/2766#issue-2004521949 I found the same issue here.

I tried with zigbee2mqtt, it works perfectly. But I change back to ZHA because my ohter devices works more stable with ZHA.

Hope someone can help this out.

github-actions[bot] commented 5 months 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.

maxustm commented 4 months ago

Also have _TZE204_1fuxihti, but i can't understand how make it works in ZHA.