logo elektroda
logo elektroda
X
logo elektroda

Tuya Wi-Fi Thermostat DTC2201 - problem pairing with cloud via WBR1

GAAD 2133 10
Best answers LABEL_AI_GENERATED

Can I replace or flash the WBR1 Wi‑Fi module in a Tuya DTC2201 thermostat and make it work in Home Assistant without the cloud?

Yes — the WBR1 can be replaced or flashed, and in OpenBK the WBR1/WBR2/WBR3/WBRU family is already supported; the module is basically just Wi‑Fi plus UART between the MCU and the network side, so a swap to another Tuya Wi‑Fi module is possible [#21371186] [#21375328] On this thermostat the useful datapoints are 1 = power, 2 = setpoint, 3 = current temperature, 101 = hysteresis, 102 = cooling delay, 103 = temperature correction, and 14 = heating relay status; channel 2 was confirmed to work in OBK, with 250 meaning 25.0 °C [#21372234] A working OBK baseline was `startDriver NTP`, `startDriver TuyaMCU`, `startDriver tmSensor`, `setChannelType 3 temperature_div10`, and `linkTuyaMCUOutputToChannel 3 val 3` [#21371186] For Home Assistant, the easiest route shown was ESPHome’s `tuya` climate platform with datapoints 1/2/3, `temperature_multiplier: 0.1`, plus extra `number` entities for 101–103; if you need custom behavior, you can also define your own HA YAML or script around the MQTT topics [#21374650] [#21886681] [#21375328] If pairing keeps failing on the original module, one user found the WBR1 itself was faulty after being unintentionally powered from 5 V, so replacing the module may be the real fix [#21369023] [#21371186]
AI summary based on the discussion. May contain errors.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • WBR1 module may accept OBK flashing

    #1 21366515
    GAAD
    Level 17  
    Posts: 289
    Help: 3
    Rate: 19
    Hello.
    Is it possible to do anything with the WBR1 module? Is it possible to upload an OBK? I have such thermostats for controlling underfloor heating. They are convenient because they also work without the cloud. This piece theoretically works, it has lost communication with the cloud and I cannot add it again. It turns on the pairing, the Tuya app detects it, but before it manages to add it to the cloud the pairing mode shuts down and the operation fails.

    There are integrated circuits under the display, probably one of them is an MCU. After removing the display board and MCU, the WBR1 pins are free.

    Electronic thermostat with a display showing 25 degrees Celsius, an antenna, and buttons. Electronic module with a display and buttons. Electronic module with exposed circuit board containing integrated circuits and connectors. Close-up of a circuit board with a WBR1 module, antenna, and wired connector. WBR1 module on a circuit board with visible electronic components and pins. Close-up of a circuit board with a WBR1 module, antenna, and wired connector. WBR1 module on a circuit board with visible electronic components and pins.
  • ADVERTISEMENT
  • WBR1 likely damaged by 5 V backfeed

    #2 21369023
    GAAD
    Level 17  
    Posts: 289
    Help: 3
    Rate: 19
    I took the display out to see what was underneath.
    HC32F005C6PA - I think that would be the MCU, and 74HC595D - that's the driver for the display.

    Printed circuit board with electronic components on a pink background. .

    The cloud connection issue is also now cleared up, my WBR1 is faulty as it gets a 5V supply. I converted the DS18B20 power supply to 5 volts because the controller is in the boiler room, and the DS18B20 sensor itself on a long cable and at 3.3 volts was reporting errors - I didn't notice that by hooking up the DS to 5 volts I was also powering the WBR. It worked like this for over a year. The question is whether it is possible to replace the WBR1 with something?
  • ADVERTISEMENT
  • WBR1 appears to be only a UART bridge

    #3 21371186
    GAAD
    Level 17  
    Posts: 289
    Help: 3
    Rate: 19
    Instead of the WBR1, I connected a Wi-Fi module removed from another Tuya device.
    OBK uploaded.
    It seems to me that the WBR1 itself is only used here for communication, it only has power, Rx, Tx for communication with MCU and EN connected.
    OBK configuration:
    
    startDriver NTP
    ntp_setServer 192.168.1.253
    waitFor NTPState 1
    ntp_timeZoneOfs 1
    startDriver TuyaMCU
    startDriver tmSensor
    setChannelType 3 temperature_div10
    linkTuyaMCUOutputToChannel 3 val 3
    
    .

    OBK log for Tuya MCU:
    
    Info:TuyaMCU:Received: 55 AA 03 04 00 00 06 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 4 (WiFiReset) len 7
    Info:TuyaMCU:ProcessIncoming: 0x04 replying
    Info:TuyaMCU:Received: 55 AA 03 04 00 00 06 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 4 (WiFiReset) len 7
    Info:TuyaMCU:ProcessIncoming: 0x04 replying
    Info:TuyaMCU:Received: 55 AA 03 04 00 00 06 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 4 (WiFiReset) len 7
    Info:TuyaMCU:ProcessIncoming: 0x04 replying
    Info:TuyaMCU:Received: 55 AA 03 04 00 00 06 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 4 (WiFiReset) len 7
    Info:TuyaMCU:ProcessIncoming: 0x04 replying
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 F3 0D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 3 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 243
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 F7 11 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 3 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 247
    Info:TuyaMCU:Received: 55 AA 03 04 00 00 06 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 4 (WiFiReset) len 7
    Info:TuyaMCU:ProcessIncoming: 0x04 replying
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 F5 0F 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 3 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 245
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 F3 0D 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 3 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 243
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 F1 0B 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 3 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 241
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 EE 08 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 3 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 238
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 EC 06 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 3 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 236
    Info:TuyaMCU:Received: 55 AA 03 04 00 00 06 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 4 (WiFiReset) len 7
    Info:TuyaMCU:ProcessIncoming: 0x04 replying
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 EB 05 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 3 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 235
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 E9 03 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 3 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 233
    Info:TuyaMCU:Received: 55 AA 03 04 00 00 06 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 4 (WiFiReset) len 7
    Info:TuyaMCU:ProcessIncoming: 0x04 replying
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 E7 01 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 3 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 231
    
    .

    That is, the temperature measurement works, it even displays itself correctly in the HA.
    The thermostat itself "in manual mode" too.
    Is there any chance to refine the commands to make it a fully functional thermostat in HA?

    Thermostat test configuration page with temperature and connection information. .
    Home Assistant user interface displaying thermostat BK7231N information
  • ADVERTISEMENT
  • OBK mapping for setpoint, hysteresis, and delay channels

    #4 21372234
    GAAD
    Level 17  
    Posts: 289
    Help: 3
    Rate: 19
    Unfortunately, I won't embrace it myself, is there a chance to make it into a thermostat in HA?

    MCU works. The thermostat itself has 4 parameters to configure from the keypad:
    F1; temperature setpoint range -40 to 99.9 degrees precision 0.1 degrees
    F2: Hysteresis range 0.3 to 10 degrees precision 0.1 degree
    F3: Cooling delay range 1 to 10 minutes precision 1 minute
    F4: Temperature correction range -10 to +10 degrees precision 0,1 degree

    The MCU logs show that:
    channel 2 is the set temp value: parameter F1
    channel 3 current temperature
    channel 101 hysteresis parameter F2
    channel 102 cooling delay parameter F3
    channel 103 temperature correction parameter F4
    channel 14 heating relay status byte 1 - off byte 0 - on

    I have not been able to log the tripping of the cooling relay.

    Only channel two with the set temperature I managed to configure in OBK so that the value is visible and I can set it, only that without the decimal point, i.e. 25 degrees is the value 250.


    Excerpts from the logs:
    
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 184
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 B7 D0 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 183
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 B6 CF 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 182
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 B5 CE 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 181
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 B4 CD 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 180
    Info:TuyaMCU:Received: 55 AA 03 04 00 00 06 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 4 (WiFiReset) len 7
    Info:TuyaMCU:ProcessIncoming: 0x04 replying
    Info:TuyaMCU:ParseState: id 101 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 13
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 65 02 00 04 00 00 00 0C 88 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 101 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 12
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 65 02 00 04 00 00 00 03 7F 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 101 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 3
    Info:TuyaMCU:Received: 55 AA 03 04 00 00 06 
    Info:TuyaMCU:ParseState: id 102 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 5
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 66 02 00 04 00 00 00 06 83 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 102 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 6
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 66 02 00 04 00 00 00 07 84 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 102 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 7
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 66 02 00 04 00 00 00 0A 87 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 102 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 10
    Info:TuyaMCU:Received: 55 AA 03 04 00 00 06 
    Info:TuyaMCU:ParseState: id 103 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 -8
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 D2 EC 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 3 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 210
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 67 02 00 04 FF FF FF F7 72 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 103 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 -9
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 D0 EA 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 3 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 208
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 67 02 00 04 FF FF FF F6 71 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 103 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 -10
    Info:TuyaMCU:Received: 55 AA 03 04 00 00 06 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 4 (WiFiReset) len 7
    Info:TuyaMCU:ProcessIncoming: 0x04 replying
    Info:TuyaMCU:ParseState: id 14 type 4-enum len 1
    Info:TuyaMCU:ParseState: byte 1
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 F3 0D 
    Info:TuyaMCU:ParseState: id 14 type 4-enum len 1
    Info:TuyaMCU:ParseState: byte 1
    Info:TuyaMCU:Received: 55 AA 03 04 00 00 06 
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 250
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 FA 13 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 2 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 250
    Info:TuyaMCU:Received: 55 AA 03 07 00 05 0E 04 00 01 00 21 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 12
    Info:TuyaMCU:ParseState: id 14 type 4-enum len 1
    Info:TuyaMCU:ParseState: byte 0
    
    .

    MCU also sows connection errors all the time:

    
    Info:TuyaMCU:Received: 55 AA 03 04 00 00 06 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 4 (WiFiReset) len 7
    Info:TuyaMCU:ProcessIncoming: 0x04 replying
    Info:GEN:dhcp=0 ip=192.168.1.80 gate=192.168.1.1 mask=255.255.255.0 mac=1c:90:ff:cd:73:cd
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-70,ssid=SALON,bssid=10:fe:ed:76:04:0c,channel=6,cipher_type:Error
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 DB F5 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 3 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 219
    Info:GEN:CHANNEL_Set channel 3 has changed to 219 (flags 0)
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 03 02 00 04 00 00 00 DA F4 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 3 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 218
    Info:GEN:CHANNEL_Set channel 3 has changed to 218 (flags 0)
    Info:TuyaMCU:Received: 55 AA 03 04 00 00 06 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 4 (WiFiReset) len 7
    Info:TuyaMCU:ProcessIncoming: 0x04 replying
    Info:GEN:dhcp=0 ip=192.168.1.80 gate=192.168.1.1 mask=255.255.255.0 mac=1c:90:ff:cd:73:cd
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-69,ssid=SALON,bssid=10:fe:ed:76:04:0c,channel=6,cipher_type:Error
    Info:TuyaMCU:Received: 55 AA 03 04 00 00 06 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 4 (WiFiReset) len 7
    Info:TuyaMCU:ProcessIncoming: 0x04 replying
    Info:TuyaMCU:Received: 55 AA 03 04 00 00 06 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 4 (WiFiReset) len 7
    Info:TuyaMCU:ProcessIncoming: 0x04 replying
    Info:GEN:dhcp=0 ip=192.168.1.80 gate=192.168.1.1 mask=255.255.255.0 mac=1c:90:ff:cd:73:cd
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-69,ssid=SALON,bssid=10:fe:ed:76:04:0c,channel=6,cipher_type:Error
    Info:TuyaMCU:Received: 55 AA 03 04 00 00 06 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 4 (WiFiReset) len 7
    Info:TuyaMCU:ProcessIncoming: 0x04 replying
    
    .

    Could the cause be an unconnected EN?

    autoexec:
    
    startDriver NTP
    ntp_setServer 192.168.1.253
    waitFor NTPState 1
    ntp_timeZoneOfs 1
    startDriver TuyaMCU
    startDriver tmSensor
    setChannelType 3 temperature_div10
    linkTuyaMCUOutputToChannel 3 val 3
    SetChannel 2 keywords
    SetChannelLabel 2 "Temperatura zadana"
    linkTuyaMCUOutputToChannel 2 val 2
    GetChannel 2
    SetChannel 4 keywords
    SetChannelLabel 4 "Histereza"
    linkTuyaMCUOutputToChannel 4 val 101
    SetChannel 5 keywords
    SetChannelLabel 5 "Cooling delay"
    linkTuyaMCUOutputToChannel 5 val 102
    SetChannel 6 keywords
    SetChannelLabel 6 "Korekta temperatury"
    linkTuyaMCUOutputToChannel 6 val 103
    
    .

    Thermostat configuration screen with channels and values. .

    Is it possible to configure channels above 100 to read/set these parameters via Wi-Fi? It is not necessary, but it may be possible.
    How to configure channel 14 to read the operating status of the heating relay?

    How to configure the OBK to report to the HA as a thermostat? Perhaps it would be possible to control it via BetterThermostat?
  • ADVERTISEMENT
  • Need CEN pin to read WBR1 memory

    #5 21373539
    GAAD
    Level 17  
    Posts: 289
    Help: 3
    Rate: 19
    I have connected the WBR1 to ltchiptool the communication is there and therefore it is not faulty.
    However I can't read the memory because I don't have or don't know how to where the CEN is
    
    == Rtl8710c IoT Platform ==
    Chip VID: 5, Ver: 3
    ROM Version: v3.0
    
    == Boot Loader ==
    Dec  5 2019:14:02:18
    
    fwx SELE[fffffffc]
    fw SELE Bitidx 2, fw1 valid 1, sn 0, fw2 valid 1, sn 1
    fw1 USE, return sn 0
    
    == Rtl8710c IoT Platform ==
    Chip VID: 5, Ver: 3
    ROM Version: v3.0
    
    == Boot Loader ==
    Dec  5 2019:14:02:18
    
    fwx SELE[fffffffc]
    fw SELE Bitidx 2, fw1 valid 1, sn 0, fw2 valid 1, sn 1
    fw1 USE, return sn 0
    
    Boot Loader <==
    
    == RAM Start ==
    Build @ 14:39:51, Mar 14 2022
    interface 0 is initialized
    interface 1 is initialized
    [WIFI DEBUG]tuya[01-01 18:1_os_adapt_fl2:15 TUYA Iash_write er][lr:0x9b04r
    [WIFI DEbd8b] mqc aBUG]get counpp init ...try code:0
    [01-01 18:
    
    Initia12:15 TUYA Ilizing WIFI][lr:0x9b057 ...4cb] thread_create name:sys_timer,stackDepth:4096,totalstackDepth:4096,priority:5
    [01-01 18:12:15 TUYA I][lr:0x9b0574cb] thread_create name:cmmod,stackDepth:4096,totalstackDepth:8192,priority:4
    [01-01 18:12:15 TUYA D][lr:0x9b04bcad] mq_pro:5 cnt:1
    [01-01 18:12:15 TUYA D][lr:0x9b04bcad] mq_pro:31 cnt:2
    [01-01 18:12:15 TUYA D][lr:0x9b0778eb] svc online log init success
    [01-01 18:12:15 TUYA D][lr:0x9b057353] Thread:sys_timer Exec Start. Set to Running Stat
    [01-01 18:12:15 TUYA D][lr:0x9b07047b] read m:2 f:0 l:1
    [01-01 18:12:15 TUYA I][lr:0x9b0574cb] thread_create name:wk_th-0,stackDepth:5120,totalstackDepth:13312,priority:3
    [01-01 18:12:15 TUYA E][lr:0x9b05b30f] wd_protected_read fails gw_bi -23
    [01-01 18:12:15 TUYA D][lr:0x9b05b583] gw base read finish:-23
    [01-01 18:12:15 TUYA D][lr:0x9b072d1f] ty bt cmmod regist ok:1
    dev id key: 16
    d4 1d 8c d9 8f 00 b2 04 e9 80 09 98 ec f8 42 7e 
    [BT NOTICE]tuya_os_adapt_param_init mode:1
    [BT DEBUG]tuya_os_adapt_bt_stack_init
    [BT DEBUG]current_bt_mode:255, new bt_param->mode:1
    [BT DEBUG]###init ble slave###
    [01-01 18:12:15 TUYA D][lr:0x9b057353] Thread:cmmod Exec Start. Set to Running Stat
    [01-01 18:12:15 TUYA D][lr:0x9b057353] Thread:wk_th-0 Exec Start. Set to Running Stat
    
    WIFI initialized
    [WIFI DEBUG]get country code:0
    
    init_thread(65), Available heap 0x1BT BUILD Da71e8te: Mar 14 2022, 14:39:42 
    BT RESET LOG...
    read wifi mac:50:8b:b9:cd:98:08[BT NOTICE]BLE MAC: 0x50-0x8b-0xb9-0xcd-0x98-0x08
    BT Reset ok
    bt_iqk_efuse_valid: has data
    
    hci_tp_phy_efuse[0]=0,
    bt_dump_iqk:    DUMP,
    the IQK_xx  data is 0x108,
    the IQK_yy  data is 0x3f6,
    the QDAC   data is 0x1e,
    the IDAC   data is 0x1c,
    the QDAC2  data is 0x20,
    the IDAC2  data is 0x1d,
    hci_read_rom_check: rom_version 0x0003, bt_hci_chip_id 0x0004
    
    BT ADDRESS:
    50:8b:b9:cd:98:08:
    
     WRITE  physical FLATK=tx_flatk=efff 
    
    We use fw_buf=1002e008, fw_len = 1fb8, config_buf = 10012bd8, config_len= 32
    Set baudrate to 921600
    
    hci_tp_config:BT INIT success 7
    Start upperStack
    
    [BLE peripheral] GAP stack ready
    [BT DEBUG]###init ble slave succ###
    [01-01 18:12:15 TUYA N][lr:0x9b04868f] ble sdk re_inited
    [01-01 18:12:15 TUYA D][lr:0x9b073711] bt active init
    [01-01 18:12:15 TUYA N][lr:0x9b072e3b] ty bt sdk init success finish
    [01-01 18:12:15 TUYA D][lr:0x9b01a2c3] < TUYA IOT SDK V:2.3.3 BS:40.00_PT:2.2_LAN:3.4_CAD:1.0.5_CD:1.0.0 >
    < BUILD AT:2022_03_02_16_20_08 BY ci_manage FOR ty_iot_sdk AT rtl8720cf_ameba >
    IOT DEFS < WIFI_GW:1 DEBUG:1 KV_FILE:0 SHUTDOWN_MODE:0 LITTLE_END:1 TLS_MODE:2 ENABLE_CLOUD_OPERATION:0 OPERATING_SYSTEM:2 ENABLE_SYS_RPC:0 RELIABLE_TRANSFER:0 ENABLE_LAN_ENCRYPTION:1 ENABLE_LAN_LINKAGE:0 ENABLE_LAN_DEV:0 >
    
    [01-01 18:12:15 TUYA D][lr:0x9b01a2cd] rtl8720cf_common_user_config_ty:2.6.3
    [01-01 18:12:15 TUYA N][lr:0x9b06e5fb] key_addr: 0x1d8000   block_sz 4096
    [01-01 18:12:15 TUYA N][lr:0x9b06e683] get key:
    0x63 0x68 0x68 0x2c 0x90 0x5 0x37 0xde 0x64 0x84 0xe3 0xd 0xec 0x49 0x2d 0x1d 
    [01-01 18:12:15 TUYA N][lr:0x9b043a07] have actived over 15 min, not enter mf_init
    [01-01 18:12:15 TUYA N][lr:0x9b0192d3] mf_init succ
    
    .

    maybe it would help to rework this thermostat?
  • ESPHome datapoints mapped for heating-only control

    #6 21374650
    GAAD
    Level 17  
    Posts: 289
    Help: 3
    Rate: 19
    It works and I think it's the way I wanted it to but on ESPHome.
    I haven't configured cooling because I control the floor valves purely as heating.

    Home Assistant dashboard displaying temperature and heating data for various rooms. .

    This is what the log from ESP looks like when reading the MCU:
    
    [02:20:26][C][tuya:041]: Tuya:
    [02:20:26][C][tuya:056]:   Datapoint 1: switch (value: ON)
    [02:20:26][C][tuya:058]:   Datapoint 2: int value (value: 205)
    [02:20:26][C][tuya:058]:   Datapoint 3: int value (value: 229)
    [02:20:26][C][tuya:062]:   Datapoint 14: enum (value: 1)
    [02:20:26][C][tuya:064]:   Datapoint 13: bitmask (value: 0)
    [02:20:26][C][tuya:058]:   Datapoint 101: int value (value: 3)
    [02:20:26][C][tuya:058]:   Datapoint 102: int value (value: 600)
    [02:20:26][C][tuya:058]:   Datapoint 103: int value (value: 0)
    [02:20:27][C][tuya:074]:   Product: '{"p":"izsvppl83kwq3vu1","v":"1.0.0","m":2}'
    
    .
  • Helpful post

    WBR1 support and MQTT topic handling

    #7 21375328
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14755
    Help: 659
    Rate: 12881
    I have not seen this topic, WBR1 has been supported for a short time:
    WBR2, WBR3, WBRU, W701-VA2-CG pinout, data sheet, flashing for Home Assistant .

    You read the channels normally with the get/set themes:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/mqttTopics.md
    if you want to have non-standard device handling in HA, you can manually write an entry in configuration.yaml and then script the whole thing as you wish.
    Helpful post? Buy me a coffee.
  • #8 21885999
    dinodf
    Level 2  
    Posts: 2
    >>21374650
    Dear GAAD,
    hi, if I understand correctly, you managed to flash the thermostat with ESPHome. Could you please explain how you did it and tell me how to set the parameters in the YAML file?
    Don't need to tell me step-by-step how to do it; just tell me the basics of the configuration.
    Thank you very much.
    Dino
  • ESP02 replacement and OpenBeken flashing setup

    #9 21886681
    GAAD
    Level 17  
    Posts: 289
    Help: 3
    Rate: 19
    I had to replace the WBR module with ESP02.
    But I have successfully replaced the original software in many devices.
    I mostly use the programmer:

    divadiow wrote:
    Update 2026
    As of 2026, this read/write platform is also supported by our flash tool:
    https://github.com/openshwprojects/BK7231GUIFlashTool
    The connection (soldering, wires) is the same, but you can use our tool instead of the older one.
    Check it out and use it instead of the older tool, let us know how it works!


    I then compile the OTA file in ESP rename it to OBK so there is no name conflict and upload it already as an OpenBeken update.

    My yaml:
    
    esphome:
      name: "termostat-wiatrolap"
      friendly_name: "Termostat wiatrołap"
    
    esp8266:
      board: esp01_1m
    
    logger:
      level: verbose
      logs:
        component: error
    api:
      encryption:
        key: !secret api_key
      reboot_timeout: 1h
    
    ota:
      - platform: esphome
        id: my_ota
        password: !secret ota_password
    
    wifi:
      networks:
        - ssid: KOTLOWNIA
          password: !secret wifi_password_1
        - ssid: SALON
          password: !secret wifi_password_2
        - ssid: PODDASZE
          password: !secret wifi_password_3
        - ssid: PIWnica
          password: !secret wifi_password_4
      manual_ip:
        static_ip: 192.168.1.80
        gateway: 192.168.1.1
        subnet: 255.255.255.0
        dns1: 192.168.1.1
        dns2: 91.234.8.8
    #  power_save_mode: NONE
    #  output_power: 17dB
    # Enable fallback hotspot (captive portal) in case wifi connection fails
      ap:
        ssid: !secret wifi_ap_ssid
        password: !secret wifi_ap_password
      reboot_timeout: 1h
    
    captive_portal:
    web_server:
      port: 80
      version: 3
      auth:
        username: !secret web_username
        password: !secret web_password
    time:
      - id: time_provider
        platform: homeassistant
        on_time_sync:
          - logger.log: "Synchronized system clock"
    uart:
      rx_pin: GPIO3
      tx_pin: GPIO1
      baud_rate: 9600
      id: mcu_uart
    tuya:
      time_id: time_provider
    climate:
      - platform: tuya
        name: "Termostat"
        icon: mdi:heating-coil
        switch_datapoint: 1
        target_temperature_datapoint: 2
        current_temperature_datapoint: 3
        temperature_multiplier: 0.1
        visual:
         min_temperature: 10 °C      
         max_temperature: 30 °C      
         temperature_step: 0.1 °C
    switch:
      - platform: tuya
        name: "Power"
        icon: mdi:power
        switch_datapoint: 1           
        internal: True                
    sensor:
      - platform: tuya
        name: "Temperatura"
        device_class: "temperature"
        sensor_datapoint: 3
        unit_of_measurement: "°C"
        accuracy_decimals: 1
        filters:
          - multiply: 0.1
    text_sensor:
      - platform: wifi_info
        ip_address:
          name: ESP IP Address
        ssid:
          name: ESP Connected SSID
        mac_address:
          name: ESP Mac Wifi Address
        scan_results:
          name: ESP Latest Scan Results      
    number:
    - platform: "tuya"
      name: "Histereza"
      entity_category: config
      mode: box
      number_datapoint: 101
      min_value: 0.3
      max_value: 10.0
      step: 0.1
      multiply: 10
    - platform: "tuya"
      name: "Cool del"
      entity_category: config
      mode: box
      number_datapoint: 102
      min_value: 1
      max_value: 10
      step: 1
    - platform: "tuya"
      name: "Korekta T"
      entity_category: config
      mode: box
      number_datapoint: 103
      min_value: -10
      max_value: 10
      step: 0.1
      multiply: 10
    


    You just need to change the UART pins
  • #10 21886825
    dinodf
    Level 2  
    Posts: 2
    >>21886681
    Oh... Thanks, now I understand everything better, before I had missed that you had replaced the microcontroller
  • #11 21887332
    GAAD
    Level 17  
    Posts: 289
    Help: 3
    Rate: 19
    Yes but it should also work on WBR. ESPHome uses Libretina:

    
    # Example configuration entry for RTL87xx
    rtl87xx:
      board: generic-rtl8710bn-2mb-788k
    

Topic summary

LABEL_AI_GENERATED
Discussion about a Tuya Wi‑Fi underfloor-heating thermostat DTC2201 using a WBR1 module and whether it can be flashed with OBK/OpenBeken. The cloud pairing initially failed because the WBR1 was being unintentionally powered at 5 V through the DS18B20 supply, but the module itself was still functional. The WBR1 was then replaced with another Tuya Wi‑Fi module and successfully flashed with OBK. The thermostat uses an HC32F005C6PA MCU and a 74HC595D display driver; the WBR1 appears to handle only power, RX/TX communication, and EN. TuyaMCU datapoints were identified for setpoint, current temperature, hysteresis, cooling delay, temperature correction, and relay status, and the device was later integrated successfully in ESPHome. A later note mentions that the original WBR module can also be supported via RTL87xx/LibreTiny in ESPHome.
AI summary based on the discussion. May contain errors.
ADVERTISEMENT