kkossev / Hubitat-Tuya-Wall-Thermostat

Hubitat-Tuya Wall Thermostat
Apache License 2.0
2 stars 4 forks source link

BSEED Thermostat: 'heat' command after 'off' command ineffective #1

Closed ianparkinson closed 11 months ago

ianparkinson commented 2 years ago

I'm using the BSEED wall thermostat, with fingerprint model TS0601 manufacturer _TZE200_aoclfnxz modelGroupPreference = Auto detect (MOES).

Repro steps:

  1. Start with the thermostat on, but idle. thermostatMode is reported as auto.
  2. From the Hubitat device page, select "Off"
  3. Observe that the device screen switches off. However, thermostatMode remains at auto, it doesn't switch to off.
  4. From the Hubitat device page, select "Heat"
  5. Observe that the device's screen doesn't switch back on.

Using the physical power button on the device works as expected. After pressing the physical power button, thermostatMode becomes off and the heatcommand successfully turns the device back on.

ianparkinson commented 2 years ago

Debug logs when I send the "Off" command:

dev:33 2022-10-09 09:50:49.547 warn(duplicate) transid=182 dp_id=2 dp=16 fncmd=10 command=01 data = [00, B6, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-09 09:50:49.517 info Bathroom Underfloor Heating heatingSetpoint is: 10°C
dev:33 2022-10-09 09:50:49.515 trace dp_id=2 dp=16 fncmd=10
dev:33 2022-10-09 09:50:46.409 info Bathroom Underfloor Heating temperature is: 22.0°C
dev:33 2022-10-09 09:50:46.405 trace processTuyaTemperatureReport dp_id=2 dp=24 :
dev:33 2022-10-09 09:50:46.403 trace dp_id=2 dp=24 fncmd=220
dev:33 2022-10-09 09:50:46.391 info Bathroom Underfloor Heating Thermostat mode (working status) reported is: auto (dp=3, fncmd=1)
dev:33 2022-10-09 09:50:46.375 trace processing command dp=3 fncmd=1
dev:33 2022-10-09 09:50:46.368 trace dp_id=4 dp=3 fncmd=1
dev:33 2022-10-09 09:50:46.293 info Bathroom Underfloor Heating Thermostat mode (switch state) reported is: off (dp=1, fncmd=0)
dev:33 2022-10-09 09:50:46.291 trace dp_id=1 dp=1 fncmd=0
dev:33 2022-10-09 09:50:46.261 debug Bathroom Underfloor Heating device has received Tuya cluster ZCL command 0x00 response 0x00 data = [00, 00]
dev:33 2022-10-09 09:50:46.154 debug Bathroom Underfloor Heating sendZigbeeCommands(cmd=[he cmd 0x0A09 0x01 0xEF00 0x00 {00B30101000100}, delay 2000])
dev:33 2022-10-09 09:50:46.151 traces endTuyaCommand = [he cmd 0x0A09 0x01 0xEF00 0x00 {00B30101000100}, delay 2000]
dev:33 2022-10-09 09:50:46.109 debug Bathroom Underfloor Heating sending setThermostatMode(off)

After an "Off" command, the driver reports Thermostat mode (switch state) reported is: off followed by Thermostat mode (working status) reported is: auto. I can see in the driver code that both these events are used to update the thermostatMode state. I'm not sure what the difference between "working status" and "switch state" is?

If I switch it off with the physical button, the driver doesn't receive the "working status" event, just the "switch state" event:

dev:33 2022-10-09 09:49:30.814 warn (duplicate) transid=148 dp_id=2 dp=16 fncmd=10 command=01 data = [04, 94, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-09 09:49:30.775 info Bathroom Underfloor Heating heatingSetpoint is: 10°C
dev:33 2022-10-09 09:49:30.772 trace dp_id=2 dp=16 fncmd=10
dev:33 2022-10-09 09:49:27.315 info Bathroom Underfloor Heating temperature is: 22.0°C
dev:33 2022-10-09 09:49:27.312 trace processTuyaTemperatureReport dp_id=2 dp=24 :
dev:33 2022-10-09 09:49:27.310 trace dp_id=2 dp=24 fncmd=220
dev:33 2022-10-09 09:49:27.278 info Bathroom Underfloor Heating Thermostat mode (switch state) reported is: off (dp=1, fncmd=0)
dev:33 2022-10-09 09:49:27.275 trace dp_id=1 dp=1 fncmd=0 

For completeness, the same is true for the "heat" command. If I use the physical power button to turn it back on, the driver logs just a switch state event:

dev:33 2022-10-09 09:50:03.213 info Bathroom Underfloor Heating Thermostat mode (switch state) reported is: auto (dp=1, fncmd=1)

But if I use the "heat" command (after using the physical button to turn it off, it logs both switch state and working status events:

dev:33 2022-10-09 09:54:00.571 info Bathroom Underfloor Heating Thermostat mode (working status) reported is: auto (dp=3, fncmd=1)
dev:33 2022-10-09 09:54:00.493 info Bathroom Underfloor Heating Thermostat mode (switch state) reported is: auto (dp=1, fncmd=1)

(I've trimmed these last two logs for clarity.)

kkossev commented 2 years ago

Thank you for the report, @ianparkinson !

I will first try to be sure whether your BSEED thermostat _TZE200_aoclfnxz has any differences in the commands compared to MOES BTH-002 model. Do you see any reference to BHT-002 on the box or in the leaflet that came with the device?

Not related to the issue reported, but can you provide a Debug log from the time when the thermostat mains supply was switched off and then back on? If you have already mounted it on its final place, you may need to use the mains circuit breaker to fully power it off... The reason I am asking this is that usually at this time the device will report all possible parameters supported by the particular model and firmware version. These parameters will be visible in the debug logs that will follow shortly the powering on.

Another question - does the BSEED thermostat allow 0.5 degree difference of the heating temperature when set from the touch panel? EDIT: found the answer here, from te Zigbee interface only integer values are allowed.

Make sure you are using the latest development branch version :

https://raw.githubusercontent.com/kkossev/Hubitat-Tuya-Wall-Thermostat/development/Tuya-Wall-Thermostat.groovy

ianparkinson commented 2 years ago

I don't see any reference to BHT-002 on the packaging or the leaflet. The leaflet wasn't included in the box, but they sent me a .pdf today which I attach in case it's useful. (Note that the list of options is much shorter than that of of the BHT-002, so I don't think they're the same firmware.)

Debug log for a couple of minutes after powering on at the mains:

dev:33 2022-10-10 20:06:02.948 debug (duplicate) transid=107 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 6B, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:02.899 debug (duplicate) transid=106 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 6A, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:02.858 debug (duplicate) transid=105 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 69, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:02.807 debug (duplicate) transid=104 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 68, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:02.745 debug (duplicate) transid=103 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 67, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:02.705 debug (duplicate) transid=102 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 66, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:02.644 debug (duplicate) transid=101 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 65, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:02.600 debug (duplicate) transid=100 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 64, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:02.543 debug (duplicate) transid=99 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 63, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:02.505 debug (duplicate) transid=98 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 62, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:02.443 debug (duplicate) transid=97 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 61, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:02.397 debug (duplicate) transid=96 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 60, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:02.342 debug (duplicate) transid=95 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 5F, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:02.294 debug (duplicate) transid=94 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 5E, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:02.245 debug (duplicate) transid=93 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 5D, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:02.191 debug (duplicate) transid=92 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 5C, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:02.139 debug (duplicate) transid=91 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 5B, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:02.086 debug (duplicate) transid=90 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 5A, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:02.056 debug (duplicate) transid=89 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 59, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:01.954 debug (duplicate) transid=88 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 58, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:01.904 debug (duplicate) transid=87 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 57, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:01.852 debug (duplicate) transid=86 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 56, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:01.799 debug (duplicate) transid=85 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 55, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:01.748 debug (duplicate) transid=84 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 54, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:01.696 debug (duplicate) transid=83 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 53, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:01.645 debug (duplicate) transid=82 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 52, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:01.594 debug (duplicate) transid=81 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 51, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:01.543 debug (duplicate) transid=80 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 50, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:01.492 debug (duplicate) transid=79 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 4F, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:01.441 debug (duplicate) transid=78 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 4E, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:01.393 debug (duplicate) transid=77 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 4D, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:01.340 debug (duplicate) transid=76 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 4C, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:01.290 debug (duplicate) transid=75 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 4B, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:06:01.258 info Bathroom Underfloor Heating thermostatOperatingState is: idle
dev:33 2022-10-10 20:06:01.256 trace dp_id=4 dp=36 fncmd=1
dev:33 2022-10-10 20:06:01.199 info Bathroom Underfloor Heating temperature is: 23.0°C
dev:33 2022-10-10 20:06:01.197 trace processTuyaTemperatureReport dp_id=2 dp=24 :
dev:33 2022-10-10 20:06:01.195 trace dp_id=2 dp=24 fncmd=230
dev:33 2022-10-10 20:06:01.159 info Bathroom Underfloor Heating thermostatOperatingState is: idle
dev:33 2022-10-10 20:06:01.157 trace dp_id=4 dp=36 fncmd=1
dev:33 2022-10-10 20:05:55.575 debug (duplicate) transid=82 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 52, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:55.528 debug (duplicate) transid=81 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 51, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:55.470 debug (duplicate) transid=80 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 50, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:55.422 debug (duplicate) transid=79 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 4F, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:55.369 debug (duplicate) transid=78 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 4E, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:55.319 debug (duplicate) transid=77 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 4D, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:55.268 debug (duplicate) transid=76 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 4C, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:55.219 debug (duplicate) transid=75 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 4B, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:55.178 debug (duplicate) transid=74 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 4A, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:55.122 debug (duplicate) transid=73 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 49, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:55.067 debug (duplicate) transid=72 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 48, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:55.015 debug (duplicate) transid=71 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 47, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:54.963 debug (duplicate) transid=70 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 46, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:54.915 debug (duplicate) transid=69 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 45, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:54.865 debug (duplicate) transid=68 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 44, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:54.818 debug (duplicate) transid=67 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 43, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:54.762 debug (duplicate) transid=66 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 42, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:54.718 debug (duplicate) transid=65 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 41, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:54.662 debug (duplicate) transid=64 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 40, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:54.613 debug (duplicate) transid=63 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 3F, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:54.561 debug (duplicate) transid=62 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 3E, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:54.513 debug (duplicate) transid=61 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 3D, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:54.458 debug (duplicate) transid=60 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 3C, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:54.409 debug (duplicate) transid=59 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 3B, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:54.356 debug (duplicate) transid=58 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 3A, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:54.309 debug (duplicate) transid=57 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 39, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:54.259 debug (duplicate) transid=56 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 38, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:54.205 debug (duplicate) transid=55 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 37, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:54.161 debug (duplicate) transid=54 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 36, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:05:54.135 info Bathroom Underfloor Heating heatingSetpoint is: 10°C
dev:33 2022-10-10 20:05:54.126 trace dp_id=2 dp=16 fncmd=10
dev:33 2022-10-10 20:05:27.561 debug Bathroom Underfloor Heating basic cluster report : descMap = [raw:0A0901000012DFFF42050000000005, dni:0A09, endpoint:01, cluster:0000, size:12, attrId:FFDF, encoding:42, command:0A, value:, clusterInt:0, attrInt:65503]
dev:33 2022-10-10 20:05:00.703 info Bathroom Underfloor Heating temperature is: 23.0°C
dev:33 2022-10-10 20:05:00.698 trace processTuyaTemperatureReport dp_id=2 dp=24 :
dev:33 2022-10-10 20:05:00.693 trace dp_id=2 dp=24 fncmd=230
dev:33 2022-10-10 20:04:20.914 warn not parsed : [raw:catchall: 0104 EF00 01 01 0040 00 0A09 01 00 0000 11 01 000601, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:0A09, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:11, direction:01, data:[00, 06, 01]]
dev:33 2022-10-10 20:04:03.126 debug (duplicate) transid=70 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 46, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:03.084 debug (duplicate) transid=69 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 45, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:03.025 debug (duplicate) transid=68 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 44, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.972 debug (duplicate) transid=67 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 43, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.923 debug (duplicate) transid=66 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 42, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.877 debug (duplicate) transid=65 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 41, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.821 debug (duplicate) transid=64 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 40, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.767 debug (duplicate) transid=63 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 3F, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.719 debug (duplicate) transid=62 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 3E, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.671 debug (duplicate) transid=61 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 3D, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.616 debug (duplicate) transid=60 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 3C, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.570 debug (duplicate) transid=59 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 3B, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.532 debug (duplicate) transid=58 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 3A, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.475 debug (duplicate) transid=57 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 39, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.404 debug (duplicate) transid=56 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 38, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.367 debug (duplicate) transid=55 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 37, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.308 debug (duplicate) transid=54 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 36, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.263 debug (duplicate) transid=53 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 35, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.206 debug (duplicate) transid=52 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 34, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.163 debug (duplicate) transid=51 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 33, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.102 debug (duplicate) transid=50 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 32, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.060 debug (duplicate) transid=49 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 31, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:02.001 debug (duplicate) transid=48 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 30, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:01.955 debug (duplicate) transid=47 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 2F, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:01.898 debug (duplicate) transid=46 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 2E, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:01.855 debug (duplicate) transid=45 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 2D, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:01.798 debug (duplicate) transid=44 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 2C, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:01.751 debug (duplicate) transid=43 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 2B, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:01.695 debug (duplicate) transid=42 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 2A, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:01.665 debug (duplicate) transid=41 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 29, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:01.593 debug (duplicate) transid=40 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 28, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:01.550 debug (duplicate) transid=39 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 27, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:01.491 debug (duplicate) transid=38 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 26, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:01.447 debug (duplicate) transid=37 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 25, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:01.387 debug (duplicate) transid=36 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 24, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:01.341 debug (duplicate) transid=35 dp_id=4 dp=36 fncmd=1 command=01 data = [91, 23, 24, 04, 00, 01, 01]
dev:33 2022-10-10 20:04:01.306 info Bathroom Underfloor Heating thermostatOperatingState is: idle
dev:33 2022-10-10 20:04:01.304 trace dp_id=4 dp=36 fncmd=1
dev:33 2022-10-10 20:04:00.917 debug Bathroom Underfloor Heating device has received Tuya cluster ZCL command 0x24 response 0x00 data = [24, 00]
dev:33 2022-10-10 20:04:00.785 debug Bathroom Underfloor Heating sending time data : [he cmd 0x0A09 0x01 0xEF00 0x24 {000863446CA063447AB0}, delay 2000]
dev:33 2022-10-10 20:04:00.782 debug Bathroom Underfloor Heating timezone offset of current location is 3600000
dev:33 2022-10-10 20:04:00.779 debug Bathroom Underfloor Heating time synchronization request from device, descMap = [raw:catchall: 0104 EF00 01 01 0040 00 0A09 01 00 0000 24 01 0004, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:0A09, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:24, direction:01, data:[00, 04]]
dev:33 2022-10-10 20:03:57.639 debug Bathroom Underfloor Heating basic cluster report : descMap = [raw:0A090100001801002048E2FF201FE4FF2001, dni:0A09, 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:01, encoding:20, attrId:FFE4, consumedBytes:4, attrInt:65508]]]
dev:33 2022-10-10 20:03:57.586 debug (duplicate) transid=62 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 3E, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:57.536 debug (duplicate) transid=61 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 3D, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:57.481 debug (duplicate) transid=60 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 3C, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:57.429 debug (duplicate) transid=59 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 3B, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:57.378 debug (duplicate) transid=58 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 3A, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:57.328 debug (duplicate) transid=57 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 39, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:57.278 debug (duplicate) transid=56 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 38, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:57.226 debug (duplicate) transid=55 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 37, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:57.175 debug (duplicate) transid=54 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 36, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:57.129 debug (duplicate) transid=53 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 35, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:57.072 debug (duplicate) transid=52 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 34, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:57.023 debug (duplicate) transid=51 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 33, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:56.972 debug (duplicate) transid=50 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 32, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:56.923 debug (duplicate) transid=49 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 31, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:56.871 debug (duplicate) transid=48 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 30, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:56.820 debug (duplicate) transid=47 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 2F, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:56.772 debug (duplicate) transid=46 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 2E, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:56.720 debug (duplicate) transid=45 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 2D, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:56.675 debug (duplicate) transid=44 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 2C, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:56.619 debug (duplicate) transid=43 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 2B, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:56.574 debug (duplicate) transid=42 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 2A, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:56.530 debug (duplicate) transid=41 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 29, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:56.484 debug (duplicate) transid=40 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 28, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:56.369 debug (duplicate) transid=39 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 27, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:56.325 debug (duplicate) transid=38 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 26, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:56.214 debug (duplicate) transid=37 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 25, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:56.122 debug (duplicate) transid=36 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 24, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:55.957 debug (duplicate) transid=36 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 24, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:55.948 debug (duplicate) transid=35 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 23, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:55.939 debug (duplicate) transid=35 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 23, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:55.931 debug (duplicate) transid=33 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 21, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:55.919 debug (duplicate) transid=34 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 22, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:55.912 debug (duplicate) transid=35 dp_id=2 dp=16 fncmd=10 command=01 data = [91, 23, 10, 02, 00, 04, 00, 00, 00, 0A]
dev:33 2022-10-10 20:03:55.907 info Bathroom Underfloor Heating heatingSetpoint is: 10°C
dev:33 2022-10-10 20:03:55.892 trace dp_id=2 dp=16 fncmd=10

From the touch panel, the setpoint can be adjusted by 0.5 degrees.

I'm currently using the development branch as requested.

zigbee thermometer manual.pdf

ianparkinson commented 2 years ago

I've just seen your comment in the Hubitat forums saying that "auto" is the "scheduled" mode, and "heat" means "manual". In fact the driver is reporting these the wrong way round for me.

From manual to scheduled (using the physical button):

dev:33 2022-10-10 20:19:30.502 info Bathroom Underfloor Heating thermostatOperatingState is: idle
dev:33 2022-10-10 20:19:30.500 trace dp_id=4 dp=36 fncmd=1
dev:33 2022-10-10 20:19:23.518 info Bathroom Underfloor Heating heatingSetpoint is: 20°C
dev:33 2022-10-10 20:19:23.515 trace dp_id=2 dp=16 fncmd=20
dev:33 2022-10-10 20:19:20.618 info Bathroom Underfloor Heating Thermostat mode reported is: heat (dp=3, fncmd=0)
dev:33 2022-10-10 20:19:20.616 trace mode = heat
dev:33 2022-10-10 20:19:20.613 trace processing command dp=3 fncmd=0
dev:33 2022-10-10 20:19:20.611 trace dp_id=4 dp=3 fncmd=0
dev:33 2022-10-10 20:19:20.578 info Bathroom Underfloor Heating Thermostat mode reported is: auto (dp=2, fncmd=1)
dev:33 2022-10-10 20:19:20.576 trace mode = auto
dev:33 2022-10-10 20:19:20.573 trace processing command dp=2 fncmd=1
dev:33 2022-10-10 20:19:20.571 trace ...continue in mode auto...
dev:33 2022-10-10 20:19:20.569 trace device current mode was auto
dev:33 2022-10-10 20:19:20.567 trace dp_id=4 dp=2 fncmd=1
dev:33 2022-10-10 20:19:20.564 trace dp_id=4 dp=2 fncmd=1

From scheduled to manual (using the physical button):

dev:33 2022-10-10 20:21:33.762 info Bathroom Underfloor Heating thermostatOperatingState is: idle
dev:33 2022-10-10 20:21:33.760 trace dp_id=4 dp=36 fncmd=1
dev:33 2022-10-10 20:21:26.773 info Bathroom Underfloor Heating heatingSetpoint is: 10°C
dev:33 2022-10-10 20:21:26.771 trace dp_id=2 dp=16 fncmd=10
dev:33 2022-10-10 20:21:23.533 info Bathroom Underfloor Heating Thermostat mode reported is: auto (dp=3, fncmd=1)
dev:33 2022-10-10 20:21:23.530 trace mode = auto
dev:33 2022-10-10 20:21:23.528 trace processing command dp=3 fncmd=1
dev:33 2022-10-10 20:21:23.525 trace dp_id=4 dp=3 fncmd=1
dev:33 2022-10-10 20:21:23.489 info Bathroom Underfloor Heating Thermostat mode reported is: heat (dp=2, fncmd=0)
dev:33 2022-10-10 20:21:23.486 trace mode = heat
dev:33 2022-10-10 20:21:23.484 trace processing command dp=2 fncmd=0
dev:33 2022-10-10 20:21:23.481 trace ...continue in mode heat...
dev:33 2022-10-10 20:21:23.479 trace device current mode was heat
dev:33 2022-10-10 20:21:23.477 trace dp_id=4 dp=2 fncmd=0
dev:33 2022-10-10 20:21:23.475 trace dp_id=4 dp=2 fncmd=0

(I've omitted the (duplicate) lines here, I guess they're not useful)

kkossev commented 2 years ago

@ianparkinson can you try the latest dev. branch version "1.2.6" timestamp "2022/10/18 10:23 PM". The only change related to MOES/BSEED is that the reported thermostatMode is reversed ( dp=3 : 0 is now auto, 1 is manual mode). This is exactly the opposite for AVATTO and BEOK...

Let me know if changing the thermostat mode between off, heat and auto works as expected on the device and whether it is reflected correctly in the driver.

ianparkinson commented 1 year ago

Thanks @kkossev. With the dev branch, the driver now correctly reflects the device state when I change modes using the thermostat's buttons. (That is, it says thermostatMode: off when I switch it off, thermostatMode: auto when in scheduled mode, and thermostatMode: heat when in manual mode.)

It still reflects the wrong state after sending the Off, Auto or Heat commands. The device responds as expected to those commands, it's just that thermostatMode is incorrect afterwards, as before.

In case it helps, here is the new log if I start with the device in manual/heat and send the Off command:

dev:33 2022-10-20 18:49:46.379 info Bathroom Underfloor Heating heatingSetpoint is: 10.0°C
dev:33 2022-10-20 18:49:46.377 trace dp_id=2 dp=16 fncmd=10
dev:33 2022-10-20 18:49:43.396 info Bathroom Underfloor Heating temperature is: 23.0°C
dev:33 2022-10-20 18:49:43.394 trace processTuyaTemperatureReport dp_id=2 dp=24 :
dev:33 2022-10-20 18:49:43.391 trace dp_id=2 dp=24 fncmd=230
dev:33 2022-10-20 18:49:43.360 info Bathroom Underfloor Heating Thermostat mode reported is: heat (dp=3, fncmd=1)
dev:33 2022-10-20 18:49:43.356 trace processing command dp=3 fncmd=1
dev:33 2022-10-20 18:49:43.352 trace dp_id=4 dp=3 fncmd=1
dev:33 2022-10-20 18:49:43.339 debug Bathroom Underfloor Heating device has received Tuya cluster ZCL command 0x00 response 0x00 data = [00, 00]
dev:33 2022-10-20 18:49:43.299 info Bathroom Underfloor Heating Thermostat mode (switch state) reported is: off (dp=1, fncmd=0)
dev:33 2022-10-20 18:49:43.295 trace dp_id=1 dp=1 fncmd=0
dev:33 2022-10-20 18:49:43.174 debug Bathroom Underfloor Heating sendZigbeeCommands(cmd=[he cmd 0x0A09 0x01 0xEF00 0x00 {00010101000100}, delay 2000])
dev:33 2022-10-20 18:49:43.171 trace sendTuyaCommand = [he cmd 0x0A09 0x01 0xEF00 0x00 {00010101000100}, delay 2000]
dev:33 2022-10-20 18:49:43.117 debug Bathroom Underfloor Heating sending setThermostatMode(off)

The driver ends up with thermostatMode: heat (presumably due to the Thermostat mode reported is: heat at 18:49:43.360 - before your fix, this was reporting auto), instead of off.

Please let me know if I can provide more logs. (Also, is there a better way to copy logs from Hubitat other than copy and paste from the Logs page?)

kkossev commented 1 year ago

@ianparkinson what I see from the logs is that when an off command is sent to BSEED, 120 milliseconds later the off mode is confirmed by the device (dp=1, fncmd=1), but 60 milliseconds later the thermostat also reports (dp=3, fncmd=1) that is manual (heat) mode.

I have modified the driver for MOES/BEOK models only to ignore the dp=3 command if the current thermostatMode is 'off'. I am not 100% sure this will work, because the timing between the received off command and manual command is too short, and there is a chance that HE state could not be updated in HE database yet... We need to test.

Driver version is now "1.2.7", timeStamp "2022/10/23 10:55 AM".

The logs that you provide (copy and paste form Logs page) is exactly what I need, thank you!

ianparkinson commented 1 year ago

@kkossev thanks for your continued help here!

With your newest fix, the drive correctly reports thermostatMode: off after sending the Off command, and I can turn the device back on with the Heat (or Auto) commands. However, it swaps the heat and auto states after those commands.

Starting in off mode, and sending the Heat command: the device correctly switches into heat mode but we end up with thermostatMode: auto. The log appears to show three update events from the device: one ("switch state") to heat, a second to heat and then a little later to auto,

dev:33 2022-10-23 10:58:04.371 info Bathroom Underfloor Heating heatingSetpoint is: 10.0°C
dev:33 2022-10-23 10:58:04.368 trace dp_id=2 dp=16 fncmd=10
dev:33 2022-10-23 10:58:02.889 info Bathroom Underfloor Heating temperature is: 23.0°C
dev:33 2022-10-23 10:58:02.886 trace processTuyaTemperatureReport dp_id=2 dp=24 :
dev:33 2022-10-23 10:58:02.883 trace dp_id=2 dp=24 fncmd=230
dev:33 2022-10-23 10:58:00.948 info Bathroom Underfloor Heating Thermostat mode reported is: auto (dp=2, fncmd=0)
dev:33 2022-10-23 10:58:00.946 trace processing command dp=2 fncmd=0 (lastThermostatMode=heat)
dev:33 2022-10-23 10:58:00.943 trace...continue in mode heat...
dev:33 2022-10-23 10:58:00.941 trace device current mode was heat
dev:33 2022-10-23 10:58:00.938 trace dp_id=4 dp=2 fncmd=0
dev:33 2022-10-23 10:58:00.936 trace dp_id=4 dp=2 fncmd=0
dev:33 2022-10-23 10:58:00.920 debug Bathroom Underfloor Heating device has received Tuya cluster ZCL command 0x00 response 0x00 data = [00, 00]
dev:33 2022-10-23 10:57:59.046 info Bathroom Underfloor Heating temperature is: 23.0°C
dev:33 2022-10-23 10:57:59.038 trace processTuyaTemperatureReport dp_id=2 dp=24 :
dev:33 2022-10-23 10:57:59.034 trace dp_id=2 dp=24 fncmd=230
dev:33 2022-10-23 10:57:58.978 info Bathroom Underfloor Heating Thermostat mode reported is: heat (dp=3, fncmd=1)
dev:33 2022-10-23 10:57:58.974 trace processing command dp=3 fncmd=1 (lastThermostatMode=heat)
dev:33 2022-10-23 10:57:58.972 trace dp_id=4 dp=3 fncmd=1
dev:33 2022-10-23 10:57:58.944 info Bathroom Underfloor Heating Thermostat mode (switch state) reported is: heat (dp=1, fncmd=1)
dev:33 2022-10-23 10:57:58.939 trace dp_id=1 dp=1 fncmd=1
dev:33 2022-10-23 10:57:58.910 debug Bathroom Underfloor Heating device has received Tuya cluster ZCL command 0x00 response 0x00 data = [00, 00]
dev:33 2022-10-23 10:57:58.866 debug Bathroom Underfloor Heating sendZigbeeCommands(cmd=[he cmd 0x0A09 0x01 0xEF00 0x00 {00030101000101}, delay 2000, he cmd 0x0A09 0x01 0xEF00 0x00 {00040204000100}, delay 2000])
dev:33 2022-10-23 10:57:58.863 trace sendTuyaCommand = [he cmd 0x0A09 0x01 0xEF00 0x00 {00040204000100}, delay 2000]
dev:33 2022-10-23 10:57:58.860 trace sendTuyaCommand = [he cmd 0x0A09 0x01 0xEF00 0x00 {00030101000101}, delay 2000]
dev:33 2022-10-23 10:57:58.857 debug Bathroom Underfloor Heating switching On!
dev:33 2022-10-23 10:57:58.818 debug Bathroom Underfloor Heating sending setThermostatMode(heat)

Starting in off, and sending the Auto command: The device correctly goes into Auto mode, but sends multiple state updates (all of which are logged as heat!). The driver ends up with thermostatMode: heat.

dev:33 2022-10-23 11:04:46.964 info Bathroom Underfloor Heating heatingSetpoint is: 20.0°C
dev:33 2022-10-23 11:04:46.962 trace dp_id=2 dp=16 fncmd=20
dev:33 2022-10-23 11:04:43.646 info Bathroom Underfloor Heating Thermostat mode reported is: heat (dp=2, fncmd=1)
dev:33 2022-10-23 11:04:43.643 trace processing command dp=2 fncmd=1 (lastThermostatMode=heat)
dev:33 2022-10-23 11:04:43.641 trace...continue in mode heat...
dev:33 2022-10-23 11:04:43.638 trace device current mode was heat
dev:33 2022-10-23 11:04:43.636 trace dp_id=4 dp=2 fncmd=1
dev:33 2022-10-23 11:04:43.634 trace dp_id=4 dp=2 fncmd=1
dev:33 2022-10-23 11:04:43.618 debug Bathroom Underfloor Heating device has received Tuya cluster ZCL command 0x00 response 0x00 data = [00, 00]
dev:33 2022-10-23 11:04:41.754 info Bathroom Underfloor Heating temperature is: 23.0°C
dev:33 2022-10-23 11:04:41.744 trace processTuyaTemperatureReport dp_id=2 dp=24 :
dev:33 2022-10-23 11:04:41.741 trace dp_id=2 dp=24 fncmd=230
dev:33 2022-10-23 11:04:41.702 info Bathroom Underfloor Heating Thermostat mode reported is: heat (dp=3, fncmd=1)
dev:33 2022-10-23 11:04:41.699 trace processing command dp=3 fncmd=1 (lastThermostatMode=heat)
dev:33 2022-10-23 11:04:41.696 trace dp_id=4 dp=3 fncmd=1
dev:33 2022-10-23 11:04:41.646 info Bathroom Underfloor Heating Thermostat mode (switch state) reported is: heat (dp=1, fncmd=1)
dev:33 2022-10-23 11:04:41.643 trace dp_id=1 dp=1 fncmd=1
dev:33 2022-10-23 11:04:41.611 debug Bathroom Underfloor Heating device has received Tuya cluster ZCL command 0x00 response 0x00 data = [00, 00]
dev:33 2022-10-23 11:04:41.576 debug Bathroom Underfloor Heating sendZigbeeCommands(cmd=[he cmd 0x0A09 0x01 0xEF00 0x00 {000B0101000101}, delay 2000, he cmd 0x0A09 0x01 0xEF00 0x00 {000C0204000101}, delay 2000])
dev:33 2022-10-23 11:04:41.573 trace sendTuyaCommand = [he cmd 0x0A09 0x01 0xEF00 0x00 {000C0204000101}, delay 2000]
dev:33 2022-10-23 11:04:41.571 trace sendTuyaCommand = [he cmd 0x0A09 0x01 0xEF00 0x00 {000B0101000101}, delay 2000]
dev:33 2022-10-23 11:04:41.568 debug Bathroom Underfloor Heating switching On!
dev:33 2022-10-23 11:04:41.566 trace sending AUTO mode!
dev:33 2022-10-23 11:04:41.535 debug Bathroom Underfloor Heating sending setThermostatMode(auto)

In case it helps, there's a similar issue switching directly between the heat and auto modes (without switching off first) using the Heat and Auto commands. The device changes state but the reported thermostatMode doesn't update:

From heat, sending Auto command:

dev:33 2022-10-23 11:12:14.508 info Bathroom Underfloor Heating heatingSetpoint is: 20.0°C
dev:33 2022-10-23 11:12:14.506 trace dp_id=2 dp=16 fncmd=20
dev:33 2022-10-23 11:12:11.297 info Bathroom Underfloor Heating Thermostat mode reported is: heat (dp=2, fncmd=1)
dev:33 2022-10-23 11:12:11.294 trace processing command dp=2 fncmd=1 (lastThermostatMode=heat)
dev:33 2022-10-23 11:12:11.287 trace...continue in mode heat...
dev:33 2022-10-23 11:12:11.284 trace device current mode was heat
dev:33 2022-10-23 11:12:11.276 trace dp_id=4 dp=2 fncmd=1
dev:33 2022-10-23 11:12:11.269 trace dp_id=4 dp=2 fncmd=1
dev:33 2022-10-23 11:12:11.238 debug Bathroom Underfloor Heating device has received Tuya cluster ZCL command 0x00 response 0x00 data = [00, 00]
dev:33 2022-10-23 11:12:11.194 debug Bathroom Underfloor Heating sendZigbeeCommands(cmd=[he cmd 0x0A09 0x01 0xEF00 0x00 {000F0204000101}, delay 2000])
dev:33 2022-10-23 11:12:11.191 trace sendTuyaCommand = [he cmd 0x0A09 0x01 0xEF00 0x00 {000F0204000101}, delay 2000]
dev:33 2022-10-23 11:12:11.187 trace sending AUTO mode!
dev:33 2022-10-23 11:12:11.132 debug Bathroom Underfloor Heating sending setThermostatMode(auto)

From auto, sending Heat command:

dev:33 2022-10-23 11:14:06.264 info Bathroom Underfloor Heating heatingSetpoint is: 10.0°C
dev:33 2022-10-23 11:14:06.262 trace dp_id=2 dp=16 fncmd=10
dev:33 2022-10-23 11:14:02.873 info Bathroom Underfloor Heating Thermostat mode reported is: auto (dp=2, fncmd=0)
dev:33 2022-10-23 11:14:02.871 trace processing command dp=2 fncmd=0 (lastThermostatMode=auto)
dev:33 2022-10-23 11:14:02.868 trace...continue in mode auto...
dev:33 2022-10-23 11:14:02.865 trace device current mode was auto
dev:33 2022-10-23 11:14:02.863 trace dp_id=4 dp=2 fncmd=0
dev:33 2022-10-23 11:14:02.861 trace dp_id=4 dp=2 fncmd=0
dev:33 2022-10-23 11:14:02.834 debug Bathroom Underfloor Heating device has received Tuya cluster ZCL command 0x00 response 0x00 data = [00, 00]
dev:33 2022-10-23 11:14:02.800 debug Bathroom Underfloor Heating sendZigbeeCommands(cmd=[he cmd 0x0A09 0x01 0xEF00 0x00 {00100204000100}, delay 2000])
dev:33 2022-10-23 11:14:02.797 trace sendTuyaCommand = [he cmd 0x0A09 0x01 0xEF00 0x00 {00100204000100}, delay 2000]
dev:33 2022-10-23 11:14:02.752 debug Bathroom Underfloor Heating sending setThermostatMode(heat)
kkossev commented 1 year ago

@ianparkinson is the thermostatOperatingState correct? Should be 'heating' when the relay is activated and 'idle' when the relay is switched off? Now looking at the code I think it should be inverted ...

I am sorry, but the code became very difficult to be maintained for several different thermostats, that use one and the same 'data points' for different commands for each different thermostat model.. :( I need to rewrite the logic in a more clean way, now I started to get lost in my own code :) This can be done hopefully in the next few weeks, hope we will still have warm weather until then...

Another question that comes in my mind now is whether we really need the 'auto' (scheduled) mode to be supported in a Hubutat driver. The Tuya internal schedulers are almost impossible to be synchronized with HE Thermostat Scheduler, so actually I don't see any reason to allow the 'auto' mode to be set from HE. Just 'heat' and 'off' and the functionality to automatically switch back to 'heat' (manual) mode if the auto/scheduled mode was accidentally activated from the device touch controls.

Meanwhile, can you try this Hubitat driver that I found on GitHub? It is for the same thermostat model as yours: https://github.com/lczapla/Hubitat/blob/52837cb11f40e4f764d60b6acbf4513d722aa68a/Moes_BHT-002-GCLZBW_Zigbee_Thermostat.groovy

ianparkinson commented 1 year ago

Thanks for spotting the driver by Iczapla - that driver seems to be working pretty well. At least, it cycles correctly between the states when I use both the physical buttons and the commands, and it seems to handle the thermostatSetpoint. (I guess I'll use this one for now - although it looks like it's missing useful features like time synchronization, and occasionally seems to miss an event from the device.)

The thermostatOperatingState for your driver was reporting the correct state as far as I can tell.

kkossev commented 1 year ago

I will keep this issue open and hopefully can have the chance to come back to it and solve it soon.

kkossev commented 1 year ago

@ianparkinson have you noticed any missed commands with LCzapla driver that you are using at the moment? Also, when the thermostat was switched off and you send a Heat or Auto command, does the thermostat LCD come back on ?

ianparkinson commented 1 year ago

If I send Heat followed quickly by Off, then the second command can be skipped. In normal running, I haven't noticed any missed commands.

Yes, the LCD comes on if the device is off, and I send either Heat or Auto.

kkossev commented 11 months ago

There have been a lot of changes and improvements in the code since this issue was registered, hopefully, all is working now. I am closing it, please reopen if needed.