-
Notifications
You must be signed in to change notification settings - Fork 737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Device Support Request] - TS0601 by _TZE200_v1jqz5cy - Chlorine Meter PH ORP EC TDS Salinity Temp CL Tester Swimming Pool Water Quality Analyzer #2565
Comments
I would be happy to have the device supported too, but I cannot find it in the list of all the Zigbee2mqtt devices: looking for "_TZE200_v1jqz5cy" in the zigbee-herdsman-converters project returned nothing. Instead, I found the very same request for the device to be supported in zigbee2mqtt here: Do you have the Tuya ZigBee gateway? |
I find it strange that I can't seem to locate the source where I read about zigbee2mqtt supporting it. The threat you mentioned is the only information I came across this time. It's quite puzzling. I do have the Zigbee coordinator USB dongle, and I have successfully paired it with several other sensors.I didn't expect this expensive sensor to be unsupported. I hope someone can help as it looks promising for the purpose but it is now useless for me. |
The device is expensive, but rare (not many people bought it, compared
to a connected plug :-). So less people interested.
I have contacted YIERYI, asking for a precise list and interpretation of
the TUYA Data Points.
We will see what they say. The Z2M issue contains a partial description.
Then, I may be will have a look on how to write a zha-quirk for the
device. I'm a decent python programmer, but this also requires to learn
ZHA/ZigPy and I'd rather avoid that. Time is rare.
Thomas
Le 07/09/2023 à 13:42, KirkKirk a écrit :
…
I find it strange that I can't seem to locate the source where I read
about zigbee2mqtt supporting it. The threat you mentioned is the only
information I came across this time. It's quite puzzling. I do have
the Zigbee coordinator USB dongle, and I have successfully paired it
with several other sensors.I didn't expect this expensive sensor to be
unsupported. I hope someone can help as it looks promising for the
purpose but it is now useless for me.
|
I looked at this, this afternoon, but Zigbee and zha quirks are challenging to grab and the documentation for zha quirks looks minimal. Instead, the ZigBee specifications are precise but daunting to grab. I tried to get inspiration from existing tuya device quirks, but this device is challenging because it reports measurements (ORP and TDS) that do not exist in the ZCL Measurement cluster list. So I created new clusters with invented (unused) cluster numbers. I post below my current quirk version, but I haven't tried it. For sure, the measurement units/multipliers are likely incorrect. I assume I'm close to the objective, and my hope is that one of the ZHA developers who knows about Tuya devices will have a look at it and make it work. The Data point specification is taken from the still infant Z2M handler here: https://gist.github.com/Koenkk/7262a8a36bb84327ff563e0b8256024b
|
I do not have a Tuya gateway, so I cannot test it, but I also assume that 2 of the clusters (pH and ORP) should include commands to start calibration with the 3 pH and the single ORP buffers that is provided with the device. @KirkKirk If you have such a gateway, could you try to find how these can be called? Apparently, Tuya devices can be reverse-engineered using the Tuya IoT cloud platform. See Find Tuya Data Points |
if it helps - seems it is working on deconz: https://forum.phoscon.de/t/tuya-tze200-v1jqz5cy-zigbee-chlorine-meter/3930 and here: dresden-elektronik/deconz-rest-plugin#7215 i have one too but no tuya gateway either - the deconz implementation seems to be working - maybe that was where you saw it working? |
I'm afraid that I don't have any other gateway apart from the SONOFF ZB Dongle-P Zigbee 3.0 USB Dongle Plus. I'm sorry, but my coding knowledge is limited, so I can't offer more assistance beyond what I have already provided. However, I am willing to help if you could guide me on what next steps to take. |
Yes, that's what I saw! After considering my options, I have decided to stick with ZHA as it provides me with all the features I need. |
I bought a Tuya gateway and followed the instructions on Z2M and found more DP Ids: 1: TDS (Translation of Chinese by Google Translate camera from Tuya IoT platform website). There are apparently 2 pH calibration DP Ids (and there are 2 pH calibration standards: Asia uses 6.86/4.00/9.18, EU uses 7/4/10). The two pH calibration DPs could be these 2 maybe? My quirk proposal is therefore not only likely wrong but also incomplete... |
@tschiex Have you attempted to retrieve the data from the Tuya integration? If you can integrate it with Home Assistant, I will also purchase the Tuya gateway. |
@KirkKirk I will have a try but I'm not sure a failure will be informative: I already bought one Tuya device which is currently used. It's a Wifi device that I manage from HA, using "Local Tuya", not "Tuya" (I prefer to avoid cloud-dependencies, even if this device connects automatically to a Smart Life account). Now, the Water quality device is ZigBee connected to a Wifi gateway which I registered to Tuya (not SmartLife) because I needed to use the Tuya IoT platform on the cloud to decipher the Data Points. I'm not sure the Tuya integration will cope with this situation, where there are 3 Tuya devices both Wifi and ZigBee and managed by 2 different Tuya cloud entities (Tuya and SmartLife). But I will try. :-) |
Ok, I did reset the tuya gateway and the PhMeter, linked them to my Smartlife account (success), installed the Tuya extension on HA, linked it to the proper account on the cloud and.... I'm sorry to say that the gateway and the pHmeter show no entity. I'm quite confident that with some work, I could get the pghMeter to work on local Tuya. Will try that instead and keep you updated. |
Well. I was wrong. The gateway can be integrated into local tuya (it shows in the list of devices that can be added) but the Zigbee device remains invisible under local Tuya. The only way is to go the ZHA/Z2M way apparently. |
THANK YOU @tschiex. |
Hi guys, is there any development on this? |
I took your quirk proposal plus info from:
Fixed a typo in |
Thanks Alexis. I'm also following the Z2M thread on this device. Apparently, the device does not report any Data Point (Koenkk/zigbee2mqtt#18704 (comment)). |
Ok, I have done some Zigbee sniffing for Z2M/Koenkk and the device is now working on Z2M. |
I believe we need to migrate this code. However, I did a search by
Then looked for those in ZHA and found them here. BUT, I don't see any special things on ZHA side? I'll continue digging anyway, but if someone more proficient with ZHA is able to help, that would be awesome. EDIT: I also suspect that the cluster ids change I did was not needed. |
I was starting to do precisely the same analysis (finding the Z2M converters with the same specificity to find their mirror in ZHA) when I saw your message yesterday. Great! For the quirk: I took your gist as is, I will compare it with my analysis of Tuya DPs and the other quirks you mention on ZHA. I also hope people knowledgeable in ZHA/zigpy will help. Not before this evening I'm afraid (local French time). I'm wondering why only temperature shows as a sensor. The other virtual clusters (ORP,...) show in the "Manage your Zigbee device" menu but not beyond that. ANd they all return "None" when one query them. |
Just a few things / ideas to consider:
|
Reacting quickly...
|
Based on last response in z2m, we need to actually make a call to cluster 0xEF00, attribute 0x03. I'm trying to but failing. And for some reason now I don't even get the quirk loaded for the device either. |
If the device is OK paired and working you can re-powering the device and the MCU is sending current status for all DP is having / using to the host system = the same as command 0x3. Put debug for quirks and look then the system is trying loading it and see what is complaining of but normally its some cluster that is not matching in the signature. |
:( |
Thanks. Found a useful _divisor for this case. |
Thanks for the hard work! I would also like to have it in HA - right now it shows in Tuya as unsupported = device is found without entities. I am trying to add it via ZHA, but I don't know how to setup the connection to the gateway. Under the "Select the serial port for your Zigbee radio" I select enter manually and get these options:
Which one should I choose and what's the how do I find out the input paratmers of it? |
The code to make the device functional under ZHA is not yet included in ZHA + ZHA-device-handlers. You will have to wait a bit. It's not just a quirk, it requires some new sensor classes in ZHA and even some new units in HA. As for Zigbee controllers, I would say that the EZSP way is advised with ZHA. I have a SONOFF (ZBDONGLE-E model). See this link, in the "RECOMMENDED ZIGBEE RADIO ADAPTERS AND MODULES" section. |
@TheJulianJES I understand you are busy. I will try two quickly answered questions. Short answers would help me move forward:
|
Thanks Thomas What would you say is the best way now for me to add this device to my HA and see its data in the dashboard? |
Creating the number entities using
Hmm, this is tricky. We could add a ZHA button entity maybe that sends that command. |
Ok. Thanks @TheJulianJES . quirk_id and number.py entities created (and lit looks like they work, they have consistent initial values).
But the created entities have not a "nice" name (_TZE200_v1jqz5cy TS0601 None). |
I can give you more detailed instructions later, but you'll need to add the translation key to the translation files and run the "language" script once. |
@TheJulianJES Ok. I have added a button:
and modified the core/cluster_handlers/manufacturerspecific.py with:
I also added this to the quirk:
As this a chance to work? |
@TheJulianJES Could you have a look at #2927 and more precisely https://github.com/zigpy/zha-device-handlers/actions/runs/7595993411/job/20689201853?pr=2927 The spell tests will not tolerate that a spell sends 2 messages. So my PR fails the tests, but I cannot do anything to pass them. |
Hi, What would normally be the process to move this forward? |
To be honest, the thing is, I did all the merges from all PRs, commits, etc and build a local container, and got it running, |
Greetings, I do have one of this sensor and integrated the latest version of the quirk to see what has been described, ie a single temperature sensor. I understand there's some core mods in HA to make it work under polling / request, how far are we to get it working natively (I run the latest version of the core) ? Thanks |
My understanding is that this device requires too many changes in ZHA/HA to be accepted, even if my PR is Ok otherwise I think. This is understandable because most of the changes in HA/ZHA are related to creating sensor entities and this is now possible directly in the quirks, using quirks v2 (which did not exist when I started this). So, the best way to move forward here is probably to take my current quirk (v1) and rewrite it as a quirk v2. Very few changes in HA/ZHA would then be needed (only for introducing new units I think). I have spent (lost ?) quite some time on this and my availability is now low. |
@tschiex @TheJulianJES thanks for this initial implementation and guidance. I made the mistake of buying this sensor thinking it was already supported, so I guess I committed myself to trying to help out. I've followed this thread and have made an attempt to do a v2 version here: #3673 Using v2 quirks I tried to mimic the same functionality you had so far, however, it lacks some sensor units, and adds an auto refresh option. Aside from that it works great without requiring any other modifications. Folks should be able to drop this quirk into /config/zha_quirks/ , reload and see a bunch more sensors. |
Thanks a lot @danielp370 and kudos ! That's a nice example of unstructured team work :-) The main reason my PR didn't get into HA is probably that it introduced a lot of new stuff into HA/ZHA. With this v2, far less stuff is needed, still, yes, units... We should submit a PR for these. |
Looks like some amazing work here!
I have been reading through this discussion here, and it seems that it is needed to continually poll the device for 1-2 minutes to allow the readings to stabilise This is done by:
I'll be watching this ticket as keen to try this once it is integrated into HA using ZHA. |
My quirk and a good fraction of its dependencies have been absorbed in a quirk v2. I installed it and it works fine. |
I don’t think we need to do anything with backlight_value like that discussion suggested - I have super stable readings by using the refresh set at 15 minutes. Is that not the case for others? If we need to poll it more often to start then I’d suggest adjusting the refresh via an external automation or logic. That said, we could add that logic to the refresh logic I have in the PR.
Btw, I’m unsure I have CL scale correct.
… On 15 Jan 2025, at 00:20, Thomas Schiex ***@***.***> wrote:
My quirk and a good fraction of its dependencies have been absorbed in a quirk v2. I installed it and it works fine.
There is a preiodic refresh sent. It's not doing anything with the "backlight_value", just sending the QUERY_DATA command I identified, but it should be easy to change.
See:
https://github.com/zigpy/zha-device-handlers/blob/3a17d5db5cdc3af7040debc5022a9b4c8583409c/zhaquirks/tuya/ts0601_pool_sensor.py <https://github.com/zigpy/zha-device-handlers/blob/3a17d5db5cdc3af7040debc5022a9b4c8583409c/zhaquirks/tuya/ts0601_pool_sensor.py>
|
I totally agree. I just wanted to point out that this was feasible and easy if someone wants to test this.
My sensor measures are also fairly stable and consistent with my pool state: it says 0 Cl and the pool has been dormant/stopped for months.
15 janv. 2025 01:36:02 danielp370 ***@***.***>:
…
I don’t think we need to do anything with backlight_value like that discussion suggested - I have super stable readings by using the refresh set at 15 minutes. Is that not the case for others? If we need to poll it more often to start then I’d suggest adjusting the refresh via an external automation or logic. That said, we could add that logic to the refresh logic I have in the PR.
Btw, I’m unsure I have CL scale correct.
> On 15 Jan 2025, at 00:20, Thomas Schiex ***@***.***> wrote:
>
>
> My quirk and a good fraction of its dependencies have been absorbed in a quirk v2. I installed it and it works fine.
> There is a preiodic refresh sent. It's not doing anything with the "backlight_value", just sending the QUERY_DATA command I identified, but it should be easy to change.
>
> See:
>
> https://github.com/zigpy/zha-device-handlers/blob/3a17d5db5cdc3af7040debc5022a9b4c8583409c/zhaquirks/tuya/ts0601_pool_sensor.py <https://github.com/zigpy/zha-device-handlers/blob/3a17d5db5cdc3af7040debc5022a9b4c8583409c/zhaquirks/tuya/ts0601_pool_sensor.py>
—
Reply to this email directly, view it on GitHub[#2565 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ADRL5FEXH3PA4672XI77UC32KWUMZAVCNFSM6AAAAAA4KDEPVCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOJRGM4DSMBVGI].
You are receiving this because you were mentioned.
[Image de pistage][https://github.com/notifications/beacon/ADRL5FCCUIEWIITR6JHIFBL2KWUMZA5CNFSM6AAAAAA4KDEPVCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTU2OV2XY.gif]
|
Problem description
Not supported device in ZHA
Smart WiFi Zigbee Chlorine Meter PH ORP EC TDS Salinity Temp CL Tester Swimming Pool Water Quality Analyzer
https://www.aliexpress.com/item/1005005575336871.html?spm=a2g0o.order_list.order_list_main.11.28e31802Wxn6Wl
Solution description
Add it to the supported device list in ZHA Please.
Screenshots/Video
Screenshots/Video
[]
Device signature
Device signature
Diagnostic information
Diagnostic information
Logs
Logs
Custom quirk
Custom quirk
Additional information
No response
The text was updated successfully, but these errors were encountered: