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
750 stars 685 forks source link

[stability issue] TS0004 _TZ3000_u3oupgdy 4 channel dry contact 7-32v #3133

Open liouma opened 6 months ago

liouma commented 6 months ago

Problem description

Device TS0004 _TZ3000_u3oupgdy corresponding to product: https://fr.aliexpress.com/item/1005006148896015.html?spm=a2g0o.order_list.order_list_main.266.44ec5e5bqqQk8B&gatewayAdapt=glo2fra image

Is recognizer under zha with automatic selection of Quirk: zhaquirks.tuya.ts000x.Switch_4G_GPP. The device is a 4 channel dry contact NO/NC powered in 7-32v very similar to other product described by other users.

The Control section under ZHA show 4 light controls. As additional information, this product is recognized as MHCOZY Modèle TYWB 4ch-RF under z2m

The problem is that the product seem to lose its connexion periodicaly. This happens even if it is very close to the zigbee coordinator (skyconnect)

Solution description

I don't know if this is a software issue or related to the product stability

Screenshots/Video

Screenshots/Video ![image](https://github.com/zigpy/zha-device-handlers/assets/106532164/a04204a4-6cb7-402f-a99f-0b9d892c757e)

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=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": "0x0100", "input_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005", "0x0006", "0xe000", "0xe001" ], "output_clusters": [ "0x000a", "0x0019" ] }, "2": { "profile_id": "0x0104", "device_type": "0x0100", "input_clusters": [ "0x0004", "0x0005", "0x0006", "0xe001" ], "output_clusters": [] }, "3": { "profile_id": "0x0104", "device_type": "0x0100", "input_clusters": [ "0x0004", "0x0005", "0x0006", "0xe001" ], "output_clusters": [] }, "4": { "profile_id": "0x0104", "device_type": "0x0100", "input_clusters": [ "0x0004", "0x0005", "0x0006", "0xe001" ], "output_clusters": [] }, "242": { "profile_id": "0xa1e0", "device_type": "0x0061", "input_clusters": [], "output_clusters": [ "0x0021" ] } }, "manufacturer": "_TZ3000_u3oupgdy", "model": "TS0004", "class": "zhaquirks.tuya.ts000x.Switch_4G_GPP" } ```

Diagnostic information

Diagnostic information ```json { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2024.5.0", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.12.2", "docker": true, "arch": "x86_64", "timezone": "Indian/Reunion", "os_name": "Linux", "os_version": "6.6.25-haos", "supervisor": "2024.04.4", "host_os": "Home Assistant OS 12.2", "docker_version": "25.0.5", "chassis": "vm", "run_as_root": true }, "custom_components": { "hacs": { "documentation": "https://hacs.xyz/docs/configuration/start", "version": "1.34.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "huawei_solar": { "documentation": "https://github.com/wlcrs/huawei_solar/wiki", "version": "1.3.3", "requirements": [ "huawei-solar==2.2.9" ] }, "powercalc": { "documentation": "https://github.com/bramstroker/homeassistant-powercalc", "version": "v1.11.8", "requirements": [ "numpy>=1.21.1" ] }, "birthdays": { "documentation": "https://github.com/Miicroo/ha-birthdays", "version": "1.0.0", "requirements": [] }, "eufy_security": { "documentation": "https://github.com/fuatakgun/eufy_security", "version": "8.0.2", "requirements": [ "websocket-client==1.4.2", "aiortsp==1.3.7" ] }, "proxmoxve": { "documentation": "https://github.com/dougiteixeira/proxmoxve", "version": "3.4.1", "requirements": [ "proxmoxer==2.0.1" ] }, "watchman": { "documentation": "https://github.com/dummylabs/thewatchman", "version": "0.5.1", "requirements": [ "prettytable==3.0.0" ] }, "home_connect_alt": { "documentation": "https://github.com/ekutner/home-connect-hass", "version": "1.1.6", "requirements": [ "home-connect-async==0.8.0" ] }, "tuya_local": { "documentation": "https://github.com/make-all/tuya-local", "version": "2024.5.1", "requirements": [ "tinytuya==1.13.2" ] }, "zha_toolkit": { "documentation": "https://github.com/mdeweerd/zha-toolkit", "version": "v1.1.10", "requirements": [ "pytz" ] }, "tuya_local_ble": { "documentation": null, "version": "0.1", "requirements": [] }, "extended_openai_conversation": { "documentation": "https://github.com/jekalmin/extended_openai_conversation", "version": "1.0.3", "requirements": [ "openai~=1.3.8" ] }, "alarmo": { "documentation": "https://github.com/nielsfaber/alarmo", "version": "v1.10.0", "requirements": [] }, "spotcast": { "documentation": "https://github.com/fondberg/spotcast", "version": "v3.6.30", "requirements": [] }, "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.38.3", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.115", "zigpy-deconz==0.23.1", "zigpy==0.64.0", "zigpy-xbee==0.20.1", "zigpy-zigate==0.12.0", "zigpy-znp==0.12.1", "universal-silabs-flasher==0.0.18", "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*" } ], "is_built_in": true }, "data": { "ieee": "**REDACTED**", "nwk": 54753, "manufacturer": "_TZ3000_u3oupgdy", "model": "TS0004", "name": "_TZ3000_u3oupgdy TS0004", "quirk_applied": true, "quirk_class": "zhaquirks.tuya.ts000x.Switch_4G_GPP", "quirk_id": "tuya.plug_on_off_attributes", "manufacturer_code": 4417, "power_source": "Mains", "lqi": 128, "rssi": -68, "last_seen": "2024-05-02T14:35:29", "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": "0x0100", "input_clusters": [ "0x0000", "0x0003", "0x0004", "0x0005", "0x0006", "0xe000", "0xe001" ], "output_clusters": [ "0x000a", "0x0019" ] }, "2": { "profile_id": "0x0104", "device_type": "0x0100", "input_clusters": [ "0x0004", "0x0005", "0x0006", "0xe001" ], "output_clusters": [] }, "3": { "profile_id": "0x0104", "device_type": "0x0100", "input_clusters": [ "0x0004", "0x0005", "0x0006", "0xe001" ], "output_clusters": [] }, "4": { "profile_id": "0x0104", "device_type": "0x0100", "input_clusters": [ "0x0004", "0x0005", "0x0006", "0xe001" ], "output_clusters": [] }, "242": { "profile_id": "0xa1e0", "device_type": "0x0061", "input_clusters": [], "output_clusters": [ "0x0021" ] } }, "manufacturer": "_TZ3000_u3oupgdy", "model": "TS0004" }, "active_coordinator": false, "entities": [ { "entity_id": "select.traitement_piscine_etat_de_mise_sous_tension", "name": "_TZ3000_u3oupgdy TS0004" }, { "entity_id": "button.traitement_piscine_identifier", "name": "_TZ3000_u3oupgdy TS0004" }, { "entity_id": "light.traitement_piscine_lumiere", "name": "_TZ3000_u3oupgdy TS0004" }, { "entity_id": "light.traitement_piscine_lumiere_2", "name": "_TZ3000_u3oupgdy TS0004" }, { "entity_id": "light.traitement_piscine_lumiere_3", "name": "_TZ3000_u3oupgdy TS0004" }, { "entity_id": "light.traitement_piscine_lumiere_4", "name": "_TZ3000_u3oupgdy TS0004" }, { "entity_id": "update.traitement_piscine_micrologiciel", "name": "_TZ3000_u3oupgdy TS0004" }, { "entity_id": "select.traitement_piscine_mode_de_retroeclairage", "name": "_TZ3000_u3oupgdy TS0004" } ], "neighbors": [], "routes": [], "endpoint_names": [ { "name": "ON_OFF_LIGHT" }, { "name": "ON_OFF_LIGHT" }, { "name": "ON_OFF_LIGHT" }, { "name": "ON_OFF_LIGHT" }, { "name": "PROXY_BASIC" } ], "user_given_name": "Traitement piscine", "device_reg_id": "b657e2d6d0a9e70102d5787596275308", "area_id": "piscine", "cluster_details": { "1": { "device_type": { "name": "ON_OFF_LIGHT", "id": 256 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0001": { "attribute_name": "app_version", "value": 80 }, "0x0004": { "attribute_name": "manufacturer", "value": "_TZ3000_u3oupgdy" }, "0x0005": { "attribute_name": "model", "value": "TS0004" }, "0x0007": { "attribute_name": "power_source", "value": 1 }, "0xfffe": { "attribute_name": "reporting_status", "value": 0 }, "0x0000": { "attribute_name": "zcl_version", "value": 3 } }, "unsupported_attributes": {} }, "0x0003": { "endpoint_attribute": "identify", "attributes": {}, "unsupported_attributes": {} }, "0x0004": { "endpoint_attribute": "groups", "attributes": {}, "unsupported_attributes": {} }, "0x0005": { "endpoint_attribute": "scenes", "attributes": {}, "unsupported_attributes": {} }, "0x0006": { "endpoint_attribute": "on_off", "attributes": { "0x8001": { "attribute_name": "backlight_mode", "value": 1 }, "0x8000": { "attribute_name": "child_lock", "value": 0 }, "0x4002": { "attribute_name": "off_wait_time", "value": 0 }, "0x0000": { "attribute_name": "on_off", "value": 0 }, "0x4001": { "attribute_name": "on_time", "value": 0 }, "0x8002": { "attribute_name": "power_on_state", "value": 0 } }, "unsupported_attributes": { "0x4003": { "attribute_name": "start_up_on_off" }, "0x8000": { "attribute_name": "child_lock" } } }, "0xe000": { "endpoint_attribute": "tuya_manufacturer_specific_57344", "attributes": {}, "unsupported_attributes": {} }, "0xe001": { "endpoint_attribute": "tuya_external_switch_type", "attributes": { "0xd030": { "attribute_name": "external_switch_type", "value": 0 } }, "unsupported_attributes": {} } }, "out_clusters": { "0x000a": { "endpoint_attribute": "time", "attributes": {}, "unsupported_attributes": {} }, "0x0019": { "endpoint_attribute": "ota", "attributes": { "0x0002": { "attribute_name": "current_file_version", "value": 80 } }, "unsupported_attributes": {} } } }, "2": { "device_type": { "name": "ON_OFF_LIGHT", "id": 256 }, "profile_id": 260, "in_clusters": { "0x0004": { "endpoint_attribute": "groups", "attributes": {}, "unsupported_attributes": {} }, "0x0005": { "endpoint_attribute": "scenes", "attributes": {}, "unsupported_attributes": {} }, "0x0006": { "endpoint_attribute": "on_off", "attributes": { "0x4002": { "attribute_name": "off_wait_time", "value": 0 }, "0x0000": { "attribute_name": "on_off", "value": 0 }, "0x4001": { "attribute_name": "on_time", "value": 0 } }, "unsupported_attributes": { "0x8000": { "attribute_name": "child_lock" }, "0x8001": { "attribute_name": "backlight_mode" }, "0x8002": { "attribute_name": "power_on_state" }, "0x4003": { "attribute_name": "start_up_on_off" } } }, "0xe001": { "endpoint_attribute": "tuya_external_switch_type", "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": {} }, "3": { "device_type": { "name": "ON_OFF_LIGHT", "id": 256 }, "profile_id": 260, "in_clusters": { "0x0004": { "endpoint_attribute": "groups", "attributes": {}, "unsupported_attributes": {} }, "0x0005": { "endpoint_attribute": "scenes", "attributes": {}, "unsupported_attributes": {} }, "0x0006": { "endpoint_attribute": "on_off", "attributes": { "0x4002": { "attribute_name": "off_wait_time", "value": 0 }, "0x0000": { "attribute_name": "on_off", "value": 0 }, "0x4001": { "attribute_name": "on_time", "value": 0 } }, "unsupported_attributes": { "0x8000": { "attribute_name": "child_lock" }, "0x8001": { "attribute_name": "backlight_mode" }, "0x8002": { "attribute_name": "power_on_state" }, "0x4003": { "attribute_name": "start_up_on_off" } } }, "0xe001": { "endpoint_attribute": "tuya_external_switch_type", "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": {} }, "4": { "device_type": { "name": "ON_OFF_LIGHT", "id": 256 }, "profile_id": 260, "in_clusters": { "0x0004": { "endpoint_attribute": "groups", "attributes": {}, "unsupported_attributes": {} }, "0x0005": { "endpoint_attribute": "scenes", "attributes": {}, "unsupported_attributes": {} }, "0x0006": { "endpoint_attribute": "on_off", "attributes": { "0x4002": { "attribute_name": "off_wait_time", "value": 0 }, "0x0000": { "attribute_name": "on_off", "value": 0 }, "0x4001": { "attribute_name": "on_time", "value": 0 } }, "unsupported_attributes": { "0x8000": { "attribute_name": "child_lock" }, "0x8001": { "attribute_name": "backlight_mode" }, "0x8002": { "attribute_name": "power_on_state" }, "0x4003": { "attribute_name": "start_up_on_off" } } }, "0xe001": { "endpoint_attribute": "tuya_external_switch_type", "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": {} }, "242": { "device_type": { "name": "PROXY_BASIC", "id": 97 }, "profile_id": 41440, "in_clusters": {}, "out_clusters": { "0x0021": { "endpoint_attribute": "green_power", "attributes": {}, "unsupported_attributes": {} } } } } } }

Logs

Logs [home-assistant_zha_2024-05-02T11-45-20.977Z.log](https://github.com/zigpy/zha-device-handlers/files/15187824/home-assistant_zha_2024-05-02T11-45-20.977Z.log)

Custom quirk

Custom quirk ```python [Paste your custom quirk here] ```

Additional information

I will be more than happy to provide any useful information

liouma commented 6 months ago

The device required a pairing VERY close to the skyconnect. After that it seem to lose the connexion randomly. Generaly after many trials the switch is finally set.

github-actions[bot] commented 2 days 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.