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

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

Treatlife DS03 Smart Dimmer / Fan controller - Absolute beginners guide to flashing (On a Mac)

mitmit17 5052 18

TL;DR

  • Flashing the Treatlife DS03 Smart Dimmer/Fan controller from Tuya firmware to OpenBeken for direct Home Assistant integration on a Mac.
  • The process opens the DS03, solders 3.3V, GND, nRESET, TX, and RX to the WB3S UART, then flashes with bk7231tools over USB-to-TTL.
  • A stubborn board required restarting the WB3S by momentarily shorting CEN to GND while bk7231tools was already flooding the serial link.
  • It backs up the original firmware, writes OpenBK7231T_UA_1.17.147.bin at offset 0x11000, then configures Wi‑Fi, MQTT, autoexec.bat, and Home Assistant.
  • The USB-to-TTL adapter may reset itself during the CEN-to-GND trick, so a separate 5V supply and careful tapping are recommended.
Generated by the language model.
ADVERTISEMENT
📢 Listen (AI):
  • I recently purchased a couple of Treatlife DS03 Smart Dimmer / Fan controller.
    Naturally, I had no desires to use the Tuya cloud services and wanted to connect it directly to my Home Assistant setup.

    There were many guides that one could find, but none of them was complete (using phrases like "do it in the usual way"). As someone new to both HA and OpenBeken world, I've had some trouble getting a definitive answer on how to get the process across. To make matters worse, I only have a Mac machine so all the windows flashing guides weren't very usable for me
    After some trial and error and time spent on research, I've decided to put down the following guide for prosperity. Hope someone finds in useful in the future.

    Treatlife DS03 Smart Dimmer / Fan controller - Absolute beginners guide to flashing (On a Mac)

    1. Disassemble the board
    Open the four screws connecting the face plate and carefully pry open the panel (which contains the WB3S board)
    Treatlife DS03 Smart Dimmer / Fan controller - Absolute beginners guide to flashing (On a Mac)

    2. (Optional) Remove board with WB3S board from buttons
    Remove 3 small screws and disconnect main board from panel (marked above in red)
    You should end up with the following board (both sides shown below)
    Treatlife DS03 Smart Dimmer / Fan controller - Absolute beginners guide to flashing (On a Mac) Treatlife DS03 Smart Dimmer / Fan controller - Absolute beginners guide to flashing (On a Mac)

    3.Soldering wiring and pins
    In order to flash OpenBeken on this chip we're going to need to use the UART interface of the WB3S board. However this interface is already used by the Tuya software to communicate with the Tuya MCU (Novton board on opposite side) that's actually controlling the leds and GPIOs.
    So we need to expose the UART wires and reset the MCU so that we can chat without interruption

    Solder pins / wires on the 3.3V, GND, nRESET, TX & RX lines, marked below
    Treatlife DS03 Smart Dimmer / Fan controller - Absolute beginners guide to flashing (On a Mac)
    Solder the pins
    Treatlife DS03 Smart Dimmer / Fan controller - Absolute beginners guide to flashing (On a Mac) Treatlife DS03 Smart Dimmer / Fan controller - Absolute beginners guide to flashing (On a Mac)
    Solder the wires
    Treatlife DS03 Smart Dimmer / Fan controller - Absolute beginners guide to flashing (On a Mac)

    If you're not experienced in soldering, verify all the connectivity with a multimeter.

    4. Connect to USB-to-TTL board
    I'm using this board and use the following connections. Notice that RX on the board is TX on the USB-to-TTL and vice versa.
    DS03 MainboardUSB-to-TTL
    3.3vvcc
    GNDGND & NRESET
    TXDRXD
    RXDTXD



    Note, in order to connect the USB-to-TTL GND to both GND and NRESET, I used a small breakout board as seen below
    Treatlife DS03 Smart Dimmer / Fan controller - Absolute beginners guide to flashing (On a Mac)
    And connect the USB-to-TTL to your computer (my MBP in my case)

    5. Install python and install the bk7231tools package so we can flash the firmware
    We're going to install the bk7231tools package to support flashing
    Code: Bash
    Log in, to see the code


    6. Check connectivity and see if we're able to communicate with the board
    Code: Bash
    Log in, to see the code


    7. What happens if the above fails (usually timeout)
    In some of the boards the above worked without issue, while in another board I could not get the above to work at all. The problem seems to have been that the Tuya app was trying to talk over the UART with the MCU (which is held at reset) and would only give a small time window at boot time to talk with the bootloader.
    The solution comes from reseting the board while the python script was already running (the bk7231tools script is internally flooding the serial).
    Reseting is done by shorting the CEN pin on the WB3S board to GND. However the USB-to-TTL board I've had didn't appreciate the" "short" here and reseted themselves (disconnecting the USB).
    The below describes what one can do if that happens:

    7.1 Use a separate 5V power source and connect it to the 5v connectors as marked below. Disconnect the 3.3V source from your USB-to-TTL converter. In my case I used another USB-to-TTL with the jumper set to 5V. Do not use TX/RX on this device as it may damage the WB3S.
    Treatlife DS03 Smart Dimmer / Fan controller - Absolute beginners guide to flashing (On a Mac)

    7.2 Run the bk7231tools command as above and while it waits, tap connect the GND to the CEN pin as marked below (to reset the WB3S) board. See below on locations. I connected another connection to the breakout board connected to GND and used the other side of the wire to momentarily tap the wire on the CEN pin, quickly reseting the board.
    Treatlife DS03 Smart Dimmer / Fan controller - Absolute beginners guide to flashing (On a Mac)

    7.3 The python script should work now as expected
    Code: Bash
    Log in, to see the code


    8. (Optional) Create a backup of your existing firmware
    Code: Bash
    Log in, to see the code


    9. Write new firmware on the device
    Download the relevant OpenBeken image from OpenBK7231T github page. Use the UA version (UART firmware). At the time of this writing the the file I used was OpenBK7231T_UA_1.17.147.bin

    Use the following commands to write (notice we're using the offset of 0x11000 which is after the bootloader)
    Code: Bash
    Log in, to see the code


    Success! Our WB3S is now using OpenBeken!

    10. Disconnect all but the 5V power and 5V GND
    Treatlife DS03 Smart Dimmer / Fan controller - Absolute beginners guide to flashing (On a Mac)

    [b]11. Configure the OpenBeken software to connect to your wifi

    Connect your computer to the OpenBeken SSID and browse to 192.168.4.1
    Configure the wifi details
    Treatlife DS03 Smart Dimmer / Fan controller - Absolute beginners guide to flashing (On a Mac) Treatlife DS03 Smart Dimmer / Fan controller - Absolute beginners guide to flashing (On a Mac)
    Restart the WB3S and connect to it's IP address (use your router's interface to find it)

    12. Configure names and MQTT parameters
    Treatlife DS03 Smart Dimmer / Fan controller - Absolute beginners guide to flashing (On a Mac)
    And it should connect to MQTT in your setup
    Treatlife DS03 Smart Dimmer / Fan controller - Absolute beginners guide to flashing (On a Mac)

    13. Write an autoexec.bat file
    Click Launch Web Application and click on Filesystem
    Create a file called autoexec.bat and set it's content to
    Code: Text
    Log in, to see the code


    Reboot
    The firmware should now look like this
    Treatlife DS03 Smart Dimmer / Fan controller - Absolute beginners guide to flashing (On a Mac)


    14. Connect to Home Assistant.
    You can either create an MQTT discovery through OpenBeken (Config->Home Assistant Configuartion) or use the following in HA
    Code: Text
    Log in, to see the code


    15. Unsolder the wires and pins from the board
    And put everything back together

    Congrats.[/b]

    Cool? Ranking DIY
    About Author
    mitmit17
    Level 2  
    Offline 
    mitmit17 wrote 3 posts with rating 4, helped 1 times. Been with us since 2023 year.
  • ADVERTISEMENT
  • #2 20624270
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14637
    Help: 655
    Rate: 12649
    Very good and detailed guide. Here are few more tips from me:
    - you can use SSDP driver to get your device discoverable by Windows (startDriver SSDP in autoexec.bat)
    - you can use power save to lessen the energy consumption without losing any features: PowerSave 1 (in autoexec.bat)
    - you can also use our Windows GUI flasher for programming BK7231 https://github.com/openshwprojects/OpenBK7231T_App
    Helpful post? Buy me a coffee.
  • #3 20624695
    mitmit17
    Level 2  
    Posts: 3
    Help: 1
    Rate: 4
    Awesome. Thanks!
  • ADVERTISEMENT
  • #4 20633564
    mitmit17
    Level 2  
    Posts: 3
    Help: 1
    Rate: 4
    I found that the OpenBeken heuristics for Home Assistant discovery isn't great for this device. It creates the fan switch as a light switch, ignores the fan speed setting. I wasn't happy with it.
    The following shell script publishes an MQTT discovery message that fits the DS03 device, and creates a device through MQTT (and not just the entities).

    In my particular setup, I use mosquitto as my mqtt broker running in a dockerized environment. Uses yq to format the embedded YAML as JSON for publishing for

    Code: Bash
    Log in, to see the code
  • #5 20633587
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14637
    Help: 655
    Rate: 12649
    Very good job. I am planning to customization option for OBK hass automatic discovery, maybe that could also help in the future. It will be most likely possible through our Web App.
    Helpful post? Buy me a coffee.
  • #6 20682744
    xSPARExSTEWx
    Level 3  
    Posts: 4
    Rate: 5
    Just as an FYI for any one else looking into these. I bought both a single and the 2 pack off of amazon. The single pack had the BK7231T chip, but the 2 pack had the BK7231N chip. Not sure how different they are, but when flashing make sure to use the correct one.

    Also all the ones I got were a bit different that the face plate board and the others were all soldered together. You will now need to take it completely out with the ground screw on the pack and another under the sticker by the other wires. Then you need to bend the transistor under the metal back plate so the boards can come out.
  • ADVERTISEMENT
  • #7 20682802
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14637
    Help: 655
    Rate: 12649
    Do you have flash backups for both N and T versions? Can you submit them here?
    Helpful post? Buy me a coffee.
  • #8 20682847
    xSPARExSTEWx
    Level 3  
    Posts: 4
    Rate: 5
    Yes I do! Hopefully they attached correctly.
    Attachments:
    • readResult_BK7231T_QIO_2023-02-8-23-06-48.bin (2 MB) You must be logged in to download this attachment.
    • readResult_BK7231N_QIO_2_2023-02-8-23-51-11.bin (2 MB) You must be logged in to download this attachment.
  • #9 21253481
    kaplanroger
    Level 5  
    Posts: 10
    Help: 1
    Rate: 1
    >>20682744
    I just experienced this too. There are three boards inside on top of each other and they're all soldered together.
    I removed the two screws on the metal faceplate and wiggled the assembly out. In order to get to the top board, I carefully flexed the board to remove the three small screws holding the board to the button faceplate. That allowed me to get to the soldered header. I removed the solder from the 8 pins and wiggled the board off. Not easy. I have a desoldering suction gun which made it easier though.
    The layout of the board looks the same as picture above but some writing is different, and the NRESET hole is labeled in chinese, which seems to translate to "empty feet".. not sure resolution is high enough.
    The MCU is Nuvoton M031EC1AE which is different than in the picture- it's a 28 pin DIP package not a square.. The pinout shows the reset on pin 24, which the board appears not to have connected. This is a problem.
    My current thought is to desolder the CB3S module from the board and flash it in isolation, then resolder it. I'd also like to try replacing with a ESP12 board but it looks like pin 10 is being used, which appears to be a PWM GPIO, which I don't think ESP12 has.
  • #10 21253554
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14637
    Help: 655
    Rate: 12649
    28 pin DIP MCU, are you sure? That would be a very large case, as for Tuya device... Two 28-pin DIP microcontrollers on a white background.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #11 21253814
    kaplanroger
    Level 5  
    Posts: 10
    Help: 1
    Rate: 1
    >>21253554
    Well not technically a dip but rectangular with pins on 2 sides
    Nuvoton integrated circuit on a green printed circuit board with pins on both sides.
    Note how the 5th pin on the top has no trace, that’s the reset pin.
    TSSOP 28-pin diagram with pin layout for part number M031EB0AE, M031EC1AE.
  • #12 21254098
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14637
    Help: 655
    Rate: 12649
    So a TSSOP28 case. That is very possible. DIP28 is not used in smart devices at all.
    Helpful post? Buy me a coffee.
  • #13 21255989
    kaplanroger
    Level 5  
    Posts: 10
    Help: 1
    Rate: 1
    >>21253481
    I removed the module (CB3S) using the heat gun approach and programmed it with OpenBK. I used this $5 thingy for the programming:
    https://www.aliexpress.us/item/2251832626534341.html
    Although it's for ESP devices, it works OK for this module since the key pins are the same. The reset button even bridges CEN to ground for the flashing process. Highly recommended. Once you're done flashing, the board provides power so you can do the web configuration without having to reinstall the module.
    I'm going to solder the module back and reassemble and test tomorrow.
    Incidentally the only pins used are CEN, 3.3V, Gnd, Tx, Rx. There are some other pins that have a white mark on the board but there's no connection.
  • #14 21257276
    kaplanroger
    Level 5  
    Posts: 10
    Help: 1
    Rate: 1
    >>21255989
    I reassembled everything and fired it up. I'm having trouble with some Openbk stuff which I'll put in another post, but I did discover that the light power DP is 101 and light dimmer DP is 6, which is different from the mapping in the tutorial. So replace the 9 and 10 in the link statements in the autoexec.bat to 101 and 6 respectively
  • #15 21257901
    hubertwinny33
    Level 1  
    Posts: 1
    I came across this too where the boards were literally soldered together so that you couldn't pull them apart and flash them. Why are these guys such jerks?
  • #16 21258011
    kaplanroger
    Level 5  
    Posts: 10
    Help: 1
    Rate: 1
    >>21257901
    I suspect it has to do with ease of assembly. If you're going to solder a header socket, might as well solder the header and remove the manual insertion process which probably bent pins.

    Anyway, I finally got my DS03 working.

    Just one more note: I was having trouble bonding the DPid's to channels. After some experimentation I found that the comments at the end of the linkTuyaMCUOutputToChannel commands in the autoexec.bat were the culprit.
    By removing the // COMMENTS from the end of the line and putting them on their own line, it started working. I'm not sure if this is expected behavior or not.

    Added after 50 [minutes]:

    >>21258011
    OK it's not quite working and I can't figure out how to troubleshoot anymore.
    It seems like the MCU is not accepting any commands.
    Pressing a button on the device causes a TuyaMCU packet to be published in the log, the web app to change, and the correct MQTT packet to be published (get).
    Pressing a button on the web app causes the button state to change, the channel value to change, the correct MQTT packet to be published, but the device does not change.
    Publishing a set packet on MQTT causes the web app and channel values to change correctly but the device does not change
    In the logs I see packets being published from MCU to us, but I see no logs of messages TO the MCU.
    I tried composing some packets with tuyaMcu_sendCmd with both 06 and 07 commands, no luck. Nothing published in the logs except for confirmation of the command, and the device doesn't change.

    Do packets sent TO the MCU get reflected in the log? With the tuyaMCU box checked?

    Any other thoughts about ways to troubleshoot?

    I did test for continuity between the Tx/Rx pins on the module and their pads on the board. I'd rather not rip the device apart again to check until I've exhausted all software possibilities...
  • #17 21319982
    vdubs22
    Level 2  
    Posts: 2
    >>21258011 Were you able to get this working? Is there a way to flash this without removing CB3S from main board?
  • #18 21320055
    kaplanroger
    Level 5  
    Posts: 10
    Help: 1
    Rate: 1
    No because I unsoldered the board and flashed it in isolation.

    However I gave up on the device because the Tx->Rx trace between the BK chip and the MCU somehow got broken, and while removing the BK board to try to fix it I ripped a solder trace past repair. Careless. 

    However to get to that point I used these to connect directly to the MCU pins:

    https://www.aliexpress.us/item/3256805273940254.html

    Colorful IC test leads connected to an integrated circuit.

    Any sort of IC test lead that says it will handle TSSOP chips will work. So use it to grab the nReset pin and connect it to ground.

    As a bonus you can use them to clamp onto the Tx/Rx solder globs where the BK board mounts to the main so you don't have to deal with soldering a wire to the tiny solder pads. 

    The nReset pin is pin 24 on the Nuvoton TSSOP28 chip (14 pins per side). Look closely and there'll be a dot at one corner. That's pin 1. Position that at the upper left. The pins are numbered counter-clockwise so pin 24 will be the fifth from the top on the right side.
    Pin connection diagram of a TSSOP28 chip with the nRESET pin highlighted.
    If anyone cares the MCU pins 3 and 4 are the Tx/Rx pins that communicate with the BK board.

    Rather than purchase another unit I decided to try the Kasa controller which has a much nicer interface anyway and the Kasa integration with Home Assistant seems to work well. 
  • #19 21320064
    vdubs22
    Level 2  
    Posts: 2
    >>21320055 Thanks for detail description. I will give this a try
📢 Listen (AI):

Topic summary

✨ The discussion centers on flashing the Treatlife DS03 Smart Dimmer / Fan controller to bypass Tuya cloud services and integrate it directly with Home Assistant (HA), specifically using a Mac environment. The original poster provides a detailed beginner-friendly guide for disassembling the device and flashing the firmware using OpenBeken tools. Key challenges include device discovery issues in HA, requiring custom MQTT discovery messages for accurate fan and light control integration. Variations in hardware were noted: single units contain BK7231T chips, while two-packs may have BK7231N chips, necessitating correct chip identification before flashing. The device's internal construction involves multiple soldered boards, complicating disassembly and flashing. Some users report the MCU as a Nuvoton M031EC1AE in a TSSOP28 package, with the reset pin unconnected on the board, requiring direct pin access. Programming can be done by desoldering the CB3S module and using inexpensive ESP-compatible programmers, connecting only essential pins (CEN, 3.3V, GND, TX, RX). Troubleshooting includes adjusting DP (data point) mappings in autoexec.bat and avoiding inline comments that disrupt command parsing. Some users experienced hardware damage due to broken traces between BK chip and MCU during attempts to flash without removing the module. Specialized IC test clips for TSSOP packages facilitate pin access without soldering. Additional tips include using SSDP drivers for device discovery on Windows and power-saving modes in autoexec.bat. Future improvements may include enhanced automatic discovery customization via a web app.
Generated by the language model.

FAQ

TL;DR: For 15-step Mac flashing, "use the UA version" of OpenBeken, wire 3.3V, GND, TX, RX and hold TuyaMCU reset before using bktools on /dev/cu.usbserial-XXXX. This FAQ helps Home Assistant beginners flash Treatlife DS03 without Tuya cloud. [#20623613] Why it matters: Treatlife DS03 hardware varies, so the correct chip, reset method, firmware image, and DPIDs prevent failed flashing or broken fan control.

DS03 variant or method Module or chip Practical flashing note
Original guide unit WB3S / BK7231T Use OpenBK7231T UA firmware at offset 0x11000.
Later 2-pack unit BK7231N / CB3S reported Use the correct N build, not the T build.
Soldered-board unit CB3S hard to access Remove or clip the module; boards may need desoldering.
Windows alternative BK7231 GUI flasher Optional GUI route instead of Mac bktools.

Key insight: Do not treat every Treatlife DS03 as the same board. Confirm BK7231T versus BK7231N, then verify Tuya DPIDs before final Home Assistant MQTT discovery.

Quick Facts

  • The core UART wiring is four logic connections: DS03 3.3V to adapter VCC, GND to GND, TXD to RXD, and RXD to TXD; the MCU reset line also ties to ground during flashing. [#20623613]
  • The Mac command bktools chip_info -d /dev/cu.usbserial-XXXX returned BK7231S_1.0.5, Protocol: BASIC_TUYA, and confirmed bootloader communication before writing firmware. [#20623613]
  • Full Tuya backup used read_flash from address 0 with length 0x200000, equal to 2,097,152 bytes. [#20623613]
  • The OpenBeken write example used start offset 0x11000, wrote 978,944 bytes, and finished with CRC verification OK!. [#20623613]
  • Later DS03 units can have three stacked boards soldered together, a Nuvoton M031EC1AE in TSSOP28, and reset on pin 24. [#21320055]

How do I flash OpenBeken onto a Treatlife DS03 Smart Dimmer/Fan Controller using a Mac?

Flash it with bk7231tools, a USB-to-TTL adapter, and the OpenBeken UART image.
  1. Disassemble the DS03 and expose WB3S UART pads.
  2. Install Python support with pip install bk7231tools.
  3. Run bktools chip_info, back up flash, then write the UA image at 0x11000.
After flashing, power the board, join the OpenBeken SSID, browse to 192.168.4.1, and enter Wi-Fi details. The guide used /dev/cu.usbserial-XXXX on a MacBook Pro. [#20623613]

What wiring connections are needed between the Treatlife DS03 WB3S board and a USB-to-TTL adapter for UART flashing?

Connect power straight and cross the UART data lines. Wire DS03 3.3V to adapter VCC, DS03 GND to adapter GND, DS03 TXD to adapter RXD, and DS03 RXD to adapter TXD. Also connect DS03 GND to NRESET to hold the Tuya MCU silent. The thread used a small breakout board to split USB-to-TTL ground to both GND and NRESET. Verify continuity with a multimeter if soldering is new to you. [#20623613]

Why does bk7231tools time out when trying to read chip_info from a Treatlife DS03, and how can I reset the WB3S with the CEN pin?

bk7231tools times out when Tuya firmware occupies the UART before the bootloader responds. Start bktools chip_info first, then momentarily short WB3S CEN to GND to reset the module while the script floods serial. If the USB-to-TTL adapter resets during that short, power the DS03 from a separate 5V source and disconnect adapter 3.3V. Do not use TX/RX on the separate 5V device, because it can damage the WB3S. [#20623613]

Which OpenBeken firmware file should I use for a Treatlife DS03 with a BK7231T chip versus a BK7231N or CB3S module?

Use the OpenBeken build that matches the actual chip family. For the BK7231T guide unit, the author used the OpenBK7231T UART image, specifically the UA version, with an example file named OpenBK7231T_UA_1.17.147.bin. A later buyer found a single pack with BK7231T, but a 2-pack with BK7231N. That means the N unit needs the correct BK7231N/OpenBeken image, not the T file. [#20682744]

How do I back up the original Tuya firmware from a Treatlife DS03 before flashing OpenBeken?

Back it up with bktools read_flash before writing OpenBeken. The example command reads from start address 0 for length 0x200000 into dump_full.bin. That equals 2,097,152 bytes of flash data. Run bktools chip_info first to confirm the device answers over /dev/cu.usbserial-XXXX. Keep the backup file before writing the new image at offset 0x11000. [#20623613]

What should go in the OpenBeken autoexec.bat file for the Treatlife DS03 fan, light, dimmer, and TuyaMCU channels?

Put NTP, TuyaMCU, channel types, and DPID links in autoexec.bat. The guide starts NTP, then starts TuyaMCU, sets Wi-Fi state 4, and sets baud rate 115200. It maps light power to channel 1, dimmer to channel 2, fan power to channel 3, and fan speed to channel 4. Original DPIDs were 9 for light power, 10 for dimmer, 1 for fan power, and 3 for fan speed. [#20623613]

Why do some Treatlife DS03 units use different Tuya DPIDs like light power DP 101 and dimmer DP 6 instead of DP 9 and DP 10?

Different DS03 hardware revisions use different Tuya MCU data point mappings. One later CB3S-based unit reported light power on DPID 101 and light dimmer on DPID 6, not 9 and 10. Replace the 9 and 10 values in linkTuyaMCUOutputToChannel for that revision. Keep fan DPIDs unchanged only after verifying logs or behavior. [#21257276]

How can I configure Home Assistant MQTT discovery correctly for the Treatlife DS03 fan speed and light dimmer?

Publish custom MQTT discovery payloads for separate fan and light entities. The working script created homeassistant/fan/${device_name}_fan/config and homeassistant/light/${device_name}_light/config. It mapped fan state to ~/3/get, fan command to ~/3/set, speed state to ~/4/get, and speed command to ~/4/set. It mapped light state to ~/1/get, light command to ~/1/set, brightness state to ~/2/get, and brightness command to ~/2/set. It also used retained mosquitto_pub messages. [#20633564]

Why does OpenBeken Home Assistant auto-discovery create the Treatlife DS03 fan switch as a light and ignore fan speed?

OpenBeken’s automatic Home Assistant discovery heuristics misclassify this DS03 configuration. The author found it created the fan switch as a light switch and ignored the fan speed setting. The fix was to publish manual MQTT discovery messages that define the device, fan, light, speed percentage, presets, availability, and retained configuration topics. This creates a real MQTT device in Home Assistant, not only loose entities. [#20633564]

What is TuyaMCU and why does the Treatlife DS03 need it after flashing OpenBeken?

"TuyaMCU is a serial control layer that lets OpenBeken communicate with the separate Nuvoton microcontroller, keeping fan, LED, dimmer, button, and GPIO behavior available after replacing Tuya Wi-Fi firmware." The DS03 WB3S uses UART to talk to the Tuya MCU on the opposite board. OpenBeken must start TuyaMCU and set 115200 baud so commands reach that controller. [#20623613]

What is the CEN pin on a WB3S or CB3S module and how is it used during flashing?

"CEN is the module reset input that restarts the WB3S or CB3S Wi-Fi module, allowing the bootloader window to open while flashing tools are already polling UART." During a timeout, momentarily connect CEN to GND. One ESP-style programming board also had a reset button that bridged CEN to ground for CB3S flashing. [#21255989]

BK7231T vs BK7231N in Treatlife DS03 switches — what are the practical differences when flashing OpenBeken?

The practical difference is firmware selection. A reported single-pack DS03 used a BK7231T chip, while a 2-pack used a BK7231N chip. Flashing requires the OpenBeken build for the installed chip. Do not assume all DS03 units match the original WB3S/BK7231T guide. Confirm the module marking before writing, because the wrong image targets the wrong Beken family. [#20682744]

How can I flash a Treatlife DS03 when the faceplate boards are soldered together and the CB3S module is hard to access?

Use desoldering or external clips instead of forcing the stacked boards apart. One later unit had three boards stacked and soldered together. The user removed two metal faceplate screws, flexed the assembly, removed three small screws, desoldered an 8-pin header, and then removed the CB3S module. Another approach used a heat gun and a $5 ESP-style programming fixture to flash the CB3S outside the DS03. [#21255989]

How do I use IC test clips on the Nuvoton M031EC1AE TSSOP28 MCU to hold nReset low while flashing a Treatlife DS03?

Clip onto pin 24 of the Nuvoton M031EC1AE TSSOP28 and connect it to ground. Put the package dot at the upper left as pin 1. Count pins counter-clockwise; pin 24 is the fifth pin from the top on the right side. TSSOP-compatible IC test leads can also clamp to TX/RX solder blobs near the BK module, reducing tiny-pad soldering. MCU pins 3 and 4 carry TX/RX to the BK board. [#21320055]

How can I troubleshoot a Treatlife DS03 where TuyaMCU packets from the MCU appear in OpenBeken logs but commands sent from MQTT or the web app do not control the device?

Check command syntax, DPID mapping, and the physical TX-to-RX path. One user found inline // comments after linkTuyaMCUOutputToChannel commands stopped DPID binding; moving comments to separate lines helped. Later, logs showed MCU-to-OpenBeken packets, but no effective commands back to the device. The same unit eventually had a broken TX-to-RX trace between the BK chip and MCU. Verify continuity before further software changes. [#21258011]
Generated by the language model.
ADVERTISEMENT