Open bbadrignans opened 2 weeks ago
Just find out this model was added in https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/src/devices/giex.ts few days ago. Anyone knows how to adapt from zigbee-herdsman-converters to zha quirks ?
I succeed to set the valve state using home assistant by modifying ts0601_valve.py as follow. So, it seems :
So I'm not sure this device behave like giex valve, despite code from giex.ts
diff --git a/zhaquirks/tuya/ts0601_valve.py b/zhaquirks/tuya/ts0601_valve.py
index 6958afb..7b11cc2 100644
--- a/zhaquirks/tuya/ts0601_valve.py
+++ b/zhaquirks/tuya/ts0601_valve.py
@@ -314,11 +314,11 @@ class GiexValveManufCluster(TuyaMCUCluster):
)
dp_to_attribute: dict[int, DPToAttributeMapping] = {
- 1: DPToAttributeMapping(
+ 2: DPToAttributeMapping(
TuyaMCUCluster.ep_attribute,
"irrigation_mode",
),
- 2: DPToAttributeMapping(
+ 1: DPToAttributeMapping(
TuyaOnOffNM.ep_attribute,
"on_off",
),
@@ -381,7 +381,7 @@ class GiexValve(CustomDevice):
"""GiEX valve device."""
signature = {
- MODELS_INFO: [("_TZE200_sh1btabb", "TS0601"), ("_TZE200_a7sghmms", "TS0601"), ( "_TZE204_7ytb3h8u", "TS0601")],
+ MODELS_INFO: [("_TZE200_sh1btabb", "TS0601"), ("_TZE200_a7sghmms", "TS0601"), ( "_TZE204_7ytb3h8u", "TS0601"), ( "_TZE204_4fblxpma", "TS0601")],
ENDPOINTS: {
# <SimpleDescriptor endpoint=1 profile=260 device_type=0x0051
# input_clusters=[0x0000, 0x0004, 0x0005, 0xef00]
Problem description
I need some help to develop the quirk for the NEO NAS-WV03B2 irrigation timer valve, with the vendor ID _TZE204_4fblxpma and model TS0601.![image](https://github.com/zigpy/zha-device-handlers/assets/534410/2b2280f7-8478-4e49-8376-0b730d249337)
https://www.szneo.com/en/products/show.php?id=273
I could find a quirk that support TS0601 valves : https://github.com/zigpy/zha-device-handlers/issues/1556
Changing only the VID in ts0601_valve.py didn't work well. I tried for all the valve supported. The best result is : valve states is correctly reported to HA but I can't set valve state from HA.
I haven't a Tuya gateway which make it difficult to find the good DP. Does anyone got the same devices and can help me ?
Additionally does someone has a good explanation on this "Tuya magic spell" (or a link) ?
Solution description
I would like at least to be able to change valve state from ZHA. Having battery status and measured water consumption would be great.
Screenshots/Video
Screenshots/Video
[Paste/upload your media here]Device signature
Device signature
```json { "node_descriptor": "NodeDescriptor(logical_type=Diagnostic information
Diagnostic information
```json { "home_assistant": { "installation_type": "Home Assistant Core", "version": "2024.5.2", "dev": false, "hassio": false, "virtualenv": true, "python_version": "3.12.3", "docker": false, "arch": "aarch64", "timezone": "Europe/Paris", "os_name": "Linux", "os_version": "6.1.0-18-arm64", "run_as_root": false }, "custom_components": { "powercalc": { "documentation": "https://github.com/bramstroker/homeassistant-powercalc", "version": "0.1.0", "requirements": [ "numpy>=1.21.1" ] }, "veolia": { "documentation": "https://github.com/tetienne/veolia-custom-component", "version": "0.4.0", "requirements": [ "pyolia==0.4.0" ] }, "zha_toolkit": { "documentation": "https://github.com/mdeweerd/zha-toolkit", "version": "1.0.0", "requirements": [ "pytz" ] } }, "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.4", "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": 55026, "manufacturer": "_TZE204_4fblxpma", "model": "TS0601", "name": "_TZE204_4fblxpma TS0601", "quirk_applied": true, "quirk_class": "zhaquirks.tuya.ts0601_valve.TuyaValve", "quirk_id": null, "manufacturer_code": 4417, "power_source": "Battery or Unknown", "lqi": 188, "rssi": -53, "last_seen": "2024-06-13T22:04:07", "available": true, "device_type": "EndDevice", "signature": { "node_descriptor": "NodeDescriptor(logical_type=Logs
Logs
Too many logs, I don't know which are relevant.Custom quirk
Custom quirk
Just force the model in TuyaValve class in [ts0601_valve.py](https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/tuya/ts0601_valve.py) : ```python [...] class TuyaValve(CustomDevice): """Tuya valve device.""" signature = { MODELS_INFO: [("_TZE204_4fblxpma", "TS0601")], [...] ```Additional information
Made a scan with zha-tools, does not help me much