logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

WT200-16A-W thermostat - test with Tuya application, interior and reverse engineering of UART protoc

p.kaczmarek2 138 0

TL;DR

  • WT200-16A-W Tuya-compatible thermostat teardown, app test, and UART reverse engineering of the TuyaMCU link.
  • Inside, it splits into a front LCD/WiFi board and a power board, with a separate WBR3 module and RTCC-backed clock.
  • It sells for around £150 and supports 5+2, 6+1, or 7-day programs with six time slots per day.
  • Captured packets mapped dpIDs for switch, target temperature, mode, sound, backlight, frost protection, sensor selection, and raw weekly periods; Home Assistant firmware is still a future step.
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • Thermostat with black display showing 20.9°C and 22.0°C plus a Wi‑Fi icon
    I would like to invite you to a presentation and a detailed analysis of the interior of the WT200-16A-W thermostat compatible with the Tuya app. The WT200-16A-W offers manual control via WiFi and schedule operation in 5+2, 6+1 or 7-day modes, with 6 time modes per day. The WT200-16A-W is available to buy for around £150 and works with an external probe. Let's take a look at what we get in the kit.
    White AVATTO product box with a thermostat LCD display graphic on a wooden surface “WT200 Thermostat User Guide” booklet inside an open cardboard box White mounting part in a cardboard box; plastic bag with two blue screws and a piece of metal mesh Open box with a coiled white cable and a device in plastic marked “Certificate of Quality” Open box with a coiled white cable and a device in plastic marked “Certificate of Quality”
    In this case, the front of the product is fully removable. You can get it in a variety of colours - I've seen copies in black and white. An external sensor is also included, although its use is optional.
    WT200-16A-W-wifi thermostat base with terminals, coiled wired sensor, and manual on a wooden table
    Included in the kit is an English-language manual for pairing and operating the thermostat. Below are clear pictures of it - I won't repeat the information contained therein too closely.
    Unfolded English “WT200 Thermostat User Guide” photographed from above on a wooden surface Photo of a folded “THERMOSTAT USER GUIDE” sheet with a QR code and app setup phone screenshots


    Test with Tuya app
    For many IoT products I often change the firmware straight away and don't even pair it with Tuya, but here I was curious to see what it all looks like. Additionally, I need this to analyse the communication protocol, which I will include in the following paragraphs.
    Pairing was very straightforward - the phone sees these devices by Bluetooth alone:
    Tuya app screen showing device list and an “Add device” panel for “Temp-3” with reading 20.5 “Add Device” screen showing device “Temp-3” added successfully, displaying 20.5°C
    Once paired, we are greeted by the manual mode, or so-called 'manual mode'. It simply allows us to manually set the target temperature we want the thermostat to aim for. The thermostat also gives us a live view of the current temperature from the sensor.
    Tuya app screen in manual mode showing OFF and current temperature 21.7°C Tuya thermostat app screen: Manual mode, setpoint 22.0°C and current temperature 21.9°C
    Of course, there are many more options. The mode button, or 'mode', is used for this. There, we have the aforementioned manual mode, program mode, temporary program mode and leaving the house (in which case heating is switched off or heavily reduced - antifreeze).
    Tuya app screenshot: 22.0°C temperature screen with mode menu (Manual, Program, Temporary, Leave Home)
    The weekly format (6+1, 5+2, etc.) is selectable in the options - this is where you create the programmes.
    App settings screen with thermostat options like 5+2 schedule, calibration, temperature limits, and external sensor selection App screen for week programming settings with “working day setting” and “rest day setting” options.
    The screenshot below shows the aforementioned heating periods. We select an hour and set the temperature that will be implemented at that hour.
    App screen “working day setting” showing six periods with times and temperatures App screen for schedule settings: 06 hours, 00 minutes, and “Set Temperature” 20°C
    Available weekly modes are 5+2, 6+1, 7 or none:
    App settings screen showing “Working day setting” with 5+2 selected
    The options also include calibration and probe selection (external, internal):
    “Settings” screen in an app with thermostat options and sensor selection: internal, external, or both

    Interior product
    We will now take a look inside. The product consists of two parts - the front panel with LCD and WiFi module, and the power supply.
    Thermostat PCB in a metal mounting frame with WBR3 WiFi module and sensor cable on a wooden surface
    The ATC9307B and ATC9200DF can be seen on the power supply board. Just by the positions of the components I am betting that the first component is a flyback converter controller with an integrated keying transistor and the second is either an LDO or a synchronous rectifier. Perhaps someone can find more information?
    Close-up of a power PCB showing ATC9307B IC, wide soldered traces, and SMD components
    On the other side of the board you can see the pulse transformer from the inverter and the relay - BRT3-SS-105DM:
    Close-up of a circuit board with a relay and green screw terminal block on a wooden surface
    On the second board we have the MCU and separately the WBR3 WiFi module for communication.
    Close-up of thermostat PCB showing WBR3 Wi‑Fi module, MCU chip, and SMD components Close-up of a PCB with an IC chip, yellow battery cover, and red/black wires inside a casing Close-up of a thermostat PCB with an IC, shielded module, and white connector inside a plastic housing
    You can also see the distinctive RTCC (RealTime Clock Calendar) chip in the SO8 housing, along with the watch quartz and battery from the sustainer.
    Close-up of a PCB with WBR3 Wi‑Fi module, IC chip, and a yellow disc capacitor
    On the other side of the board is just the soldered-on LCD with buttons:
    Disassembled thermostat panel: white bezel with window and a PCB with an LCD on a wooden table
    PCB designation: WT200-WiFi-V1
    Thermostat PCB with WBR3 Wi‑Fi module and connected wires on a wooden surface

    A few words about the internal structure
    The WBR3 module is based on the RTL8720CF chip - its batch can be changed to an open source solution.
    WBR2, WBR3, WBRU, W701-VA2-CG pinout, datasheet, flashing for Home Assistant
    Diagram of the WBR3 module with pin labeling and top and bottom views.
    The architecture of this device is TuyaMCU - we have a separate WiFi module for communication, and a separate MCU controlling all the hardware. Communication between the two is via the UART.
    TuyaMCU protocol - communication between microcontroller and WiFi module
    Block diagram of MCU and Wi-Fi module cooperation.
    Now we are still missing information about the dpID, i.e. the meaning and roles of the variables of this particular product....
    This is where TuyaMCU Analyzer comes in:
    TuyaMCU Analyzer - UART packet decoder for Tuya devices - dpID detector

    Analysis of captured data
    I captured the data with an isolated USB to UART converter. For this I used the ADUM1201 modules. I captured the RX->TX line and the TX->RX line separately (viewed from the WiFi module side). I performed one operation on the application and looked at what was captured. Here are the snippets of data collected.

    Switch - main button:
    
    Sent by WiFi module:
    55 AA	00	06		00 05	0101000100	0D	
    HEADER	VER=00	SetDP		LEN	dpId=1 Bool V=0		CHK	
    

    Conclusion: dpID 1 of type bool is the on/off state.

    Target temperature setting:
    
    Sent by WiFi module:
    55 AA	00	06		00 08	02020004000001A9	BF	
    HEADER	VER=00	SetDP		LEN	dpId=2 Val V=425		CHK	
    

    Conclusion: dpID 2 is the target temperature (multiplied by a constant to support decimal values).

    Change mode to program mode:
    
    Sent by WiFi module:
    55 AA	00	06		00 05	0404000101	14	
    HEADER	VER=00	SetDP		LEN	dpId=4 Enum V=1		CHK	
    

    dpID 4 is an enumeration. I have tested more and have unset the enumeration.
    Manual Mode = 0, Program Mode = 1, Temporary Program Mode = 2, Leave Home = 3

    Disabling sound:
    
    Sent by WiFi module:
    55 AA	00	06		00 05	6D01000100	79	
    HEADER	VER=00	SetDP		LEN	dpId=109 Bool V=0		CHK	
    

    Boolean with dpID 109 is sound on/off.

    Backlight brightness on low:
    
    Sent by WiFi module:
    55 AA	00	06		00 05	6A04000101	7A	
    HEADER	VER=00	SetDP		LEN	dpId=106 Enum V=1		CHK	
    

    dpID 106 is backlight enumeration - probably sequentially off, low, medium....

    Temp calibration at 0.3°C:
    
    Sent by WiFi module:
    55 AA	00	06		00 08	1302000400000003	29	
    HEADER	VER=00	SetDP		LEN	dpId=19 Val V=3		CHK	
    

    The value 3 represents the number of decimals, so 0.3.

    Frost protection on:
    
    Sent by WiFi module:
    55 AA	00	06		00 05	6701000101	74	
    HEADER	VER=00	SetDP		LEN	dpId=103 Bool V=1		CHK	
    

    Again boolean - on/off.

    Output main inverse on:
    
    Sent by WiFi module:
    55 AA	00	06		00 05	6C01000101	79	
    HEADER	VER=00	SetDP		LEN	dpId=108 Bool V=1		CHK	
    

    Boolean dpID 108 - on/off possibility.

    Sensor on internal:
    
    Sent by WiFi module:
    55 AA	00	06		00 05	6E04000100	7D	
    HEADER	VER=00	SetDP		LEN	dpId=110 Enum V=0		CHK	
    


    Temperature control switch inverse:
    
    Sent by WiFi module:
    55 AA	00	06		00 08	6502000400000050	C8	
    HEADER	VER=00	SetDP		LEN	dpId=101 Val V=80		CHK	
    


    Child lock (child protection - button lock) on:
    
    Sent by WiFi module:
    55 AA	00	06		00 05	0901000101	16	
    HEADER	VER=00	SetDP		LEN	dpId=9 Bool V=1		CHK	
    


    Workday setting to 6+1;
    
    Sent by WiFi module:
    55 AA	00	06		00 05	6B04000102	7C	
    HEADER	VER=00	SetDP		LEN	dpId=107 Enum V=2		CHK	
    


    Workday settings at 5+2:
    
    Sent by WiFi module:
    55 AA	00	06		00 05	6B04000101	7B	
    HEADER	VER=00	SetDP		LEN	dpId=107 Enum V=1		CHK	
    


    MCU reporting temperature to WiFi module:
    
    Received by WiFi module:
    55 AA	03	07		00 08	03 02 00 04 0000011D 		38	
    HEADER	VER=03	State		LEN	dpId=3 Val V=285	CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Received by WiFi module:
    55 AA	03	07		00 08	03 02 00 04 0000011A 		35	
    HEADER	VER=03	State		LEN	dpId=3 Val V=282	CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    

    The current temperature is dpID 3.

    I set the period 1 working day setting to 7:02 and 21°C
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	06		00 24	69000020070200D2080000A00B1E00A00C1E00A0110000DC160000A0080000DC170000A0	06	
    HEADER	VER=00	SetDP		LEN	dpId=105 Raw V=07 02 00 D2 08 00 00 A0 0B 1E 00 A0 0C 1E 00 A0 11 00 00 DC 16 00 00 A0 08 00 00 DC 17 00 00 A0		CHK	
    



    I set period 4 working day setting to 12:33 and 18°C:
    
    Sent by WiFi module:
    55 AA	00	06		00 24	69000020070200D2080000A00B1E00A00C2100B4110000DC160000A0080000DC170000A0	1D	
    HEADER	VER=00	SetDP		LEN	dpId=105 Raw V=07 02 00 D2 08 00 00 A0 0B 1E 00 A0 0C 21 00 B4 11 00 00 DC 16 00 00 A0 08 00 00 DC 17 00 00 A0		CHK	
    



    I set period 1 to 00:00 and 5°C :
    
    Sent by WiFi module:
    55 AA	00	06		00 24	6900002000000032080000A00B1E00A00C2100B4110000DC160000A0080000DC170000A0	74	
    HEADER	VER=00	SetDP		LEN	dpId=105 Raw V=00 00 00 32 08 00 00 A0 0B 1E 00 A0 0C 21 00 B4 11 00 00 DC 16 00 00 A0 08 00 00 DC 17 00 00 A0		CHK	
    


    Let's compare it again, the payload itself.
    Period 1 at 7:02 and 21°C:
    69 00 00 20 07 02 00 D2 080000A00B1E00A00C1E00A0110000DC160000A0080000DC170000A0
    Period 4 at 12:33 and 18°C:
    69 00 00 20 07 02 00 D2 080000A00B1E00A00C2100B4110000DC160000A0080000DC170000A0
    Period 1 at 00:00 and 5°C:
    69 00 00 20 00 00 00 32 080000A00B1E00A00C2100B4110000DC160000A0080000DC170000A0
    Here 0x07 and 0x02 have changed to 0x00 0x00, so presumably one byte is hours and the other is minutes, plus 0xD2 has changed to 0x32. 0xD2 is 210, so probably decimals, 21°C, and 0x32 is 50, so that's right - 5°C. One period format is hour, minute, zero byte (?) and temperature. Ew. temperature as two bytes.

    Follow up work
    The next step is to upload our open source firmware:
    https://github.com/openshwprojects/OpenBK7231T_App
    The TuyaMCU configuration process is presented there:
    TuyaMCU flashing, installation and configuration guide - configure dpID for Home Assistant
    Perhaps I will present this in a separate topic.

    Summary
    The thermostat presented here generally appealed to me. The whole thing offers quite a lot of different options, including different operating programmes, calibrations, working with an external or built-in probe, and even child protection and an anti-freeze mode (maintaining a minimum temperature in the house when we are away).
    Internally, I was most surprised by this RTCC - however, the manufacturer makes sure that the programmes will execute even when power is lost. The programme itself is in non-volatile memory, that's not a problem, but the hour also needs to be maintained somehow - and the RTCC with the battery solves that. I'm betting that the programme will come on even if there is no internet access when power returns.
    As for the inside, there's a WBR3 module inside, you can easily change the firmware for it, but then you have to configure the TuyaMCU, which I haven't tried yet in this case, although I know that other thermostats have been successfully run this way. I have collected and analysed the packages for now, so that I have a basis for further work. Eventually this will allow me to run this thermostat locally, without the manufacturer's servers, and pair it with Home Assistant.
    Do you use this type of thermostat, and if so, with Tuya or with Home Assistant?

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 14264 posts with rating 12159, helped 647 times. Been with us since 2014 year.
  • ADVERTISEMENT
📢 Listen (AI):
ADVERTISEMENT