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 7254 Cool? (+2)
Listen:

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.
AI summary based on the discussion. May contain errors.

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 14755 posts with rating 12879 , helped 659 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: For Home Assistant users, this DS-101JL guide shows a 3.3V serial flash path and confirms "firmware change went smoothly" on the 1-gang BK7231N/CB3S model. It maps relay P6, button P20, WiFi LED P22, and status LED P26 for fast OpenBeken setup and cloud-free control. [#20646676]

Why it matters: DS-101JL switches ship with different Tuya modules and firmware, so identifying the exact board decides whether flashing is simple, wired-only, or better avoided.

Variant Module / chip Flashing path noted in thread What matters most
DS-101JL 1-gang CB3S / BK7231N Wired serial flashing with OpenBeken Separate WiFi and status LEDs on GPIOs
DS-101JL older unit WB3S / BK7231T Different hardware revision Do not assume CB3S pinout applies
DS-101JL 4-gang CB3S / BK7231N Wired serial only; Tuya 1.3.5 patched Extra backlight control on P23
Athom-branded version ESP12-style module / ESP8285 Sold preflashed with Tasmota Different ecosystem and no BK7231 path

Key insight: Do not buy or flash a DS-101JL by model name alone. The thread shows at least three hardware families under the same product label, and the module type changes both the GPIO map and the viable flashing method.

Quick Facts

  • The featured 1-gang DS-101JL was bought for less than PLN 55 (about $12) with free shipping, making it a low-cost candidate for local Home Assistant control. [#20646676]
  • The no-neutral package included a parallel capacitor, and the wiring diagram explicitly states the switch can work without an N wire. [#20646676]
  • The serial flashing work on the CB3S board used exposed pads for 3.3V, GND, RX1, and TX1 on the Wi-Fi module side. [#20646676]
  • One 4-gang unit needed a 2 mm header instead of standard 2.54 mm pitch for solderless power contact, plus jumper wires for TXD and RXD. [#20748402]
  • The Athom alternative used a JS-03-8285 controller with an ESP8285, described as an ESP8266-class device with 1 Mbit internal flash, and could be ordered preflashed with Tasmota. [#21394793]

How do I flash a DS-101JL single light switch with a BK7231N CB3S module to OpenBeken for Home Assistant?

You flash it over 3.3V serial using the CB3S pads and BK7231GUIFlashTool. 1. Open the switch, lift the board, and tin the pads for 3.3V, GND, RX1, and TX1. 2. Solder wires and connect them as shown in the BK7231 GUI flasher layout. 3. Read the Tuya config, flash OpenBeken, then use Home Assistant Discovery in OBK. [#20646676]

What is the CB3S module in the DS-101JL switch, and how does it relate to the BK7231N chip?

CB3S is the Wi-Fi module inside this DS-101JL, and it uses the BK7231N chip. "CB3S is a Tuya Wi‑Fi module that handles relay, button, and LED control directly, with BK7231N as its main controller." In the featured 1-gang board, that module drives the relay and both LEDs without a separate TuyaMCU. [#20646676]

Why is the DS-101JL considered easier to reflash than a TuyaMCU-based wall switch?

This BK7231N version is easier because the CB3S module controls the relays, buttons, and LEDs directly. The author states the SOIC chip is only a touch-button controller, not a TuyaMCU. That removes the extra MCU communication layer that usually complicates GPIO mapping and firmware setup on Tuya wall switches. [#20646676]

Which GPIO pins are used for the relay, button, WiFi LED, and status LED on the 1-gang DS-101JL BK7231N version?

The 1-gang BK7231N/CB3S mapping is relay on P6, button on P20, WiFi LED on P22, and status LED on P26. The extracted JSON template names them as Rel;1, Btn;1, WifiLED_n;0, and LED;1. That separation is useful because WiFi and load-state LEDs can be configured independently in OpenBeken. [#20646676]

What is BK7231GUIFlashTool, and how does it extract the Tuya GPIO configuration from a DS-101JL switch?

BK7231GUIFlashTool is the serial flashing tool used in the thread to read and program BK7231-based Tuya devices. "BK7231GUIFlashTool is a desktop flasher that reads Tuya device data over serial, including GPIO assignments stored in the module configuration." In this case, it produced a full template for the DS-101JL, including P6, P20, P22, and P26. [#20646676]

Why do some DS-101JL switches use CB3S BK7231N while others use WB3S BK7231T, and what differences matter when flashing them?

DS-101JL is a product family, not one fixed board design. One owner reported an older PCB version A-1011WL3B2-B123-V2.0 with a WB3S module based on BK7231T, while the teardown unit used CB3S with BK7231N. That difference matters because pinouts, extracted configs, and flashing expectations can change between revisions even when the front panel looks similar. [#20694644]

How can I identify the solder points for 3.3V, GND, RX, and TX on a DS-101JL board before flashing?

Identify them on the Wi-Fi module pads, not by guessing from the relay side. The teardown shows the author first tinned ground, 3.3V, RX1, and TX1 on the CB3S board, then soldered wires directly there. For the 4-gang board, another post also marked possible flashing points in a photo before wiring TXD and RXD. [#20646676]

What does the capacitor included with the no-neutral DS-101JL switch do, and why does it have a built-in resistor?

The thread only confirms that the no-neutral kit includes a capacitor mounted in parallel and that it also contains a resistor. The author asks whether the resistor prevents the load from staying energized longer or serves another purpose, but no final explanation appears in the discussion. Treat the resistor’s exact role as unresolved in this thread. [#20646676]

How should I configure the 4-gang DS-101JL GPIOs in OpenBeken, including the extra backlight pin on P23?

Use the extracted 4-gang map, then handle P23 separately for the red backlight LEDs. Set buttons on P24, P20, P7, and P14; relays on P6, P8, P9, and P26; WiFi LED on P22. The post also found backlit_io_pin on P23, so you can set P23 to Always High for permanent red backlight or assign it as an LED-controlled toggle. [#20748402]

Why do the blue LEDs work but the red backlight LEDs stay off on a flashed 4-gang DS-101JL, and how can that be fixed?

The blue LEDs work because the main relay-channel GPIOs were mapped, but the red backlight uses a separate pin. The 4-gang Tuya config exposed backlit_io_pin on P23 with backlit_io_lv set to 1. Setting P23 to Always High lit all red LEDs, and assigning P23 as LED created a separate toggle in the web UI. [#20748402]

What flashing problems can happen with a DS-101JL on Tuya firmware 1.3.5, and why might 19200 baud work when higher rates fail?

A common problem is unstable serial flashing at higher baud rates. The 4-gang CB3S unit on Tuya firmware 1.3.5 would not flash reliably at the higher speeds offered by the tool, and the user succeeded only at 19200 baud. That points to a connection-quality or board-timing issue, so a slower rate can be the practical fix. [#20748402]

How does patched Tuya firmware 1.3.5 affect using tuya-cloudcutter on a DS-101JL switch?

Patched Tuya firmware 1.3.5 blocks the cloudcutter route described in the thread. The 4-gang owner explicitly notes that version 1.3.5 is listed as patched, so tuya-cloudcutter was not an option and wired serial flashing was required instead. If you see Tuya FW 1.3.5 on a CB3S unit, plan for opening the switch. [#20748402]

What is the difference between OpenBeken and Tasmota for a DS-101JL wall switch, including Athom ESP8285 versions?

OpenBeken fits the BK7231N/BK7231T Tuya variants in this thread, while Tasmota appears on a different Athom hardware branch. The Athom DS-101JL uses a JS-03-8285 controller with an ESP8285 and can be ordered preflashed with Tasmota. That means firmware choice follows the module family: BK7231 devices use the OpenBeken path here, and Athom ESP devices use the ESP/Tasmota path. [#21394793]

How can I rename an OpenBeken device if the automatic DS-101JL device name does not follow the usual MAC-based naming format?

Rename it manually in the OpenBeken interface. After one user reported that the auto-configured name did not match the usual last-4-octets MAC format, the reply showed that you can change the device name in the “Configure names” screen to anything you want. That fixes inconsistent naming without reflashing the switch. [#21395956]

What should I check before buying a DS-101JL for Home Assistant if I want a no-neutral model that can be locally flashed?

Check three things before buying: module family, firmware path, and no-neutral hardware. Confirm the listing or board uses CB3S/BK7231N if you want the same OpenBeken mapping, verify whether Tuya firmware is patched like 1.3.5, and make sure the package includes the parallel capacitor for no-neutral installs. Also remember the same DS-101JL label has appeared with WB3S/BK7231T and Athom ESP8285 hardware. [#20748402]
AI summary based on the discussion. May contain errors.
%}