![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/1281502600_1684234595_thumb.jpg)
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:
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/3326077600_1684232627_thumb.jpg)
The specification reveals that it may be something on the BK7231, because Bluetooth is mentioned in it, the ESP8266 itself does not support BT:
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/2160084300_1684232719_thumb.jpg)
Product Parameters:
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/2320450000_1684232663_thumb.jpg)
Installation:
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/1283454500_1684232679_thumb.jpg)
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:
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/2528153600_1684232773_thumb.jpg)
Parcel received
Let's see what do we get in the package?
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/2633783200_1684232853_thumb.jpg)
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/1436975300_1684232852_thumb.jpg)
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/4087473600_1684232852_thumb.jpg)
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/8464204400_1684232859_thumb.jpg)
The set also includes a capacitor to be mounted in parallel:
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/8086975000_1684233106_thumb.jpg)
Description of the assembly in Polish (a plus for the seller for writing "capacitor" and not an adapter):
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/4340648200_1684233204_thumb.jpg)
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?
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/2047847800_1684233374_thumb.jpg)
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/8495465700_1684233373_thumb.jpg)
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/2663174400_1684233373_thumb.jpg)
And the switch itself:
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/7515896600_1684233308_thumb.jpg)
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/3892821600_1684233307_thumb.jpg)
DS-101JL teardown/b]
We pry the front cover with a screwdriver:
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/1662862900_1684233536_thumb.jpg)
We pry the board, which is held only by a pin connector:
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/2416806200_1684233557_thumb.jpg)
The switch uses the CB3S WiFi module. The chip in the SOIC is not a TuyaMCU, it's just a touch button controller.
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/1251651200_1684233631_thumb.jpg)
PCB designation: A-1011WL3B2-REV A0 2022-08-18
I haven't analyzed the power section yet, but here are some pics:
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/6612050000_1684233669_thumb.jpg)
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/7202904600_1684233671_thumb.jpg)
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/9036033200_1684233670_thumb.jpg)
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/2385249000_1684233679_thumb.jpg)
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/9129865800_1684233681_thumb.jpg)
On the board you can see S7142S:
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/7491278300_1684233748_thumb.jpg)
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/2986236900_1684233764_thumb.jpg)
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:
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/5651256400_1684234129_thumb.jpg)
You can find CB3S pins on the web.
Then we solder the wires:
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/3021670200_1684234181_thumb.jpg)
Ready layout (see BK7231 gui flasher manual):
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/3464849800_1684234206_thumb.jpg)
![[BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant [BK7231N/CB3S] DS-101JL WiFi Single Light Switch Teardown and Flashing Guide for Home Assistant](https://obrazki.elektroda.pl/7759573200_1684234206_thumb.jpg)
BK7231 gui flasher in the latest version can extract the Tuya GPIO configuration The full template is below:
Code: json
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]
Cool? Ranking DIY