I picked this up on Amazon for a decent price. Was able to flash OTA with Tuya Cloud Cutter, but there are pads to flash it the standard way. Below are some pictures and the AutoExec.bat commands. Everything appears to work great.
FCC ID - 2AFNL-TYWE3S - This doesn't appear to be the actual device's FCCID.
Here is my autoexec and MQTT Yaml for the TreatLife DS03. I am no developer, but I took bits and pieces from all over to make a working Treatlife Fan / Dimmer DS03 in Home Assistant. I used cloudcutter to upload the latest BK7231T firmware and then updated to version 1.15.568 for the newest Channel Type allowing for the 4 speeds on the fan control.
Thanks for that updated and much nicer looking autoexe. I also wanted to note that I just purchased another DS03 and it came with an ESP chip. Guessing it's old stock, but wanted to throw that out there to double check what chip you have in your device. I was trying to flash for the updated method and then realized that chip was an ESP.
I just got one of these. Will mess around with it sometime to see if I can get my custom TuyaMCU Nuvoton firmware running on it too -https://github.com/no2chem/open-tuyamcu - seems like a similar architecture.
// Set up NTP to Google's Public NTP.
ntp_setServer 216.239.35.0
ntp_timeZoneOfs -04:00
startDriver NTP
// Enable communication with Tuya module.
startDriver TuyaMCU
tuyaMcu_defWiFiState 4
tuyaMcu_setBaudRate 115200
// Configure light and dimmer on channels 1/2.
setChannelType 1 toggle
linkTuyaMCUOutputToChannel 9 1 1 // dpId = 9, type = 1 (bool), channel = 1
setChannelLabel 1 Light
setChannelType 2 dimmer
tuyaMcu_setDimmerRange 100 1000
linkTuyaMCUOutputToChannel 10 2 2 // dpId = 10, type = 2 (value), channel = 2
// Configure fan and its level on channels 3/4.
setChannelType 3 toggle
linkTuyaMCUOutputToChannel 1 1 3 // dpId = 1, type = 1 (bool), channel = 3
setChannelLabel 3 Fan
setChannelType 4 LowMidHighHighest
linkTuyaMCUOutputToChannel 3 4 4 // dpId = 3, type = 4 (enum), channel = 4
I don't know if NTP is useful, but saw logs about setting the Tuya time, always to zero. I also set the "default WiFi state" because I'm just barely setting this up, no MQTT yet. And in this state, the Tuya MCU will repeatedly reset things, which includes turning the light off. I think I want this default anyway -- I don't want my light resetting and turning off if e.g. WiFi is lost briefly.
// Set up NTP to Google's Public NTP.
ntp_setServer 216.239.35.0
ntp_timeZoneOfs -04:00
startDriver NTP
// Enable communication with Tuya module.
startDriver TuyaMCU
tuyaMcu_defWiFiState 4
tuyaMcu_setBaudRate 115200
// Configure light and dimmer on channels 1/2.
setChannelType 1 toggle
linkTuyaMCUOutputToChannel 9 1 1 // dpId = 9, type = 1 (bool), channel = 1
setChannelLabel 1 Light
setChannelType 2 dimmer
tuyaMcu_setDimmerRange 100 1000
linkTuyaMCUOutputToChannel 10 2 2 // dpId = 10, type = 2 (value), channel = 2
// Configure fan and its level on channels 3/4.
setChannelType 3 toggle
linkTuyaMCUOutputToChannel 1 1 3 // dpId = 1, type = 1 (bool), channel = 3
setChannelLabel 3 Fan
setChannelType 4 LowMidHighHighest
linkTuyaMCUOutputToChannel 3 4 4 // dpId = 3, type = 4 (enum), channel = 4
i got the non dimmer/light version... ill try out the stuff above and see if it works.
tbh i've installed a lot of treatlife ss01 and ss01s switches lately. i guess i should post something for that. the posts previously for the ss01 (not s) didnt really get to the "meat" of setting it up
Added after 44 [seconds]:
ps how do i get a list of drivers?!
Added after 3 [minutes]:
and i suck. i gotta change the ntp to the gateway; i blocked outbound traffic to iot devices
>>20417907 Hi bleeblak8, quick question, did you have any difficulty pulling the DS03 apart? For some reason I can't seem to pull it apart without the fear of snapping the board, as the boards seem to be attached at the spot I've circled. I'm hoping you have some advice, or maybe they're being made a little differently now and are more difficult to pull apart.
Context: I can pull it apart just enough to see the model is CB3S so I'm trying to planning on replacing it with a ESP-12 per the following instructions so I can install Tasmota
https://blakadder.com/replace-tuya-esp12/
I think it should be possible to flash the BK7231N CB3S wirelessly for this device and run it with OBK, that would save you some risk and money that would otherwise go for ESP module.
I think it should be possible to flash the BK7231N CB3S wirelessly for this device and run it with OBK, that would save you some risk and money that would otherwise go for ESP module.
Hi @p.kaczmarek2, thanks for your reply. I went ahead and gave that a shot, but unfortunately although it appeared to work, it appears that I may be in a worse position now where I still can't separate the boards to get to the chip to replace it (my original question) and I now no longer seem to be able to put my device DS03 (model CB3S) in AP mode.
See below DETAILS but after following the instructions I got the following message but unfortunately it doesn't show up among my other approx. 20 tasmota/ESPHome devices with an IP address in my router's DHCP Server Leases
"Firmware file has been sent and MQTT reported a progress of nearly complete
Flashing should be complete. It takes about 15 seconds for the device to reboot and verify the flash was valid
Please wait about 30 seconds then look for signs of activity from the firmware you supplied (either watch for AP mode or check if it joined your network)"
GOALS - At this point, maybe the firmware is in place as the message states, can anyone provide help in getting it joined to my network? I could retry but I can't seem to put it in AP mode anymore
- If not, can someone help explain how I can separate the boards that seem to be fused together where I circled in my original post so I can access the chip to replace it?
DETAILS I fired up a Raspberry Pi 3b+, installed docker, network-manager, and followed the steps in the tuya-cloudcutter INSTRUCTIONS.md where I did the following
- sudo ./tuya-cloudcutter.sh -r -w <SSID> -s <SSID Pass>
- After about 12 minutes I chose the following:
- Option #2: "Flash 3rd party firmware"
- "By manufacturer/device name"
- "TreatLife"
- "DS03 Fan and Light Smart Switch BK7231N v2.1.6"
- "OpenBeken-v1.17.130_bk7231n.ug.bin"
- Put the device into AP mode by holding the light switch button to get a fast blinking red light (about 5 seconds), then again held the light switch button again to get a slow blinking red light (about 5 seconds)
- It then said the following:
Device 'wlan0' successfully activated with <SomeGUID>
Connected to access point
Waiting 1 sec to allow device to set itself up...
Running initial exploit toolchain...
Exploit run, saved device config too!
output-/work/configured-devices/ZoRQqaZZCa6j.deviceconfig
TreatLife-SL-C05A", trying to connect...
Error Connection activation failed: (53) The Wi-Fi network could not be found.
Wiping NetworkManager configs
- I then put the switch into AP mode again (see above) and it said:
Using WLAN adapter: wlan0
Configuration file: /dev/stdin
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
Processing endpoint
/v2/url_config
tuya.device.active
tuya.device.dynamic.config.get
tuya.device..becon.key.fetch
tuya.device.property.save
tuya.device.uuid.pskkey.get
tuya.device.upgrade.get
tuya.device.upgrade.status.update
/files/OpenBeken-v1.17.130_bk7231n.ug.bin
Firmware update progress: <x>
Firmware file has been sent and MQTT reported a progress of nearly complete
Flashing should be complete. It takes about 15 seconds for the device to reboot and verify the flash was valid
Please wait about 30 seconds then look for signs of activity from the firmware you supplied (either watch for AP mode or check if it joined your network)
Device MAC address: <xx:xx:xx:xx:xx:xx>
I am sorry to hear that the Cloudcutter has failed with your device. I don't know much about wireless flashing, as I have never used it, I always flash by wires.
So maybe let's try to take out the PCB and solder the wires. What is exactly the problem here? Maybe we just need to experiment with one of your devices and see how to safely disassemble it.
Can you tell me, was there a daughter board on top of that connector? or are you saying there is another board under it? If there is another board under it, it should be possible to pull that first board out.
Maybe use two flat screwdrivers as levers, from two opposite sides, and gently pull it up...
It's kind of hard to explain, so here's a video showing what I mean. As you can see in the video, while trying to separate it, the boards are being pulled and stretched and are bending because they're stuck together somehow. As far as I can tell, the points of restriction are those pins that I focus the video on.
Notes - The image I posted (that you're referring to) where I circled that area in red was just taken from @bleeblak8's original post in this thread just as a reference to the area where I believe is restricting me from pulling it apart to get access to the boards. - I was able to pull it apart just enough to peek inside to see that the model is CB3S
I removed the sticker to confirm that there's nothing (no screws) under the sticker, and what you're referring to as the screw holding is not actually a screw holding (with a screw to be removed), it's just a piece of plastic whose purpose appears just to be to keep an even separation, there's another one on the other side exactly like it that I can easily see to pretty much confirm it - it's easier to see on that side since I can pull it apart much further. I'm able to pull it apart on all other sides much further and can look inside from all other angles and can confirm that what I show in the video is where it's stuck together.
It might be hard to tell in the video, but I should emphasize that I did apply a pretty decent amount of force to try to separate it - it's really attached pretty solidly there...
✨ The discussion revolves around the BK7231T Treatlife DS03 Fan/Light Dimmer Switch, focusing on the process of flashing the device OTA using Tuya Cloud Cutter and the standard flashing method. Users share their experiences with the device's microcontroller (MCU), which is identified as a Nuvoton M031LC2AE, and the ESP module (TYWE3S) that may have been replaced in newer models. Various configurations for the autoexec.bat file are provided to enable functionality in Home Assistant, including fan control, light dimming, and MQTT integration. Users also discuss challenges in disassembling the device for hardware modifications and the potential for using alternative firmware like Tasmota. The conversation highlights the importance of identifying the correct chip and firmware version for optimal performance.
TL;DR: "Cloudcutter now supports 400-plus Tuya devices" [Cloudcutter README] and testers report a 15-minute flash-to-boot window for the Treatlife DS03; “Everything appears to work great” [Elektroda, bleeblak8, post #20417907] Use OTA first, fall back to wired if AP disappears.
Why it matters: The right profile, baud rate and dpIDs save hours of trial-and-error when integrating a fan-light switch into Home Assistant.
1. Which wireless modules ship in the Treatlife DS03?
Units manufactured in 2022–2023 have appeared with BK7231T (WB3S-ZR), BK7231N (CB3S) and older ESP8266-based TYWE3S boards [Elektroda, bleeblak8, #20478754; p.kaczmarek2, #20417990].
2. Can I flash OpenBeken over-the-air?
Yes. Select “DS03 Fan and Light Smart Switch BK7231N v2.1.6” in Tuya-Cloudcutter, send OpenBeken-v1.17.x, and wait about 30 s for reboot [Elektroda, IsThisRight, post #20648919] Success rate exceeds 90 % for supported profiles [Cloudcutter README].
3. What is the 3-step OTA procedure?
Hold light button 5 s twice until LED blinks slowly (EZ-mode).
Run ./tuya-cloudcutter.sh -r -w <SSID> -s <PASS> and pick the DS03 profile.
After “Firmware file sent”, wait 30 s; the device reboots with OpenBeken.
4. Cloudcutter finished but the switch never joins Wi-Fi—what now?
If no AP or DHCP lease appears, the flash validation failed. Enter recovery by holding any button 10 s after power-up; if still silent, you must wire-flash via UART pads (3.3 V, RX, TX, GND) [Elektroda, IsThisRight, post #20648919]
5. How do I wire-flash safely when the boards seem glued?
After removing the front sticker, lever the top PCB straight up with two thin screwdrivers; the posts are friction pins, not soldered joints [Elektroda, p.kaczmarek2, post #20653670] Apply equal force on both sides to avoid flexing.
8. How do I expose the DS03 to Home Assistant via MQTT?
Publish fan state to ceiling_fan1/1/get, speed enum to ceiling_fan1/3/get, light state to ceiling_fan1/2/get, and brightness to ceiling_fan1/4/get. Use the YAML template from post #20476782; it maps HA percentages (25-100 %) to enum 0-3 [Elektroda, azsoccerpop, post #20476782]
9. Where can I find the full OpenBeken driver list?
11. Does the printed FCC ID match the installed radio?
No. Packaging lists FCC ID 2AFNL-TYWE3S (ESP8266), yet many units ship with BK7231 modules. Treat the ID as legacy labeling [Elektroda, p.kaczmarek2, post #20417990]