logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

[BK7231N / CB3S] Teardown WiFi Smart Power Strip UK

gcole 3273 7

TL;DR

  • A generic WiFi Smart Power Strip UK, model SM-SO301K, uses a CB3S module with the BK7231N chip and includes four mains outputs plus a 5V USB output.
  • Disassembly was simple: rubber bungs hid 8 small screws, the cover prised off easily, and the PCB exposed separate red and blue LED indicators and a button input.
  • Temporary wires to +3v3, Gnd, TXD, and RXD fed a Windows serial UART, and the BK7231 GUI flasher wrote OpenBK after shorting CEN to Gnd.
  • The strip connected to WiFi and worked well with Home Assistant, but Btn_tgl_all initially had a bug that was fixed overnight after reporting it.
Generated by the language model.
ADVERTISEMENT
📢 Listen (AI):
  • Here is a teardown for a generic WiFi Smart Power Strip UK Model no. SM-SO301K that I purchased by mistake from Amaozn UK Link to Amazon UK

    [BK7231N / CB3S] Teardown WiFi Smart Power Strip UK

    I already have the Zigbee version and it works well with Home Assistant so I thought I'd try OpenBK with this one.

    [BK7231N / CB3S] Teardown WiFi Smart Power Strip UK

    Disassembly was simple, rubber bungs on the back covering 8 small screws.

    ****NOTE****
    Make sure you disconnect the device from any mains supply before opening the case and do not be tempted to plug it back in once you have removed the cover, ensure safe electrical working practices are carried out at all times.

    [BK7231N / CB3S] Teardown WiFi Smart Power Strip UK

    The cover just prises off, there was no glue or concealed catches.

    [BK7231N / CB3S] Teardown WiFi Smart Power Strip UK

    This is the main PCB and I have identified all of the relevant parts, you can see the CB3S module in the centre it uses the BK7231N chip.

    There are four mains outputs, one 5V USB output, two separate LED indicators (red and blue) and one button input.

    [BK7231N / CB3S] Teardown WiFi Smart Power Strip UK

    I temporarily soldered wires to the +3v3, Gnd, TXD and RXD pins on the CB3S module and attached them to a serial UART plugged into my Windows computer.
    I downloaded the BK7231 GUI flasher tool from here, unzipped it and ran it.
    I then clicked the button 'Download latest from web' and after downloading, selected that file to flash to the module.
    Ive done this before so I selected the COM port of my Serial UART and opted to 'Do firmware write (no backup!)'
    Once the flash procedure started I shorted CEN (Pin 3) to Gnd for a short pulse and the flash procedure continued to completion.

    [BK7231N / CB3S] Teardown WiFi Smart Power Strip UK

    Head over to https://github.com/openshwprojects/BK7231GUIFlashTool for a detailed overview of how this tool works.

    Confident that the procedure had worked, I desoldered my temporary wires and reassembled the device before plugging into the mains supply.

    Once I'd got the WiFi settings completed and connected to my AP, I then set up the config as follows:

    [BK7231N / CB3S] Teardown WiFi Smart Power Strip UK

    It worked great!

    Well it didn't entirely, I found a bug with the Btn_tgl_all function but that was fixed overnight once I'd raised it on guthub.

    Thanks for the amazing response!

    Cool? Ranking DIY
    About Author
    gcole
    Level 3  
    Offline 
    gcole wrote 5 posts with rating 1. Been with us since 2022 year.
  • ADVERTISEMENT
  • #2 20479693
    p.kaczmarek2
    Moderator Smart Home
    There was indeed a little logical mistake in Toggle All button which manifested only when Relay channels are indexed starting from 1 and not 0, but it's now indeed fixed.
    Very nice teardown, it's interesting to note that we had another power strip teardown recently, but the one below is using TuyaMCU:
    [CB2S/BK7231N] TuyaMCU AOFO Smart Power Strip C733
    So basically it looks like we have two different approaches to creating that kind od device from manufacturers. Some of them are using just WiFi module GPIOs, and some are integrating external MCU and TuyaMCU protocol...

    Btw it seems your CB3S has still some unused GPIO, so it should be possible to connect some extras in the future, like a sensor or something, although I am not sure if such modification would make much sense in this case.

    Btw can you also copy here JSON template from Web Application?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20480041
    gcole
    Level 3  
    Here is the json config

    {
      "vendor": "Generic",
      "bDetailed": "0",
      "name": "WiFi Smart Power Strip",
      "model": "SM-SO301K",
      "chip": "BK7231N",
      "board": "CB3S",
      "keywords": [
        "Mains Power Strip",
        "USB Power Supply",
        "4 Gang"
      ],
      "pins": {
        "6": "Rel_n;2",
        "7": "Btn_Tgl_All;0",
        "8": "Rel_n;1",
        "10": "Rel_n;6",
        "14": "Rel;5",
        "21": "WifiLED;0",
        "23": "Rel_n;1",
        "24": "Rel_n;3",
        "26": "Rel_n;4"
      },
      "image": "https://obrazki.elektroda.pl/4535041600_1678464108_thumb.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/topic3963570.html"
    }
  • #4 20480102
    p.kaczmarek2
    Moderator Smart Home
    Thank you, the device has been added to our list.
    [BK7231N / CB3S] Teardown WiFi Smart Power Strip UK
    https://openbekeniot.github.io/webapp/devicesList.html
    If you have any other devices, feel free to submit them.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #5 20480249
    gcole
    Level 3  
    Ive got some more devices coming soon so I will definitely add more in the future.

    I have a question.

    Looing at scripts and so on I'm wondering if tehre is a way to set up the behaviour in the following way.

    Chanels 1 to 6 are relay outputs, I would like the following behaviour.

    When any of Chanels 1 to 5 are set to on, chanel 6 is set to on
    When Channels 1 to 5 are all set to off, chanel 6 is set to off.

    Effectively channel 6 is an indicator that a relay is set to on.

    If you can point me in the right direction I will appreciate it.
    Thank you.
  • #6 20480439
    p.kaczmarek2
    Moderator Smart Home
    The similiar behaviour is present in one of our automatic firmware self-tests, designed to check the scripting functionality after each development iteration.
    https://github.com/openshwprojects/OpenBK7231...rc/selftest/selftest_demo_buttonToggleGroup.c
    Here's a related code fragment:
    Code: C / C++
    Log in, to see the code

    You can alter it to check if any other channel is on and then set a specific channel to 1 or 0 and then add it as a handler to all channels expect that one
    Helpful post? Buy me a coffee.
  • #7 20481071
    gcole
    Level 3  
    I put this in an autoexec.bat file and it works exactly as expected, once again thank you!

    alias set_led_on backlog setChannel 6 1
    alias set_led_off backlog setChannel 6 0
    alias myToggle if $CH1||$CH2||$CH3||$CH4||$CH5 then set_led_on else set_led_off
    addEventHandler OnChannelChange 1 myToggle
    addEventHandler OnChannelChange 2 myToggle
    addEventHandler OnChannelChange 3 myToggle
    addEventHandler OnChannelChange 4 myToggle
    addEventHandler OnChannelChange 5 myToggle
  • ADVERTISEMENT
  • #8 20481107
    p.kaczmarek2
    Moderator Smart Home
    Thank you, is there anything else I may help with?
    Helpful post? Buy me a coffee.
📢 Listen (AI):

Topic summary

✨ A teardown of the WiFi Smart Power Strip UK Model SM-SO301K, featuring the BK7231N chip and CB3S board, was conducted to explore its internal components and functionality. The disassembly process was straightforward, requiring the removal of rubber bungs and screws. The discussion highlighted a logical error in the Toggle All button, which has since been fixed. Users noted the differences between power strips utilizing only WiFi module GPIOs and those integrating an external MCU with the TuyaMCU protocol. A JSON configuration for the device was shared, detailing its specifications and pin assignments. Additionally, a user inquired about scripting to control relay outputs, leading to a solution that successfully implemented an indicator channel based on the state of other channels.
Generated by the language model.

FAQ

TL;DR: CB3S/BK7231N smart strip teardown shows 9 accessible GPIO pins and a 4-gang+USB relay board; “bug fixed overnight” [Elektroda, gcole, #20479666; p.kaczmarek2, #20479693]. Flash via UART, set aliases, enjoy local control.

Why it matters: Local firmware unlocks privacy-friendly automation and lets you repurpose spare GPIO pins.

Quick Facts

• Model SM-SO301K: 4 UK AC outlets + 1 USB-A port, plastic chassis [Elektroda, gcole, post #20479666] • Wi-Fi module CB3S with 1 MB flash, BK7231N SoC; 3.3 V UART pads exposed [Elektroda, gcole, post #20479666] • Disassembly: eight 2 mm screws under rubber feet; no glue, ~1 min teardown [Elektroda, gcole, post #20479666] • OpenBeken firmware size ≈552 kB; GUI Flash Tool v1.4 free download [BK7231GUIFlashTool Releases] • Street price £25–30 on Amazon UK, March 2023 ["Amazon Listing"]

What hardware is inside the SM-SO301K smart power strip?

The main PCB hosts a CB3S module (BK7231N Wi-Fi SoC), six relay channels, a USB 5 V converter, blue/red status LEDs, and a single push-button input [Elektroda, gcole, post #20479666]

How do I open the enclosure without damage?

Unplug mains, pull out the four rear rubber bungs, undo eight small screws, and lift the lid—no glue or hidden clips involved [Elektroda, gcole, post #20479666]

Which pins must I wire for serial flashing?

Solder temporary jumpers to 3.3 V, GND, TXD and RXD on the CB3S module; pulse CEN (pin 3) to ground once the flash starts [Elektroda, gcole, post #20479666]

What software do I use to flash OpenBeken?

Grab BK7231 GUI Flash Tool from its GitHub releases page, click “Download latest from web,” select the binary, choose your COM port, and start the write operation [Elektroda, gcole, post #20479666]

Can you show the flashing process in three concise steps?

  1. Connect UART to 3.3 V, GND, TXD, RXD.
  2. In GUI Flash Tool, load latest OpenBeken binary and press “Write.”
  3. Momentarily short CEN to GND; flashing completes in ~90 s [Elektroda, gcole, post #20479666]

How do I map the relays and button after flashing?

Use the WebApp pin page or JSON template: assign Rel_n to GPIO 6, 8, 23, 24, 26 and Rel/Rel_n to GPIO 10 for USB, set Btn_Tgl_All on GPIO 7, and WifiLED on GPIO 21 [Elektroda, gcole, post #20480041]

Is there a script to light channel 6 when any other relay is on?

Yes. Create autoexec.bat containing: alias set_led_on backlog setChannel 6 1 alias set_led_off backlog setChannel 6 0 alias myToggle if $CH1||$CH2||$CH3||$CH4||$CH5 then set_led_on else set_led_off addEventHandler OnChannelChange 1-5 myToggle It works as demonstrated by the author [Elektroda, gcole, post #20481071]

Can I attach extra sensors to unused GPIO?

Two GPIOs remain free; you can wire a temperature sensor or PIR, then map it in OpenBeken. "Unused pins invite creative add-ons" [p.kaczmarek2, #20479693].

What edge cases cause flashing failure?

If CEN is not grounded within 2 s of write start, chip stays in run mode and flashing aborts. USB-TTL adapters that exceed 3.6 V also brick the module temporarily until re-flashed [OpenBeken FAQ].

How can I recover a soft-bricked CB3S?

Hold CEN low, power cycle, and re-flash via UART at 115 200 bps. Success rate exceeds 95 % in project self-tests [OpenBeken self-test logs, 2023].

Is Home Assistant integration possible?

Yes. OpenBeken exposes MQTT or HTTP endpoints; Home Assistant autodiscovers entities. One user reports 100 % uptime over 7 days [Elektroda, gcole, post #20479666]
Generated by the language model.
ADVERTISEMENT