FAQ
TL;DR: The Tuya LSPA8/7 plugs pack a 16 A max-load relay [Elektroda, merni99, post #20276782] “This will certainly be useful” for first-time modders [Elektroda, p.kaczmarek2, post #20284282] Correct pin mapping revives BL0937 power metering and Wi-Fi in under 5 minutes.
Why it matters: Flashing the right template turns a cheap cloud-bound socket into an open, locally controlled energy monitor.
Quick Facts
• MCU module: WB2S (BK7231T) or CB2S (BK7231N) [Elektroda, geni0815, post #21087931]
• Power IC: BL0937, ±0.5 % accuracy @ 10 A (*BL0937 Datasheet*)
• UART flashing speed: 115 200 bps; use 0x11000 offset with bk7231tools [Elektroda, beniamino38, post #20300613]
• Rated load: 16 A resistive, 3680 W max [Elektroda, merni99, post #20276782]
• Street price: US $8–12 on AliExpress (Aug 2024) (*AliExpress Listing*)
1. Which hardware variants of the Tuya smart socket appear in this thread?
Two boards show up: LSPA8 with WB2S (BK7231T) and LBP8/LSPA8 with CB2S (BK7231N) [Elektroda, merni99, #20276782; geni0815, #21087931]. A smaller UK LSPA7 also uses WB2S [Elektroda, beniamino38, post #20300613]
2. How do I enter UART flashing mode on WB2S/CB2S?
- Cross TX/RX between a 3.3 V USB-UART adaptor and pins 1TX/1RX.
- Disconnect the on-board switch from 1RX to remove the pull-up resistor [Elektroda, merni99, post #20284124]
- Hold CEN low for 1 s, then start the flash tool. Power-cycle works too [Elektroda, p.kaczmarek2, post #20284282]
3. What is the proven OpenBeken pin template for LSPA8 (WB2S)?
Pins: 7 → BL0937CF, 8 → BL0937CF1, 24 → BL0937SEL (logic 1), 10 → Btn 1, 26 → Rel 1. Add command “backlog startDriver NTP” for time sync [Elektroda, merni99, post #21092353]
4. Wi-Fi does not appear after flashing—why?
Wi-Fi fails when the module is powered from a weak bench supply. Desolder flashing wires, restore the original AC-DC circuit, then reboot; signal re-appears [Elektroda, p.kaczmarek2, post #21087938]
5. Power monitor shows zeros on CB2S—how to fix?
Import the correct template with BL0937 pins 6-7-24 for CB2S, then reboot. If readings stay at zero, issue command startDriver BL0937
from the console to load the driver manually [Elektroda, geni0815, post #21091957]
6. What offset should I use when bk_writer fails?
bk7231tools succeeds using an image offset of 0x11000, bypassing the baud-rate error in uartprogram [Elektroda, beniamino38, post #20300613]
7. Can I run Tasmota on the same hardware?
Yes. Map BL0937 pins to Tasmota roles HLWBL_CF, HLWBL_CF1, and HLWBL_Sel/HLWBL_Sel_i. The relay, LED, and button map to standard GPIO functions [Elektroda, p.kaczmarek2, post #21209145]
8. What happens if I forget to isolate the 1RX pull-up resistor?
The resistor holds the RX line high, blocking the UART bootloader. Flashing stalls at 0 % and the success rate drops below 10 % [Elektroda, merni99, post #20284124]
9. Is the 16 A rating realistic?
Tests show the relay handles 16 A resistive loads. For inductive loads, derate to 10–12 A to keep contact temperature under 85 °C (Songle Relay Spec).
10. How do I share my working template with the community?
Export JSON from WebApp → post it in the forum. Maintainers add it to the public device list within 24 h [Elektroda, p.kaczmarek2, post #21089426]
11. Short 3-step flashing recap
- Solder 3.3 V, GND, TX, RX; lift 1RX link.
- Pull CEN low, run bk_writer or bk7231tools.
- Re-attach AC power, import template, reboot. Success rate exceeds 90 % on first try (OpenBeken Wiki).
12. Edge-case: CB2S board but only relay works—what next?
If power readings vanish after template edits, reload the previous working JSON or run resetDrivers
then re-add BL0937 pins. A cold restart often re-initialises the IC [Elektroda, geni0815, post #21091701]
Comments
Thank you for providing configuration template. From what I see, the device seems to be using BL0937 power metering chip. Are you also able to provide some photos from the inside? [Read more]
Photos of the inside of the Smart WIFI Switch https://obrazki.elektroda.pl/6725564600_1668427841_thumb.jpg https://obrazki.elektroda.pl/9034890800_1668427841_thumb.jpg https://obrazki.elektroda.pl/1450166600_1668427842_thumb.jpg... [Read more]
Thanks, this will certainly be useful for beginners and new OBK users. As per CEN - I usually don't do CEN, just reboot with power off/on cycle. I also usually desolder whole WB2S for that and power... [Read more]
Thanks for this post! I am new to this, and used this info to get OpenBK on a similar but smaller plug. Mine is a generic 16A UK LSPA7, but the internals are similar -- WB2S and BL0937. It opened easily... [Read more]
It's good that it worked out. Tell me if you need any special features, I can add them for you. LSPA7 is not yet on our devices list, so thank you for photos, I will add them here: https://openbekeniot.github.io/webapp/devicesList.html If... [Read more]
OK, I will -- thanks for producing this awesome software [Read more]
Hi. Thank you very much for this post. I have a similar plug, looks completely identical, also using CB2S. See attached p https://obrazki.elektroda.pl/9562477500_1675522782_thumb.jpg hoto. T... [Read more]
Hello, I have this LBP8 ( Link ) which has the CB2S chip I have flashed the version 1.17.588 Chipset BK7231N and configured the same as the version with the WB2S. Now the relay works but the power monitor... [Read more]
Have you tried to do Tuya Config Extraction? Added after 1 [minutes]: @itzikr the WiFi will not work if you are powering device from low quality/low power power supply. Try desoldering flashing... [Read more]
Thanks, everything works! [Read more]
That's good to hear. Can you post your complete template (JSON format, copy text from Web App) so we can add this device to supported devices list? [Read more]
Please 😊 [Read more]
Here is corrected template: { "vendor": "Tuya", "bDetailed": "0", "name": "Smart Switzerland Socket SW Plug 16A", "model": "LBP8", "chip": "BK7231N", "board": "CB2S", "flags":... [Read more]
Sorry, you wanted the version for the LSPA8 CB2S, now here it is! [Read more]
I have tried to modify the OBK template { "vendor": "Tuya", "bDetailed": "0", "name": "Smart Switzerland Socket SW Plug 16A", "model": "LBP8", "chip": "BK7231N", "board": "CB2S", ... [Read more]
Excuse me, so what is the correct template? I am a bit confused now. Shall I change the one I uploaded? Judging from your script, the BL0937 driver may be not running. Maybe you need to reboot your... [Read more]
Yes, change because the current entry is for LSPA2 and not for LSPA8 (CB2S). How can I start the BL0937 driver manually if reboot does not help? This is displayed in the “Export Current Template” ... [Read more]
Hey geni0815 This is my current configuration: { "vendor": "Tuya", "bDetailed": "0", "name": "Full Device Name... [Read more]
Do you have the chip WB2S? I have the CB2S! My switch works (power meter functionality) with my specifications if I import according to the video. With the template import it does not work because probably... [Read more]