[BK7231N / CB3S] Teardown WiFi Smart Power Strip UK
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
I already have the Zigbee version and it works well with Home Assistant so I thought I'd try OpenBK with this one.
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.
The cover just prises off, there was no glue or concealed catches.
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.
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.
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:
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!

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

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.

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

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.

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.

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:

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!
Comments
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... [Read more]
Here is the json config { "vendor": "Generic", "bDetailed": "0", "name": "WiFi Smart Power Strip", "model":... [Read more]
Thank you, the device has been added to our list. https://obrazki.elektroda.pl/7326561400_1678482434_thumb.jpg https://openbekeniot.github.io/webapp/devicesList.html If you have any other devices,... [Read more]
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... [Read more]
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/OpenBK7231T_App/blob/main/src/selftest/selftest_demo_buttonToggleGroup.c Here's... [Read more]
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... [Read more]
Thank you, is there anything else I may help with? [Read more]