Open MS-Turbo opened 2 years ago
The signature can match to any of that quirks:
All is using the same tuya Zigbe-MCU modules (_TYST11 / _TZE200) and cant only being identified by the design if the manufacture not have doing one change of the MCU firmware.
From my first point of view is one clone of the:
Saswell | SEA802 | _TZE200_c88teujp | TS0601 | ✅ Sas I 🥇 | 576 -- | -- | -- | -- | -- | -- Also Z2M was adding it in april as one Saswell and deleting it in august for adding it agen for 10 hours as one Zonnsmart. Zonnsmart | TV01-ZG | _TZE200_e9ba97vf | TS0601 | ✅ ZS | 983 -- | -- | -- | -- | -- | -- Must testing witch is working OK but i think the last is the right the the Sas is little old and not updated and the new have little updated hardware design.Also 2 different box names for it around for it AVATTO TRV06 (Z2M) and MYUET ME167 (DE).
Thanx for the update! Is there a step by step user guide on how to implement this an easy way?
There is a good guide to create your local quirk:
You need to copy the ts0601_trv.py
file to your local zha_quirk folder and edit the content:
At the ZonnsmartTV01_ZG
edit the MODELS_INFO
adding your device:
MODELS_INFO: [
("_TZE200_7yoranx2", "TS0601"), # MOES TRV TV01 ZTRV-ZX-TV01-MS
("_TZE200_bvu2wnxz", "TS0601"),
("_TZE200_e9ba97vf", "TS0601"),
("_TZE200_hue3yfsn", "TS0601"), # TV02-ZG
("_TZE200_husqqvux", "TS0601"),
("_TZE200_kly8gjlz", "TS0601"),
("_TZE200_lnbfnyxd", "TS0601"),
("_TZE200_mudxchsu", "TS0601"),
],
Restart HA, and pair your device again.
Thanx :)
Followed the guides and added my device ("_TZE200_bvu2wnxz", "TS0601"), under ZonnsmartTV01_ZG and models_info. I dont think my TVR is using the same as class as the ZonnsmartTV01_ZG (se picture) Any other suggested devices I can try adding my model under MODELS_INFO?
First configure local quirks for ZHA in HA config: https://github.com/zigpy/zha-device-handlers/discussions/693#discussioncomment-857274.
Then copy one quirk file in the folder and adding your device ID in the signature (one new line but best copy one working one and editing it then no extra spaces or other things is braking the files format).
ZONNSMART TV01-ZG "type" is here https://github.com/zigpy/zha-device-handlers/blob/687adffe438c4baf2678e248c521f78dc8c5686c/zhaquirks/tuya/ts0601_trv.py#L1676-L1686
Only having one local quirk with your device ID in the folder so you is knowing witch is the working one !!
ZONNSMART is needing little more editing getting all working in ZHA but you is getting one standard TRV and it shall working if its the right one. Restart HA and look if the system is loading the quirk.
Also adding little debug logging is great help if getting problems.
I was too long at the doctor with me bad ear and was missing the train :-((((
Ohh, hope it worked out with both the ear and getting home :)
I will try the SAS file instead and see if the functionality is better there out of the box Thanx for tips not having more than one local quirk and device ID
@MS-Turbo Then is being paired and is working so you is getting the battery and / or the thermostat OK taking the battery out and waiting one minute and potting it back and it shall reporting all known commands and attributes.
@javicalle is needing them for matching the right quirk or making one new.
The "train" was not one real one only getting home and commenting this issue.
The ear was emerge OP last evening and i can hearing around 5-10% more then for the after last weekend (Zero) so going better.
And i need more holidays weeks is south Spain !!!!! (hola)
Thanx for tips not having more than one local quirk and device ID
You can copy both files in your local quirk folder and just add your manufacturer ID in just one device signature.
Checking (in the device view) your device signature will tell you if the device is loading the expected quirk.
After every file change, remove any __pycache__
folder from your local quirk folder and restart HA.
Not sure if pairing the device again is needed, but better if too much than too less.
Good information to have!
Status: I took out the batteries and put them back in. Then the device startet a calibration process, but still I get little data from device. Have i done everything correct?
Se picture of device view and no pycache folder in config Quirk: ts0601_trv.ZonnsmartTV01_ZG
Hola !!
The first gen was not needing repairing and some times ZHA was not loading the quirk and must starting more times (perhaps the bug is away 1.5 year later).
Then having the device up and running also with wrong quirk changing to ZONNSMART and restarting HA and then repower the device and all DP shall coming in the log for you.
Tried two restarts and removing device and re-adding it
Add https://www.home-assistant.io/integrations/zha/#debug-logging and restart HA and look in the log if the device is sending somthing interesting then doing changes on it locally.
As you seem to bee an expert on the subject, it seems to be a sollution in zigbee2mqtt. Unfortunately i am using ZHA, but is it possible to re-use the code that has been written by these guys?
It seems that the working Z2M version could be this one:
The DPs seems very diferents from the current Tuya TRV quirks. That would need a few work to make it operational.
Hi guys, I have exact same thermostat valves model and I'm struggling with it too. Is any of these 2 quirks working for you @MS-Turbo ? I understand that we have to wait for somebody to integrate working existant js code into our python quirk ?
So far, non of the suggested qirks are working adequate
Hello everyone, I just received 6 of these bought from this listing.
@MattWestb wrote:
@MS-Turbo Then is being paired and is working so you is getting the battery and / or the thermostat OK taking the battery out and waiting one minute and potting it back and it shall reporting all known commands and attributes.
I have done this as suggested. Here is the log: TZE200_bvu2wnxz TS0601reporting.log
The tuya log lines are:
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [1] for attribute 0x0402 (command 0x0002)
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [1] for attribute 0x0403 (command 0x0002)
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [0, 0, 0, 250] for attribute 0x0204 (command 0x0002)
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [0, 0, 0, 210] for attribute 0x0205 (command 0x0002)
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [0] for attribute 0x0107 (command 0x0002)
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [1, 6, 0, 0, 120, 8, 0, 0, 160, 18, 0, 0, 220, 20, 0, 0, 200] for attribute 0x001c (command 0x0002)
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [2, 6, 0, 0, 120, 8, 0, 0, 160, 18, 0, 0, 220, 20, 0, 0, 200] for attribute 0x001d (command 0x0002)
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [3, 6, 0, 0, 120, 8, 0, 0, 160, 18, 0, 0, 220, 20, 0, 0, 200] for attribute 0x001e (command 0x0002)
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [4, 6, 0, 0, 120, 8, 0, 0, 160, 18, 0, 0, 220, 20, 0, 0, 200] for attribute 0x001f (command 0x0002)
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [5, 6, 0, 0, 120, 8, 0, 0, 160, 18, 0, 0, 220, 20, 0, 0, 200] for attribute 0x0020 (command 0x0002)
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [6, 6, 0, 0, 120, 8, 0, 0, 160, 18, 0, 0, 220, 20, 0, 0, 200] for attribute 0x0021 (command 0x0002)
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [7, 6, 0, 0, 120, 8, 0, 0, 160, 18, 0, 0, 220, 20, 0, 0, 200] for attribute 0x0022 (command 0x0002)
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [0] for attribute 0x0523 (command 0x0002)
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [0] for attribute 0x0124 (command 0x0002)
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [0] for attribute 0x0127 (command 0x0002)
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [0, 0, 0, 0] for attribute 0x022f (command 0x0002)
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [0, 0, 0, 210] for attribute 0x0205 (command 0x0002)
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [0] for attribute 0x0403 (command 0x0002)
Set point temperature in degrees C, multiplied by 10. Minimum is 5 degrees:
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [0, 0, 0, 250] for attribute 0x0204 (command 0x0002)
Current temperature * 10:
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [0, 0, 0, 210] for attribute 0x0205 (command 0x0002)
Mode (probably 0=auto, 1=?, 2=off):
[zhaquirks.tuya] [0x3835:1:0xef00] Received value [1] for attribute 0x0402 (command 0x0002)
It seems that the working Z2M version could be this one:
* https://github.com/twhittock/avatto_me167/blob/main/me167.js
The DPs seems very diferents from the current Tuya TRV quirks. That would need a few work to make it operational.
Actually, it does seem to be the same attribute list. If you convert an individual dataPoint to hex, it corresponds to the lower part of the attribute in hex.
For example,
me167HeatingSetpoint: 4
-> value [0, 0, 0, 250] for attribute 0x0204 (command 0x0002)
me167Schedule1: 28
(28 decimal = 1c hex) -> [zhaquirks.tuya] [0x3835:1:0xef00] Received value [1, 6, 0, 0, 120, 8, 0, 0, 160, 18, 0, 0, 220, 20, 0, 0, 200] for attribute 0x001c (command 0x0002)
I have started an implementation on this branch: https://github.com/challs/zha-device-handlers/tree/ts0601_me167_trv
The current room temperature is correctly sent back to Homeassistant, but the temperature setpoint and mode setting is not yet working properly. Maybe there is someone watching this who might want to comment on the implementation. I see that there are some very different styles of implementation, and it wasn't clear to me which is the current best practice style to use.
Blakadder identified it as below: https://zigbee.blakadder.com/Avatto_TRV06.html
Above DPs from Z2M and @challs help should be sufficient. Will do the quirk probably tomorrow.
Only question is: me167FrostGuard: 36, me167AntiScaling: 39, Are they switches to enable function or should they be just binary sensors??
0x0402 Mode (probably 0=auto, 1=?, 2=off): Someone need to check which is which. Z2M says: 0 - schedule 1 - manual 2 - off
Ah... device signature is needed, from HA device panel
the temperature setpoint and mode setting is not yet working properly
I'm not familiar with all the TRV implementations, but I believe that first you need to uncomment/implement the def map_attribute(self, attribute, value):
part. Add logs to validate that is working your code.
If this part is working as expected, and the reading part is working but none of the 'write' part, can be a NO_MANUFACTURER_ID
issue.
If it was the case I would overwrite the write_attributes(self, attributes, manufacturer=None):
method with something like:
async def write_attributes(self, attributes, manufacturer=None):
"""Overwrite to force manufacturer code."""
return await super().write_attributes(
attributes, manufacturer=foundation.ZCLHeader.NO_MANUFACTURER_ID
)
0x0402 Mode (probably 0=auto, 1=?, 2=off): Someone need to check which is which. Z2M says: 0 - schedule 1 - manual 2 - off
[0] auto [1] heat [2] off - according to me167.js.
I'm not sure that the Z2M entry is correct - the entry for the signature TZE200_bvu2wnxz
which we know belongs to the me167 says it is an Avatto TV02, which appears to be a different model.
I'm not familiar with all the TRV implementations, but I believe that first you need to uncomment/implement the def map_attribute(self, attribute, value): part
You are right, I hadn't finished that part yet thanks. The setpoint is done, though, and isn't working so far.
Will do the quirk probably tomorrow.
Cool @jacekk015 - maybe you can build on my work here
Looks like the temperature setting part is working after all already; :)
First version - can contain BUGs ts0601_trv_me167.py.zip
To achieve functionality of Temperature Calibration and Error State[which gives us battery low alarm] debug logs are needed. HA logs from pairing process and 10 minutes after, not cut anywhere. We need to match DP 47 -> HEX 2F and DP 35 -> HEX 23 with some attributes.
@jacekk015 , I added me167 using your first version above and i got a switch controller that when turned ON it puts the thermostat i child lock mode (CL)
I can send you the logs if you tell me how and where to extract the logs from.
Settings -> System -> Logs Pairing process + 10 minutes after
logger:
default: info
logs:
homeassistant.components.zha: debug
zigpy: debug
zhaquirks: debug
Do you want me to filter out spesific words? Lots of other zigbee stuff in the log..
Better not. I can filter it out easily
@jacekk015 , did you get a look at he logs?
That looks like Temperature correction
2022-10-18 18:40:38.974 DEBUG (MainThread) [zhaquirks.tuya] [0xe757:1:0xef00] Received value [0, 0, 0, 0] for attribute 0x022f (command 0x0002)
That should be Error state
2022-10-18 18:40:38.623 DEBUG (MainThread) [zhaquirks.tuya] [0xe757:1:0xef00] Received value [0] for attribute 0x0523 (command 0x0002)
@jacekk015 how should we collaborate on this? I had already solved some of the problems still in your implementation. I can port them over to your code but we'll need to keep in sync.
I have a git branch for this so you can see my state there.
I have fixed some problems in the mode and state reporting. This version is now able to report temperature, mode and heating state properly.
I just tested it, everything seems OK, great job guys !!! Just one thing, battery level is always 0%, is this normal ?
Probably battery line code need to be corrected. That TRV doesn't send battery level, just warns when empty.
@challs and @jacekk015, great work! Is this git branch from challs to be seen as the master from both your work? IT would be very practical for everyone 🙂(https://github.com/zigpy/zha-device-handlers/compare/dev...challs:zha-device-handlers:ts0601_me167_trv)
Battery level corrected ts0601_trv_me167.py.zip
Hi, i had the same Problems with missing Entities. Your solution works! THX ! But one thing doesn´t work. I can turn the power off, it works fine. But on the other side i can´t turn it on. If i push the Power button, nothing happens. Anyone else the same Problems?
Using the latest file from @jacekk015, this is the how the thermostat is shown. Any variations from this in you guys HA view?
Yes, i´m using the latest file from @jacekk015 This is my view.
Thanx! I see your sensor havac has heating state, but mine has state unknown. I will try to rejoin the device.
Is your feature request related to a problem? Please describe. I bought 5 ZigBee Thermostatic Radiator Valves but they are not recognized properly in ZHA. Running ZHA with conbee II stick
Describe the solution you'd like ZHA support for TZE200_bvu2wnxz TS0601
Device signature
```yaml { "node_descriptor": "NodeDescriptor(logical_type=Diagnostic information
```yaml { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2022.10.2", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.5", "docker": true, "arch": "x86_64", "timezone": "Europe/Oslo", "os_name": "Linux", "os_version": "5.15.67", "supervisor": "2022.10.0", "host_os": "Home Assistant OS 9.0", "docker_version": "20.10.17", "chassis": "embedded", "run_as_root": true }, "custom_components": { "fullykiosk": { "version": "1.1.0", "requirements": [ "python-fullykiosk==0.0.11" ] }, "scheduler": { "version": "v0.0.0", "requirements": [] }, "hacs": { "version": "1.28.0", "requirements": [ "aiogithubapi>=22.2.4" ] }, "localtuya": { "version": "4.1.0", "requirements": [] }, "smartthinq_sensors": { "version": "0.24.2", "requirements": [ "pycountry>=20.7.3", "xmltodict>=0.12.0", "cchardet>=2.1.7" ] }, "tahoma": { "version": "2.13.0", "requirements": [ "pyoverkiz==1.3.6" ] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/zha", "requirements": [ "bellows==0.34.2", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.82", "zigpy-deconz==0.19.0", "zigpy==0.51.3", "zigpy-xbee==0.16.1", "zigpy-zigate==0.10.1", "zigpy-znp==0.9.1" ], "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*" }, { "type": "_zigstar_gw._tcp.local.", "name": "*zigstar*" } ], "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": 1039, "manufacturer": "_TZE200_bvu2wnxz", "model": "TS0601", "name": "_TZE200_bvu2wnxz TS0601", "quirk_applied": false, "quirk_class": "zigpy.device.Device", "manufacturer_code": 4098, "power_source": "Battery or Unknown", "lqi": 255, "rssi": -52, "last_seen": "2022-10-10T21:54:49", "available": true, "device_type": "EndDevice", "signature": { "node_descriptor": "NodeDescriptor(logical_type=Additional logs
``` Paste any additional debug logs here. Don't remove the extra line breaks outside the ``` marks. ```Additional context Link to device: https://www.alibaba.com/product-detail/Tuya-Version-Wi-Fi-ZIGBEE-Smart_1600398708828.html https://www.aliexpress.com/i/1005003468882163.html