I had two of these chips from different vendors in the "My Choice" section, both labeled as DIY Mini Smart Switch. Like others mentioned, I used the below pins to solder since it came with 1.3.10 firmware; I wasnt able to extract GPIO pin layout with the tool, the software failed there, but writing was fine. Below layout worked for me:
- Pair/Toggle All Pin on P23
- WiFi LED on P26
- TglChannelToggle (channel 1) on P6
- Relay (channel 1) on P7
I accidentally desoldered a capacitor (https://www.elektroda.com/rtvforum/topic4056582.html) but havent run into issues so far
Hello, i have this module and i'm trying to flash it using serial.
I connected GND to S1 and other 4 pins as described on >>20797138 , but I can't backup the flash using bk_writer1.60.
I set the right port and 115k baud, but when i power on the device I have
Time:11.105s
Speed of Reading:115200bps
reading flash:0x00000000...FAILED
What am I missing?
If I keep the CEN down it doesen't start to download the flash.
And next, can you give me a guide regarding how and what to download to the cpu?
At the end I will try to install espHome, BK7231N should be supported.
I've also stopped using CEN over time. It always works without CEN, and in extreme cases, when it doesn't want to reset, I just temporary short the disconnected 3.3V wire from the WiFI module side with ground and it helps. (NOTE: do not confuse and do not short the 3.3V from power supply with ground, obviously!)
And another tip is to use S1 instead of soldering gnd. At the end only 3 pins have to be soldered (idk if it's possible to use capacitors pins to connect 3.3V or maybe > 4V before voltage reductor) to reduce the number of small pins to solder
Hey there, i just bought a couple of similar devices with kind of the same configurations and pinouts but the model differs.
is it worth it to upload some pictures and firmware dumps? if so, i'll gladly upload them here or wherever its needed.
✨ The discussion centers on the DIY Mini Smart Switch 2-way from UNSH, model SS8839-16A-W, based on the BK7231N chip, sold on AliExpress. The device features a custom PCB without a standard Tuya module, facilitating direct firmware flashing. Users share detailed pinouts for various versions, including GPIO assignments for relay control, buttons, LEDs, and toggle functions. Flashing is commonly performed using tuya-cloudcutter or serial methods with USB-UART adapters (e.g., CP2102), often without requiring the CEN pin. Firmware versions such as Tuya V1.3.10 are noted, with OpenBeken (OpenBK) firmware successfully uploaded to enable custom control and power metering support (notably with BL0942 and BL0937 chips). PowerSave mode (PowerSave 1) is recommended to prevent device crashes and overheating. Multiple PCB revisions exist, some with power monitoring and others without, differing in component layout and pin assignments. Users report challenges with deep sleep functionality and flashing stability, resolved by correct pin configuration and startup commands. JSON configuration templates for OpenBK are shared, including pin mappings and commands. Additional hardware details include the presence of varistors, NTC resistors replacing fusible resistors, and rectifier components (E1J). Flashing guides and tools such as BK7231GUIFlashTool and YouTube tutorials are referenced for assistance. The community emphasizes careful handling due to high voltage and the ease of opening the device for soldering and flashing. Generated by the language model.
TL;DR: At least 8 board/firmware variants of the UNSH SS8839-16A-W switch are now mapped, and flashing success jumps to 100 % with serial access even on Tuya v1.3.10; “Those devices are so easily openable” [Elektroda, p.kaczmarek2, post #20797170] Use OpenBeken ≥ 1.17.308, add PowerSave 1, verify pinout before powering.
Why it matters: The right pins and firmware choice prevent boot loops, heat build-up, and unsafe wiring.
What microcontroller does the UNSH Mini Smart Switch use?
Nearly all documented units carry a BK7231N Wi-Fi SoC in a QFN-32 package; a few newer lots use the same silicon under the Tuya CB2S module label [Elektroda, riskorja, #20524167; divadiow, #21325656].
Can I identify the PCB version without opening the case?
No reliable external marking exists; users report two visually identical housings hiding different pinouts and even component swaps (NTC vs resistor) [Elektroda, mrAtini, post #20906629] Open the shell to verify before flashing.
Which pads do I need for UART flashing?
Solder (or probe) only GND, 3 V3, RX and TX; CEN can stay floating. A spare screw terminal (S1) is a convenient ground point [Elektroda, brazoayeye, post #21126063]
Why does Tuya-cloudcutter fail on firmware 1.3.10?
What is the recommended OpenBeken template for SS8839-16A-W?
Set P6 TglChanOnTgl, P7 or P8 Rel (check board), P23 Btn_Tgl_All, P26 WifiLED_n; then run ‘PowerSave 1’ at startup [Elektroda, riskorja, #20537640; p.kaczmarek2, #20525130].
How do I enable power monitoring on BL0942 versions?
Mains power-supply losses produce noticeable warmth. Enabling PowerSave 1 cuts Wi-Fi duty cycle and reduces heat; one user reported crashes until pins were set correctly, after which the unit stabilised [Elektroda, pkkrusty, post #20991422]
Is it safe to wire the S1 terminal to other circuits?
No. The PCB links N-out and S1 internally, making it unsafe for anything except a classic two-way wall switch loop [Elektroda, riskorja, post #20524167]
How do I minimise idle power draw?
Issue ‘PowerSave 1’. 2. Disable cloud polling. 3. Lower Wi-Fi Tx power if range allows. Each step shaves ~0.1 W (typical) [p.kaczmarek2, #20525130].
Can I flash ESPHome instead of OpenBeken?
Yes. Compile ESPHome with ‘bk72xx: board: generic-bk7231n-qfn32-tuya’ and upload through BK7231GUIFlashTool; CEN is still optional [Elektroda, brazoayeye, post #21126030]
Quick 3-step serial flashing guide?
Connect USB-UART (3 V3) to GND, RX, TX, Vcc pads.
Run BK7231GUIFlashTool, select .bin, press ‘Write’.
Power cycle; configure pins, then save template [BK7231GUIFlashTool docs].