Skip to content
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

Tuya TRV602Z not so well supported #26195

Open
g-chevalier opened this issue Feb 5, 2025 · 8 comments
Open

Tuya TRV602Z not so well supported #26195

g-chevalier opened this issue Feb 5, 2025 · 8 comments
Labels
problem Something isn't working

Comments

@g-chevalier
Copy link

What happened?

This TRV listed as supported in the devices pages is in fact partially supported.

  • Auto mode and schedules is not working.
  • Temperature settings can only be set to round temps in GUI whereas the device itself allows 0.5° steps.
  • Motor thrust is not working.
  • Screen orientation shows only two options whereas the device has four different orientations.

Before going into details, as there is a lot of confusion on Tuya's devices identification, here is the exact data I have from Zigbee pairing:

Manufacturer: Tuya
Model: TRV602Z
Zigbee Model: TS0601
Zigbee Manufacturer "_TZE204_ltwbm23f"

Moreover, "TRV602Z" is indeed written on the device itself, and the picture correspond (the new OLED display).

Auto mode and schedules problem:

In "manual" modes, presets are working well. If I set Preset to "Eco" or "Comfort", the target temperature displayed on the valve itself corresponds to the respective temp settings and the mode icon follows the Preset.

The "Auto" mode doesn't work as intended.
First, when the valve is set to "Auto" mode, the icon on the valve is OK (the one with a clock), but the target temperature displayed is not the one that is in the schedule (here 20.0 as per the factory default "06:00/20.0 08:00/15.0 12:00/20.0 14:00/15.0 18:00/20.0 22:00/15.0"), but stay on the "Eco" setting.

And, here is the worst problem, as soon as we update a schedule in the GUI, this scrambles the device settings.
I did a simple test. Factory default schedule is "06:00/20.0 08:00/15.0 12:00/20.0 14:00/15.0 18:00/20.0 22:00/15.0" for all days. I just changed the schedule for the current day to "06:00/19.0 08:00/17.0 12:00/19.0 14:00/17.0 18:00/19.0 22:00/17.0" (without touching hours, just the target temperatures to be sure that I was not wrong on the time periods syntax).

After applying this new schedule, the TRV displays the antifreeze icon and target temperature is 5°C. For other untouched days, it's OK, it works according to schedules.

While googling for support of this _TZE204_ltwbm23f particular model, I found this discussion where the proposed converter works for the daily schedules (file trv601z_trv602z.txt, renamed into .js): discussions 25269

Motor thrust problem:

This setting seems to just be silently ignored, and always stays to "middle".
If I click on "Weak", I can see in the logs that it immediately returns to "Middle". Same on the GUI as soon as it is refreshed.

Display orientation problem:

If I change screen orientation on the device itself using the push button, over the 4 possibilities, the following errors are triggered in the logs for positions right and left:

[2025-02-05 13:53:00] error: 	z2m: Exception while calling fromZigbee converter: Value '2' is not allowed, expected one of 0,1}
[2025-02-05 13:53:00] debug: 	z2m: Error: Value '2' is not allowed, expected one of 0,1
    at Object.from (/app/node_modules/.pnpm/zigbee-herdsman-converters@21.27.1/node_modules/src/lib/tuya.ts:546:27)
    at Object.convert (/app/node_modules/.pnpm/zigbee-herdsman-converters@21.27.1/node_modules/src/lib/tuya.ts:1880:57)
    at Receive.onDeviceMessage (/app/lib/extension/receive.ts:170:51)
    at EventEmitter.wrappedCallback (/app/lib/eventBus.ts:204:23)
    at EventEmitter.emit (node:events:530:35)
    at EventBus.emitDeviceMessage (/app/lib/eventBus.ts:130:22)
Same with Value '3' for other not supported orientation.

The relevant frames I found in debug mode for this setting are:

[2025-02-05 13:53:00] debug: 	z2m: Received Zigbee message from '0xa4c1386bc7fed5ff', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,180],"type":"Buffer"},"datatype":2,"dp":5},{"data":{"data":[2],"type":"Buffer"},"datatype":4,"dp":113}],"seq":56320}' from endpoint 1 with groupID 0
[2025-02-05 13:53:00] error: 	z2m: Exception while calling fromZigbee converter: Value '2' is not allowed, expected one of 0,1}
And
[2025-02-05 13:53:03] debug: 	z2m: Received Zigbee message from '0xa4c1386bc7fed5ff', type 'commandDataReport', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[3],"type":"Buffer"},"datatype":4,"dp":113}],"seq":56832}' from endpoint 1 with groupID 0
[2025-02-05 13:53:03] error: 	z2m: Exception while calling fromZigbee converter: Value '3' is not allowed, expected one of 0,1}

So, it seems that dp 113 with values 2 and 3 holds left and right orientation.

What did you expect to happen?

No errors and full support of all cases.

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

2.1.0-1

Adapter firmware version

Not relevant

Adapter

Not relevant

Setup

Home Assistant OS

Debug log

No response

@g-chevalier g-chevalier added the problem Something isn't working label Feb 5, 2025
@andreypuhovsky
Copy link

andreypuhovsky commented Feb 8, 2025

Got 10 of these TRVs, investigating how to implement some features.
Found that schedule config done via Tuya app values can't be recognized by current converter.
Also don't know yet how it handles boost mode (available only in auto mode).
No countdowns advertised, no boost switch either. Boost time only shows current setting (if chosen 30 mins it will stay 30 mins until they pass)
Also you can configure UP to 6 schedules per day. It can be 1 or 5 or 6.

This is my device btw
https://a.aliexpress.com/_EIxem1I

This is how its interface logs like on Tuya app.
imageimageimageimage

@andreypuhovsky
Copy link

andreypuhovsky commented Feb 8, 2025

I guess I've found how their engineers have done the schedule to support all the features they provide.

@Koenkk I know we are not in the right place (should we probably move to converters repo?), but are there any converters with complex functionality like composite groups?

I've found some semi-complex one for the following device https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/src/devices/tuya.ts#L4598.
However to support full schedule functionality for this device, it will be even more complex

@g-chevalier
Copy link
Author

Nobody wanting to capitalize on discussions/25269 work? As said, the converter prototype that can be found here is working with schedules.
By the way, @andreypuhovsky, the TRV you mention is not the same model, the picture on AliExpress link doesn't correspond. For information I bought mines here: https://fr.aliexpress.com/item/1005004733341777.html. They are advertised as TRV602Z and this is even written on the valve itself.

@andreypuhovsky
Copy link

andreypuhovsky commented Feb 13, 2025

Pictures can be different but the inner part is the same.
I almost did whole converter, just need more time - I have my full-time job :).
Already did the schedules to work the same as in tuya app - you can setup a mode to start at certain time or a manual temperature. Also you can have UP to 6 schedules per day (you can just setup 1 or 5 or full 6 transitions)

The code provided above is not complete for a full set of scheduler features.

Image

@andreypuhovsky
Copy link

andreypuhovsky commented Feb 15, 2025

fyi @g-chevalier I've finished my work, but this is still considered as beta :)
I'm currently testing it on 2 different devices which are being detected as _TZE204_ltwbm23f

  1. https://www.aliexpress.com/item/1005008383187509.html (model on device TRV702Z)
  2. https://www.aliexpress.com/item/1005008226702664.html (model on device TRV601Z)

However these are identical without cover and "screen".
Both are having your device on some or more pictures in the product description.

I guess I will share the implementation as external converter tomorrow in z2m-converters repo discussions (and mention it here), because it will take a while to get it in a release version.
The implementation took 800+ lines of code and a week of investigation and development :)
This can't be just transferred as-is to main repo.

Functionality as below

Image

TZE204_ltwbm23f.pdf

@g-chevalier
Copy link
Author

Thank's @andreypuhovsky you for your hard work!
I'll test your converter with my device when it will be available. This will add a new model (TRV602Z) to the list.

@andreypuhovsky
Copy link

@g-chevalier
Copy link
Author

@andreypuhovsky, I just posted some feedback into your request to comments. Thank you again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants