[RELEASE] Tuya Wall Mount Thermostat (Water/Electric Floor Heating) Zigbee driver

Could it be there is a problem when the device is connected to a repeater? I use only Ikea repeaters.

It may be possible... My thermostat was connected directly to the hub, but I will try to reposition it, hoping it will go through an Ikea repeater now.

The Tuya thermostat had chosen a Tuya repeater, 12 meters away, 3 walls in between... : (

My test setup: : )

EDIT: Success! (with the metal box lid closed)

:laughing:

Don't forget to reboot the hub a view times, when doing that I can reproduce the missing device type problem.

1 Like

Hey everyone, I've just received an AVATTO type 16 A thermostat using the AliExpress link and hit upon an oddity with driver 1.2.10. Things work well on the whole, but the device keeps flicking thermostatMode back to "heat" all the time, while actually turned off.

My example - floor temp is below set point, we're in manual mode, heating is on. Great. I can bounce the set point above and below the floor temp, the screen updates instantly and the relay clicks in and out after five seconds or so and thermostatOperatingState is updated correctly. Perfect.

But, if I use "Set Thermostat Mode" or the "Off" button in HE to turn the mode to "off" the screen switches off and the relay clicks open, the thermostatMode switches instantly to "off" as it should... and then switches back to "heat" after about 5 seconds. The log of this is below.

2023-02-19 21:07:05.557 info Kitchen Floor Thermostat heatingSetpoint is: 10.0°C
2023-02-19 21:07:05.555 debug Kitchen Floor Thermostat dp_id=2 dp=16 fncmd=10
2023-02-19 21:07:05.479 info Kitchen Floor Thermostat Thermostat mode reported is: heat (dp=2, fncmd=0)
2023-02-19 21:07:05.477 debug Kitchen Floor Thermostat previous thermosatMode was off...
2023-02-19 21:07:05.474 debug Kitchen Floor Thermostat AVATTO/BEOK current thermostatMode was off
2023-02-19 21:07:05.472 debug Kitchen Floor Thermostat dp_id=4 dp=2 fncmd=0
2023-02-19 21:07:05.392 debug (duplicate) transid=78 dp_id=1 dp=1 fncmd=0 command=02 data = [00, 4E, 01, 01, 00, 01, 00]
2023-02-19 21:07:04.546 debug Kitchen Floor Thermostat modeReceiveCheck mode was changed OK to (off). No need for further checks.
2023-02-19 21:07:00.773 debug Kitchen Floor Thermostat last sent mode off is confirmed from the device (dp=1, fncmd=0)
2023-02-19 21:07:00.769 info Kitchen Floor Thermostat switchState reported is: OFF
2023-02-19 21:07:00.763 debug Kitchen Floor Thermostat dp_id=1 dp=1 fncmd=0
2023-02-19 21:07:00.686 debug Kitchen Floor Thermostat device has received Tuya cluster ZCL command 0x00 response 0x00 data = [00, 00]
2023-02-19 21:07:00.578 debug Kitchen Floor Thermostat sendZigbeeCommands(cmd=[he cmd 0x17D6 0x01 0xEF00 0x00 {004E0101000100} {}, delay 200])
2023-02-19 21:07:00.575 debug Kitchen Floor Thermostat sendTuyaCommand = [he cmd 0x17D6 0x01 0xEF00 0x00 {004E0101000100} {}, delay 200]
2023-02-19 21:07:00.521 debug Kitchen Floor Thermostat sending setThermostatMode(off)

This happens whether I control the 'stat through HE or physically with the touch button on the front - though if I use the button on the front I see thermostatMode flick to "off" for just a fraction of a second, then flick back to "heat".

To be clear, while the thermostat is in "off" mode the relay does not operate when altering heatingSetpoint, so it's operating correctly - it just always seems to want to report thermostatMode as "heat". Consequently to turn the thing back on again I have to hit the "Off" button in HE, then send the setThermostatMode command of "heat" within the 5 second window, otherwise the driver thinks it's already back on again and doesn't send the actual Zigbee command.

I've done a search of the thread, but I'm not sure if this has been seen before. The unit reports as follows:

That's a manufacturer of _TZE200_ye5jkfsb and model TS0601 to help with search results.

I'll be replacing my Warmup thermostat regardless, because even with this little bug it's night and day better than their awful internet service and having to rely on IFTTT to hook HE into it, so thank you!

UPDATE: Also just tried this going from "off" to "auto" instead. The unit seems to report "heat" all of the time and the "resend failed commands" feature does its best, then gives up. In the log below I turn off the thermostat, it turns off, then reports "heat". Then I send it a setThermostatMode of "auto" and it gets stuck asking for that mode repeatedly until it quits.

2023-02-19 21:27:46.825 warn Kitchen Floor Thermostat modeReceiveCheck(auto}) giving up retrying
2023-02-19 21:27:46.822 warn Kitchen Floor Thermostat modeReceiveCheck() failed (expected auto, current heat), retry#5
2023-02-19 21:27:42.980 info Kitchen Floor Thermostat Thermostat mode reported is: heat (dp=2, fncmd=0)
2023-02-19 21:27:42.978 debug Kitchen Floor Thermostat previous thermosatMode was heat...
2023-02-19 21:27:42.975 debug Kitchen Floor Thermostat AVATTO/BEOK current thermostatMode was heat
2023-02-19 21:27:42.973 debug Kitchen Floor Thermostat dp_id=4 dp=2 fncmd=0
2023-02-19 21:27:42.893 debug Kitchen Floor Thermostat device has received Tuya cluster ZCL command 0x00 response 0x00 data = [00, 00]
2023-02-19 21:27:42.838 debug Kitchen Floor Thermostat sendZigbeeCommands(cmd=[he cmd 0x17D6 0x01 0xEF00 0x00 {006B0204000101} {}, delay 200])
2023-02-19 21:27:42.835 debug Kitchen Floor Thermostat sendTuyaCommand = [he cmd 0x17D6 0x01 0xEF00 0x00 {006B0204000101} {}, delay 200]
2023-02-19 21:27:42.832 debug Kitchen Floor Thermostat sending AUTO mode!
2023-02-19 21:27:42.804 debug Kitchen Floor Thermostat sending setThermostatMode(auto)
2023-02-19 21:27:42.801 debug Kitchen Floor Thermostat resending mode command : auto
2023-02-19 21:27:42.799 warn Kitchen Floor Thermostat modeReceiveCheck() failed (expected auto, current heat), retry#4
2023-02-19 21:27:38.948 info Kitchen Floor Thermostat Thermostat mode reported is: heat (dp=2, fncmd=0)
2023-02-19 21:27:38.946 debug Kitchen Floor Thermostat previous thermosatMode was heat...
2023-02-19 21:27:38.943 debug Kitchen Floor Thermostat AVATTO/BEOK current thermostatMode was heat
2023-02-19 21:27:38.941 debug Kitchen Floor Thermostat dp_id=4 dp=2 fncmd=0
2023-02-19 21:27:38.859 debug Kitchen Floor Thermostat device has received Tuya cluster ZCL command 0x00 response 0x00 data = [00, 00]
2023-02-19 21:27:38.816 debug Kitchen Floor Thermostat sendZigbeeCommands(cmd=[he cmd 0x17D6 0x01 0xEF00 0x00 {006A0204000101} {}, delay 200])
2023-02-19 21:27:38.813 debug Kitchen Floor Thermostat sendTuyaCommand = [he cmd 0x17D6 0x01 0xEF00 0x00 {006A0204000101} {}, delay 200]
2023-02-19 21:27:38.809 debug Kitchen Floor Thermostat sending AUTO mode!
2023-02-19 21:27:38.780 debug Kitchen Floor Thermostat sending setThermostatMode(auto)
2023-02-19 21:27:38.778 debug Kitchen Floor Thermostat resending mode command : auto
2023-02-19 21:27:38.776 warn Kitchen Floor Thermostat modeReceiveCheck() failed (expected auto, current heat), retry#3
2023-02-19 21:27:34.934 info Kitchen Floor Thermostat Thermostat mode reported is: heat (dp=2, fncmd=0)
2023-02-19 21:27:34.931 debug Kitchen Floor Thermostat previous thermosatMode was heat...
2023-02-19 21:27:34.929 debug Kitchen Floor Thermostat AVATTO/BEOK current thermostatMode was heat
2023-02-19 21:27:34.926 debug Kitchen Floor Thermostat dp_id=4 dp=2 fncmd=0
2023-02-19 21:27:34.847 debug Kitchen Floor Thermostat device has received Tuya cluster ZCL command 0x00 response 0x00 data = [00, 00]
2023-02-19 21:27:34.800 debug Kitchen Floor Thermostat sendZigbeeCommands(cmd=[he cmd 0x17D6 0x01 0xEF00 0x00 {00690204000101} {}, delay 200])
2023-02-19 21:27:34.798 debug Kitchen Floor Thermostat sendTuyaCommand = [he cmd 0x17D6 0x01 0xEF00 0x00 {00690204000101} {}, delay 200]
2023-02-19 21:27:34.794 debug Kitchen Floor Thermostat sending AUTO mode!
2023-02-19 21:27:34.760 debug Kitchen Floor Thermostat sending setThermostatMode(auto)
2023-02-19 21:27:34.754 debug Kitchen Floor Thermostat resending mode command : auto
2023-02-19 21:27:34.752 warn Kitchen Floor Thermostat modeReceiveCheck() failed (expected auto, current heat), retry#2
2023-02-19 21:27:30.910 info Kitchen Floor Thermostat Thermostat mode reported is: heat (dp=2, fncmd=0)
2023-02-19 21:27:30.908 debug Kitchen Floor Thermostat previous thermosatMode was heat...
2023-02-19 21:27:30.905 debug Kitchen Floor Thermostat AVATTO/BEOK current thermostatMode was heat
2023-02-19 21:27:30.903 debug Kitchen Floor Thermostat dp_id=4 dp=2 fncmd=0
2023-02-19 21:27:30.819 debug Kitchen Floor Thermostat device has received Tuya cluster ZCL command 0x00 response 0x00 data = [00, 00]
2023-02-19 21:27:30.775 debug Kitchen Floor Thermostat sendZigbeeCommands(cmd=[he cmd 0x17D6 0x01 0xEF00 0x00 {00680204000101} {}, delay 200])
2023-02-19 21:27:30.772 debug Kitchen Floor Thermostat sendTuyaCommand = [he cmd 0x17D6 0x01 0xEF00 0x00 {00680204000101} {}, delay 200]
2023-02-19 21:27:30.767 debug Kitchen Floor Thermostat sending AUTO mode!
2023-02-19 21:27:30.732 debug Kitchen Floor Thermostat sending setThermostatMode(auto)
2023-02-19 21:27:30.729 debug Kitchen Floor Thermostat resending mode command : auto
2023-02-19 21:27:30.727 warn Kitchen Floor Thermostat modeReceiveCheck() failed (expected auto, current heat), retry#1
2023-02-19 21:27:29.114 debug Kitchen Floor Thermostat basic cluster report : descMap = [raw:17D60100001801002048E2FF201FE4FF2000, dni:17D6, endpoint:01, cluster:0000, size:18, attrId:0001, encoding:20, command:0A, value:48, clusterInt:0, attrInt:1, additionalAttrs:[[value:1F, encoding:20, attrId:FFE2, consumedBytes:4, attrInt:65506], [value:00, encoding:20, attrId:FFE4, consumedBytes:4, attrInt:65508]]]
2023-02-19 21:27:26.887 info Kitchen Floor Thermostat Thermostat mode reported is: heat (dp=2, fncmd=0)
2023-02-19 21:27:26.884 debug Kitchen Floor Thermostat previous thermosatMode was heat...
2023-02-19 21:27:26.882 debug Kitchen Floor Thermostat AVATTO/BEOK current thermostatMode was heat
2023-02-19 21:27:26.879 debug Kitchen Floor Thermostat dp_id=4 dp=2 fncmd=0
2023-02-19 21:27:26.797 debug Kitchen Floor Thermostat device has received Tuya cluster ZCL command 0x00 response 0x00 data = [00, 00]
2023-02-19 21:27:26.751 debug Kitchen Floor Thermostat sendZigbeeCommands(cmd=[he cmd 0x17D6 0x01 0xEF00 0x00 {00670204000101} {}, delay 200])
2023-02-19 21:27:26.748 debug Kitchen Floor Thermostat sendTuyaCommand = [he cmd 0x17D6 0x01 0xEF00 0x00 {00670204000101} {}, delay 200]
2023-02-19 21:27:26.743 debug Kitchen Floor Thermostat sending AUTO mode!
2023-02-19 21:27:26.705 debug Kitchen Floor Thermostat sending setThermostatMode(auto)
2023-02-19 21:27:22.500 info Kitchen Floor Thermostat heatingSetpoint is: 25.0°C
2023-02-19 21:27:22.498 debug Kitchen Floor Thermostat dp_id=2 dp=16 fncmd=25
2023-02-19 21:27:22.417 info Kitchen Floor Thermostat Thermostat mode reported is: heat (dp=2, fncmd=0)
2023-02-19 21:27:22.415 debug Kitchen Floor Thermostat previous thermosatMode was off...
2023-02-19 21:27:22.412 debug Kitchen Floor Thermostat AVATTO/BEOK current thermostatMode was off
2023-02-19 21:27:22.410 debug Kitchen Floor Thermostat dp_id=4 dp=2 fncmd=0
2023-02-19 21:27:22.333 debug (duplicate) transid=102 dp_id=1 dp=1 fncmd=0 command=02 data = [00, 66, 01, 01, 00, 01, 00]
2023-02-19 21:27:19.025 debug Kitchen Floor Thermostat modeReceiveCheck mode was changed OK to (off). No need for further checks.
2023-02-19 21:27:17.610 debug Kitchen Floor Thermostat last sent mode off is confirmed from the device (dp=1, fncmd=0)
2023-02-19 21:27:17.606 info Kitchen Floor Thermostat switchState reported is: OFF
2023-02-19 21:27:17.584 debug Kitchen Floor Thermostat dp_id=1 dp=1 fncmd=0
2023-02-19 21:27:17.490 debug Kitchen Floor Thermostat device has received Tuya cluster ZCL command 0x00 response 0x00 data = [00, 00]
2023-02-19 21:27:17.443 debug Kitchen Floor Thermostat sendZigbeeCommands(cmd=[he cmd 0x17D6 0x01 0xEF00 0x00 {00660101000100} {}, delay 200])
2023-02-19 21:27:17.440 debug Kitchen Floor Thermostat sendTuyaCommand = [he cmd 0x17D6 0x01 0xEF00 0x00 {00660101000100} {}, delay 200]
2023-02-19 21:27:17.409 debug Kitchen Floor Thermostat sending setThermostatMode(off)
1 Like

Hi @birdslikewires ,

It's a bug probably introduced lately for AVATTO model only, this driver needs serious refactoring, the code became rather messy after trying to support 4 or 5 different thermostat models at the same time .. : (

Please use the latest development branch version 1.2.11. I will try to replicate the problem in the next days, but if you find and correct the bug before me - you are welcome to send me a PR on Github! : )

2 Likes

Amazing, that's sorted the "flicking back to heat" issue! Yes, I see the "auto" mode doesn't appear to play, but given it's the "heat" or "off" control I really need that's no issue. Thanks for getting back to me so quickly!

Haha, I know that feeling! Got some refactoring of some of my own drivers still on the never-ending list. If I do poke around I'll be sure to let you know if I discover something! :slight_smile:

2 Likes

Thank you!
I am glad to hear it worked, will merge the dev. branch into the main and push a HPM update probably tomorrow morning,
Regards!

2 Likes

This one is interesting :
https://www.aliexpress.com/item/1005004598619225.html

1 Like

nah, not for me, I want the temp, set point en time on 1 screen

  • Not compatible with a water system
    Is it an open local device?

I don't know many details, but if it is advertised as 'Works with Apple Home' I assume it has a local API.

1 Like

You can unpack you device out of the metal box:-), It looks the issue was the swap device function, everything is working fine since a few days, fingers crossed, I think I need to apologize (an pay) to the seller on AliExpress, he had resend a new device, with of course the same problem because it was the swap function. :scream:

Correct, the devices has very different functions (and bugs?). I agree it is probably more simple (maintenance) to split the the driver to different devices drivers.

I am trying to do something similar with the Moes thermostat. I am using it only to read the floor sensor but I only see the internal temperature sensor in Hubitat. The thermostat does report I separately on the screen if I press and hold the down temp for more than 5 seconds. I am not sure if this can be exposed through the driver? Thanks.

As far as I remember - no, the thermostat sends automatic reports for only one of the two temperature sensors - either the built-in sensor or the external temperature sensor. Which sensor to use is configured from the thermostat setup menu. Unfortunately, there is no known way to query the Tuya devices that use the Tuya specific cluster 0xEF00 to refresh a measurement value.

Got it. I can't figure out how to set the external sensor as the reporting sensor. Apparently the zigbee version doesn't have the built in setup menu. I can't add it to the Tuya app as I don't have a Tuya gateway.

I did find the thread below from home assistant that I have yet to explore. But if anyone has any pointers on how to set the thermostat to report the external sensor it would be much appreciated.

https://www.reddit.com/r/homeassistant/comments/xpb12x/hi_i_tested_a_cheap_moes_smart_zigbee_thermostat/

I can add the command to configure which sensor to be used - the internal one, the external PT100 sensor, I see in my notes that there is also an option 'both sensors'.

BUT: this setting determines which sensor is used for the temperature control, not just for display purposes!

If the external sensor is installed on the floor near the heating elements, my understanding is that the thermostat will show and will control the relay on/off based on the temperature of the heating element ( 40-50 deg. C?), not the air temperature.

HI @kkossev - in my application this doesn't matter as this thermostat is not controlling the load. I have two floor sensors at different ends of the room and only one connects to the thermostat with the load (a Sinope).

Also, as I am running air conditioning through a separate system I use the thermostat from that to measure the air temperature and then use a Hubitat virtual thermostat to pull everything together.

So for my application I only want to know what the floor temp is with this Moes thermostat.

Hi @kkossev - Let me know if you can do this? Would like to test using the external sensor in my configuration. Thanks.

You should be able to select the sensor from the setup menu code #4

Have you tried it?

I think my particular issue is that this settings menu is not exposed on the Zigbee version of the thermostat. It only appears to be available in the Wi-Fi model. I could be wrong but I have tried every way I can think of to get to this setting and been unsuccessful to date. I was hoping it was exposed in the information you are getting from the thermostat? Thanks.