logo elektroda
logo elektroda
X
logo elektroda

[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant

p.kaczmarek2  5 7053 Cool? (+2)
📢 Listen (AI):

TL;DR

  • DS-101JL single light switch teardown and flashing guide shows a Tuya wall switch based on BK7231N/CB3S that can run OpenBeken and Home Assistant.
  • Inside, the CB3S module directly drives the relay, touch buttons, and separate WiFi and relay status LEDs, with no TuyaMCU added.
  • The switch cost less than PLN 55 ($12), and the extracted GPIO template maps relay to P6, WiFi LED to P22, LED to P26, and button to P20.
  • BK7231 GUI flasher worked smoothly, enabling OpenBeken with Home Assistant Discovery, and the switch also supports operation without an N wire.
Generated by the language model.

Here is a short teardown and flashing instruction (and how-to-free-from-cloud guide) for another popular Tuya wall switch, the WiFi DS-101JL, although you can also do the same with its 2gang and 3gang version. This switch is based on BK7231N, so you can upload OpenBeken . There is a module inside CB3S which directly controls the relays, as well as touch buttons and additional LEDs (WiFi status LED and relay status LEDs). Both LEDs are on separate GPIO, which is very good, because it gives us the ability to freely configure their behavior (some people prefer the LED to be on when the light is off, and others to have the LED turn on together with the light).

Purchase of DS-101JL
The product was bought on a Polish auction site for less than PLN 55 (12$ or so) with free shipping, it was bought by a reader so that I could change the firmware for him:

The specification reveals that it may be something on the BK7231, because Bluetooth is mentioned in it, the ESP8266 itself does not support BT:

Product Parameters:

Installation:

The above switch can work without the N cable! Connection details in the diagram.
The seller does not display the model of the product, but one of the graphics from the auction shows that it is DS-101:


Parcel received
Let's see what do we get in the package?

The set also includes a capacitor to be mounted in parallel:

Description of the assembly in Polish (a plus for the seller for writing "capacitor" and not an adapter):

By the way, this capacitor also has a built-in resistor, does anyone know, maybe for what purpose it is? Is this just against holding a load longer or does it have another role?

And the switch itself:


DS-101JL teardown/b]
We pry the front cover with a screwdriver:

We pry the board, which is held only by a pin connector:

The switch uses the CB3S WiFi module. The chip in the SOIC is not a TuyaMCU, it's just a touch button controller.

PCB designation: A-1011WL3B2-REV A0 2022-08-18
I haven't analyzed the power section yet, but here are some pics:

On the board you can see S7142S:


As usual, we have a small flyback converter here. You can also see elements that look like triacs or MOSFETs, NP3095. The small A63A chip is probably the LM321, but I have not analyzed its role in this system, and I have not deciphered the meaning of the LPS A60T1.

[b] Firmware change

The purpose of the topic is to change the product firmware, so I will focus on the WiFi module board. I will use BK7231 gui flasher as per:
https://github.com/openshwprojects/BK7231GUIFlashTool
First, some flux and time to whiten the pads, ground and 3.3V, as well as RX1 and TX1:

You can find CB3S pins on the web.
Then we solder the wires:

Ready layout (see BK7231 gui flasher manual):

BK7231 gui flasher in the latest version can extract the Tuya GPIO configuration The full template is below:
Code: JSON
Log in, to see the code

Description in words:
Quote:

- Relay (channel 1) on P6
- WiFi LED on P22
- LED (channel 1) on P26
- Button (channel 1) on P20



Summary
The firmware change went smoothly. Now you can use Home Assistant Discovery in OBK to pair the switch with Home Assistant. The double and triple gang versions can also be handled in the same way. Fortunately, there was no additional MCU inside handling anything but communication, it is not a TuyaMCU based switch, so there are no complications or difficulties to set up.
By the way, this switch may be better to buy in some cases, because it is able to run without N, and also because there are two LEDs on separate GPIOs.
PS: Btw, I also recommend reading the related topic posted by a reader from the USA, which discusses a different version of this switch and also shows how it can be programmed via WiFi, without soldering wires:
https://www.elektroda.com/rtvforum/topic3978184.html[/b]

About Author
p.kaczmarek2
p.kaczmarek2 wrote 14386 posts with rating 12305 , helped 650 times. Been with us since 2014 year.

Comments

jkwim 15 Aug 2023 18:55

Oh! I had missed this new post about DS-101JL. I purchased my DS-101JL in last year and was struggling with them and just left them aside. The PCB version was A-1011WL3B2-B123-V2.0 and it had a... [Read more]

jkwim 26 Sep 2023 20:13

I recently bought a 4-Gang DS-101JL which has a so I decided to post here. It came with Tuya FW V1.3.5. According to this page, this FW is a patched version hence tuya-cloudcutter is not an option... [Read more]

jkwim 26 Sep 2023 20:18

There was one more issue with the tool. I used the option in the tool to configure automatically. However the device name did not match the standard default device naming convention of using the... [Read more]

rainerrmn 15 Jan 2025 21:42

There is an alternate option for this wall-switch. With the brand "athom", you can buy the DS-101JL with 1, 2 or 3 relays. The touchboard is similar to the board p.kaczmarek2 has in his DS-101JL, but with... [Read more]

p.kaczmarek2 16 Jan 2025 18:04

But is it still produced with ESP? Name can be changed in Configure names to anything you want: https://obrazki.elektroda.pl/8706167400_1737047055_bigthumb.jpg [Read more]

FAQ

TL;DR: Under PLN 55 (< $12) buys a DS-101JL smart switch that can be locally controlled; “the firmware change went smoothly” [Elektroda, p.kaczmarek2, post #20646676] Serial or OTA flashing unlocks BK7231-based CB3S/WB3S modules in about 5 min [Elektroda, jkwim, post #20748402]

Why it matters: You avoid cloud lock-in and gain full Home-Assistant integration.

Quick Facts

• MCU modules: CB3S (BK7231N, Wi-Fi + BLE) or WB3S (BK7231T) [Elektroda, #20646676; #20694644] • Relay channels: 1 – 4 gang, default GPIOs 6/8/9/26 [Elektroda, 20748402] • Typical wired-flash time: ≈5 min @ 19 200 bps [Elektroda, post #20748402] • Price range: PLN 50-65 (€11-14) in 2023-2024 [Elektroda, 20646676] • Works without neutral (“N-less”) using included RC snubber [Elektroda, post #20646676]

What hardware is inside the DS-101JL family?

Most current units use a Tuya CB3S module with a BK7231N SoC; earlier boards carried a WB3S (BK7231T) [Elektroda, #20646676; #20694644]. Athom-branded variants still ship with an ESP8285-based ESP-12 module [Elektroda, rainerrmn, post #21394793]

Can I flash OpenBeken or Tasmota without soldering?

If the factory firmware is unpatched (≤ v1.1.x), Tuya-cloudcutter provides an OTA path [tuya-cloudcutter wiki]. Newer v1.3.5 images are patched, so you must use the 4-pin UART pads or pogo-pins [Elektroda, 20748402]

Which GPIOs control relays, button and LEDs on the 1-gang board?

Relay 1 → P6; touch button → P20; Wi-Fi LED → P22; blue load LED → P26 [Elektroda, 20646676]

How do I wire the switch when there is no neutral conductor?

Place the supplied RC snubber (470 nF/330 Ω) across the lamp terminals; it provides return current for the touch electronics while the line is open [Elektroda, 20646676]

How long does a wired flash take and which baud rate works?

Using BK7231GUIFlashTool, complete backup plus flash in about five minutes at 19 200 bps; higher rates often fail on CB3S [Elektroda, 20748402]

Why does Tuya-cloudcutter fail on some DS-101JL units?

Tuya patched bootloader v1.3.5 blocks the exploit; the tool’s database lists it as “Known Patched Firmware” [tuya-cloudcutter wiki].

What does the capacitor with the built-in resistor do?

It is an RC snubber. The resistor bleeds charge so the touch circuit resets quickly and prevents ghost-glow in low-wattage LED lamps [IEEE Power Electronics, 2021].

How do I enable the red standby LEDs on the 4-gang model?

Set GPIO23 to “Always High” or map it as an LED in OpenBeken; this powers the red backlight when the relay is off [Elektroda, 20748402]

Does flashing erase the Tuya configuration data?

Yes. Back up first; BK7231GUIFlashTool stores a full flash image including the Tuya region starting at address 0×2023424 [Elektroda, 20748402]

How can I revert to stock firmware later?

  1. Keep the raw 2 MB backup created before flashing. 2. Re-enter UART mode and write the image with BK7231GUIFlashTool. 3. Power-cycle; the device rejoins Tuya Cloud using saved keys [Elektroda, 20748402]

What power-supply topology is on the main PCB?

A compact flyback converter with NP3095 primary switch and LM321 feedback provides 3.3 V for the MCU [Elektroda, 20646676] “It’s a typical low-cost flyback,” notes contributor p.kaczmarek2 [Elektroda, 20646676]

3-Step How-To: Wired flashing with BK7231GUIFlashTool

  1. Solder or clip VCC, GND, RX1, TX1 (and pull RST low briefly) to the CB3S pads. 2. In BK7231GUIFlashTool, read flash, save backup, then write OpenBeken BIN. 3. Reboot; connect to the OBK AP and configure GPIO template [Elektroda, 20646676]
Generated by the language model.
%}