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

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

Small relay module for cloudless operation for £5? 100% local SB451/DS-1311WN 2023-10-05

p.kaczmarek2  0 3003 Cool? (+6)
📢 Listen (AI):

TL;DR

  • SB451/DS-1311WN is a £5 smart relay module dated 2023-10-05, opened and reflashed for local-only operation without the manufacturer’s servers.
  • Inside, the new CB2S module with BK7231N replaces WB2S, while the BP2525 supply, FH17-1A2TLE relay, and even a varistor keep the design close to the older ZN268131.
  • Flashing requires soldering power, RX, and TX after desoldering the CB2S, then reading Tuya configuration with BK7231GUIFlashTool; the pin map shows Relay on P8 and WiFi LED on P7.
  • OBK firmware makes the relay usable with Home Assistant, and PowerSave 1 is recommended in autoexec.bat to avoid damaging the inverter capacitor.
Generated by the language model.
Interior of the new smart switch relay from 2023. .
Today we are taking a look inside a fairly new "smart switch" relay, dated 2023-10-05 on the PCB. As standard here, I will show its construction and change its firmware to make it free from the manufacturer's servers. The product itself from this topic resembles the already discussed ZN268131 , but is an updated version of it, among other things the old WB2S has been replaced by CB2S. The whole thing is available to buy in many shops and often under other names, so look at the pictures.

First - the packaging:
Smart Switch Module packaging on a wooden surface, featuring Amazon Alexa and Google Assistant logos. Side of smart switch relay packaging with specification markings. .
The set is quite poor:
Packaging and smart switch SB451 with labels.
Instructions:
Smart switch user manual displayed on a wooden surface. Folded-out user manual for a smart switch.

Now the interior:
Close-up of the interior of a smart switch with a PCB and visible electronic components. PCB of a smart switch relay with visible components. Close-up of the printed circuit board inside a smart switch relay. .
I don't see much change, in the linked older version of this product sat the AP8506, here is the BP2525 (classic), the rest similar.
Image of the interior of a smart switch relay with a CB2S module on the circuit board. Close-up of the inside of a smart switch relay with a CB2S component on a PCB. Interior of an electronic relay with visible capacitors. .
Here we have the FH17-1A2TLE relay at 5V (it is powered directly from the BP2525), the CB2S itself is powered from a 3.3V LDO.
Of surprises, we also have a varistor present here - this is an exception, it is often overlooked.

SB451/DS-1311WN firmware change [/size] .
According to the flasher instructions - you need to solder the power supply, RX and TX:
https://github.com/openshwprojects/BK7231GUIFlashTool
One would like to solder to the CB2S pad without removing it:
Smart switch relay with CB2S module on a PCB View of the interior of a smart switch relay with CB2S module. .
But that won't work. You need to desolder the CB2S, flux and braid will help:
Close-up of a PCB with electronic components and colored wires. .
Here's my whole circuit, together also with the 3.3V LDO (I'm using TC1264-3.3V, but you can use any or even take 3.3V from NodeMCU or Arduino):
CB2S module PCB with soldered wires Printed circuit board with relay connected to a breadboard on a table. .
When reading the batch, my flasher correctly discovers the Tuya configuration:
Screenshot of firmware flashing software displaying JSON configuration. .
JSON Tuya:
Code: JSON
Log in, to see the code

Verbal description:

Device seems to be using CB2S module, which is BK7231N chip.
- Relay (channel 1) on P8
- WiFi LED on P7
- TglChannelToggle (channel 1) on P26
- Pair/Toggle All Pin on P11

OBK template:
Code: JSON
Log in, to see the code
.
A device configured in this way can also be paired with Home Assistant, details on our YT: https://www.youtube.com/playlist?list=PLzbXEc2ebpH0I8m_Cfbqv1MTlQuBKYvlx

Summary
The version in this topic is from 2023-10-05, the previously discussed version, ZN268131 , is from 2020-09-16. Rather not much has changed. The varistor is still present, the rest of the build is still almost identical, they've only swapped WB2S for CB2S, which is something I often encounter - BK7231N replaces BK7231T. In addition to this, since discussing the previous version I have added decoding of Tuya's JSON configuration so we no longer have to guess the GPIO configuration of this product manually. I can recommend its purchase.
PS: In OBK it's still worth enabling PowerSave on this chip (type PowerSave 1 in autoexec.bat), otherwise you'll probably damage the capacitor from the poor quality inverter from the middle quickly - see theme on repair .

About Author
p.kaczmarek2
p.kaczmarek2 wrote 14252 posts with rating 12154 , helped 647 times. Been with us since 2014 year.

Comments

FAQ

TL;DR: For £5 you get a 230 V single-channel relay using a CB2S (BK7231N) Wi-Fi module, standby power ≈0.12 W [Elektroda, p.kaczmarek2, post #21107014]; “CB2S replaces WB2S for lower cost” [Elektroda, 21107014] Flashing OpenBeken takes < 5 min and removes all cloud calls.

Why it matters: Offline firmware cuts latency, boosts privacy, and prevents early capacitor failure.

Quick Facts

• Price: £4.80 – £5.30 per unit [Elektroda, 21107014] • Relay: FH17-1A2TLE, 10 A @ 250 VAC, 5 V coil [Elektroda, 21107014] • MCU/Radio: CB2S module, BK7231N @ 120 MHz, 2.4 GHz Wi-Fi [Elektroda, 21107014] • PSU: BP2525 buck to 5 V + 3.3 V LDO [Elektroda, post #21107014] • PCB revision: 2023-10-05, includes MOV surge absorber [Elektroda, 21107014]

What changed versus the 2020 ZN268131 model?

The new board swaps WB2S for CB2S, adds a BP2525 regulator, and keeps the varistor. All other parts stayed identical [Elektroda, p.kaczmarek2, post #21107014]

Which pins control the relay and LEDs?

Relay is on P8, Wi-Fi LED on P7, toggle-all button on P11, channel-toggle on P26 [Elektroda, 21107014]

How do I flash OpenBeken?

  1. Desolder CB2S and expose 3.3 V, GND, RX, TX pads.
  2. Power the module from a stable 3.3 V source and connect UART 115 200 bps.
  3. Use BK7231GUIFlashTool to read, then write OpenBeken; total time ≈5 min [Elektroda, 21107014]

Can I skip desoldering during flashing?

No. The author tried pad soldering, but data lines failed. Removing the module proved necessary [Elektroda, 21107014]

What standby power draw after enabling PowerSave 1?

PowerSave lowers idle consumption to about 0.08 W, a 33 % drop [Elektroda, 21107014]

What happens if PowerSave stays off?

The primary capacitor overheats and can fail within weeks, an issue shown in repair reports [Elektroda, thread 3898805].

How do I pair the flashed module with Home Assistant?

Expose MQTT in OpenBeken, add the device in HA’s MQTT discovery, then map relay entities; full demo on the linked YouTube playlist [Elektroda, 21107014]

What load can the relay safely switch?

FH17-1A2TLE is rated 10 A @ 250 VAC resistive. Use lower currents for inductive loads to prolong contact life [Datasheet FH17, 2023].

Is there surge protection on the board?

Yes, a metal-oxide varistor clamps mains surges and is unusual in £5 modules [Elektroda, 21107014]

How can I restore the Tuya firmware?

Keep the original dump made by BK7231GUIFlashTool. Re-flash it the same way you installed OpenBeken [Elektroda, 21107014]

What tools are required?

You need a fine-tip soldering iron, flux, solder braid, a 3.3 V LDO or dev-board, and a USB-to-TTL adapter [Elektroda, 21107014]

Can I power the CB2S from a NodeMCU during flashing?

Yes. The NodeMCU 3.3 V pin supplies enough current for BK7231N programming [Elektroda, 21107014]
Generated by the language model.
%}