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

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

[BK7231T/WB2S] WiFi relay MS-101 16A SWT89 with energy measurement

p.kaczmarek2  5 3801 Cool? (+4)
📢 Listen (AI):

TL;DR

  • MS-101/SWT89 is a Moes Smart Switch single-relay module with energy measurement, built around a WB2S BK7231T WiFi module and a separate WMetBLi1 V1.0 meter board.
  • The mains stage includes a varistor, bridge rectifier, two electrolytic capacitors, a choke, and a BP2525 supply feeding 5V and AMS1117-3.3V rails.
  • The relay uses P26, the button P10, the WiFi LED P6, and the BL0937 energy chip uses P7, P8, and P24; the shunt resistor is R002.
  • OpenBK7231T_App can replace the factory firmware through BK7231 Easy GUI Flasher after wiring power, RX, and TX to the WB2S module, and a full OBK template is included.
Generated by the language model.

Today I will present another Moes Smart Switch single relay module, this time distinguished by the fact that it additionally offers energy measurement. I will analyze its interior (main PCB and modules: WiFi and energy measurement) and show how to change its firmware so that it can be released from the manufacturer's cloud. Finally, I will provide a full product template, this time fully automatically exported from the Tuya configuration in JSON format.

Purchase, packaging, kit content
MS-101 was purchased from the Polish shipping service:

Initially, the name was SW SWT89, now it's just SW.

parameters:
Quote:

Power supply: 90-250V AC (50/60Hz)
Maximum current: 16A
Maximum load: 3520W
Dimensions: 88x38x22mm
White color
Operating humidity: 5-95%
WiFi frequency: 2.4 GHz (does not work with 5 GHz)
Working temperature: -20 -75 degrees

This is how it looks in the manufacturer's application, which I have not tested:

Actual Packing:

Kit Contents:

QR code for the manual:


Interior of the MS-101
As with other products of this type in this case, all you have to do is pry:

Immediately inside a positive surprise. Varistor? Or even the X2 capacitor? Many manufacturers do not care a bit about such things, I met such relays only with a fuse resistor ... it is better than usual.
Then as standard, behind the bridge there are two electrolytic capacitors and a choke between them, then there is probably a converter without galvanic separation, on the PCB you can also see a separate WiFi module and an energy measurement module:

This energy measurement module is marked WMetBLi1 V1.0. You can also see the current/voltage shunt resistor, R13, coded R002, which is probably 0.02 ohms.
The WiFi module is WB2S, BK7231T, it is known:


View from above:

What does this 5V (and then 3.3V for AMS1117-3.3V) provide for this chip?

There is BP2525.

Another bottom of the PCB:

I desoldered it to take better pictures both modules (to change the firmware, you only need to desolder the WiFi module, and sometimes you can do without it). First we apply the flux, then we collect the tin with a braid:

Released modules:

So WMetBL11 V1.0 is a module for measuring energy ...

This is the module from BL0937, along with the basic "hardware", but not complete, the current measuring resistor (shunt) is on the main PCB:



Firmware change...
By default, we use BK7231 Easy GUI Flasher:
https://github.com/openshwprojects/BK7231GUIFlashTool
You can rely on our videos:
https://www.youtube.com/playlist?list=PLzbXEc2ebpH0CZDbczAXT94BuSGrd_GoM
The module is WB2S (BK7231T):

Solder the power supply, RX, TX:

Whole layout:

Verbal description of the pins:

Device seems to be using WB2S module, which is BK7231T chip.
- Relay (channel 1) on P26
- WiFi LED on P6
- Button (channel 1) on P10
- BL0937 ELE on P7
- BL0937 VI on P8
- BL0937 SEL on P24

OBK template:
Code: JSON
Log in, to see the code


Summary
I have already seen this type of "smart" modules in the version without energy measurement and I was wondering what the second, free slot in the PCB could be for ... I thought it was for another WiFi module, but nothing more wrong - it was always for the module energy measurement, such as presented here in the topic. Anyway, you would rather not have two slots for the WiFI module in the PCB of the relay, because from what I've seen, all these "standing" modules have a very similar, compatible footprint. There is a whole family of them: CB2S, FL_M99_V1, TYWE2S, TYZS6, TW-02, WR2, WB2, WBR2, WR2E, WB2S, WA2, XT-BL02 - all compatible with ESP-02S. Only that here you do not need to change WB2S, just upload:
https://github.com/openshwprojects/OpenBK7231T_App
As for the rest - the construction of this gadget is good, the manufacturer did not even omit the varistor, this is something. The price, in turn, is slightly higher than some sonoffs, but here we have the energy measurement ...

About Author
p.kaczmarek2
p.kaczmarek2 wrote 14622 posts with rating 12641 , helped 655 times. Been with us since 2014 year.

Comments

nomek 13 Jul 2023 12:58

Well, the "energy meter" - does it work correctly? [Read more]

p.kaczmarek2 20 Jul 2023 11:37

Energy measurement is carried out on the standard BL0937 chip, very popular in this type of products, right next to its brother BL0942. I did not perform precise measurements precision tests, but it is... [Read more]

nomek 20 Jul 2023 12:03

I was asking more in the context of "does it work at all"... because, for example, in this thread https://www.elektroda.pl/rtvforum/topic3945009.html also on BL0937 it doesn't work.... [Read more]

p.kaczmarek2 20 Jul 2023 12:18

@nomek unfortunately you are quite confusing two separate issues here, but no problem, I can clarify. OpenBeken is my alternative batch for IoT devices using WiFi modules other than ESP8266. It now includes... [Read more]

nomek 20 Jul 2023 12:33

See, I messed up... There is still the issue of the same MAC after flashing.. Maybe you'd like a single socket for a "breakdown" then? [Read more]

FAQ

TL;DR: The MS-101 is a 16 A / 3520 W WiFi relay, and the thread’s bottom line is simple: "just upload" OpenBeken to the WB2S/BK7231T module instead of replacing hardware. This FAQ helps DIY users flash it, map its pins, and keep BL0937 energy monitoring working without the Tuya cloud. [#20652440]

Why it matters: This relay combines local control and power measurement, so correct flashing and pin mapping decide whether you get a useful Home Assistant-ready switch or just a cloud-tied relay.

Option WiFi platform Energy metering Cloud dependence Thread verdict
MS-101 with stock firmware WB2S / BK7231T Yes, via BL0937 Yes Works, but stays in vendor ecosystem
MS-101 with OpenBeken WB2S / BK7231T Yes, supported No Best option for local control
BL602-based device with OpenBeken BL602 BL0937 not supported yet No Not ready for this meter path

Key insight: You do not need to replace the WB2S module in this MS-101. Flashing OpenBeken on BK7231T preserves relay control and keeps BL0937 energy functions available on supported Beken platforms. [#20661018]

Quick Facts

  • Electrical rating from the thread: 90–250 V AC, 50/60 Hz, 16 A max, 3520 W max load, and 2.4 GHz WiFi only; it does not work on 5 GHz. [#20652440]
  • Physical specs listed for the MS-101 are 88 × 38 × 22 mm, operating humidity 5–95%, and working temperature -20 to 75°C. [#20652440]
  • The relay uses a WB2S WiFi module built on BK7231T, plus a separate WMetBLi1/WMetBL11 V1.0 metering board tied to a BL0937 measurement chip. [#20652440]
  • Safety-related parts visible inside include a varistor, an X2 capacitor, two electrolytic capacitors with a choke after the bridge, and a BP2525 supply section feeding 5 V and then 3.3 V through AMS1117-3.3V. [#20652440]

How do I flash OpenBeken onto a Moes MS-101 16A SWT89 relay with a WB2S/BK7231T module using BK7231 Easy GUI Flasher?

Flash it through the WB2S serial interface with BK7231 Easy GUI Flasher. 1. Open the relay and access the WB2S module. 2. Solder the serial power, RX, and TX connections shown in the thread. 3. Use BK7231 Easy GUI Flasher to upload OpenBeken for BK7231T. The author notes that only the WiFi module needs desoldering for firmware work, and sometimes even that is unnecessary. [#20652440]

What pin mapping should I use for the MS-101 16A SWT89 in OpenBeken, including the relay, button, WiFi LED, and BL0937 energy measurement pins?

Use the thread’s exported OpenBeken template. Relay channel 1 is P26, the WiFi LED is P6, the button is P10, BL0937 ELE/CF is P7, BL0937 VI/CF1 is P8, and BL0937 SEL is P24. The JSON template maps them as Rel;1, Btn;1, WifiLED_n;0, BL0937CF;0, BL0937CF1;0, and BL0937SEL;0. [#20652440]

What is the BL0937 chip, and how does it handle voltage, current, and power measurement in smart relays like the MS-101?

"BL0937" is an energy-measurement IC that reads electrical load data, uses pulse-style outputs for metering signals, and appears widely in smart relays. In the MS-101, it works with the separate metering board and the main PCB shunt resistor marked R002, while OpenBeken maps its CF, CF1, and SEL lines to GPIOs for voltage, current, and power processing. [#20652440]

What is the WB2S module with BK7231T, and why is it commonly used in Tuya-based WiFi switches?

"WB2S" is a Tuya-style WiFi module that uses the BK7231T SoC, provides 2.4 GHz connectivity, and shares a common relay-switch footprint. The thread treats it as a known module and lists it among many compatible boards with ESP-02S-style dimensions, which is why it appears so often in Tuya-based switches and relays. [#20652440]

Why does the MS-101 relay have a separate WMetBLi1 or WMetBL11 module, and what role does it play in the device?

It has a separate board because that slot is for energy metering, not for a second WiFi module. "WMetBLi1/WMetBL11" is a dedicated metering submodule that carries the BL0937 support hardware, while the main PCB still holds the current shunt resistor. The author says this explains the second PCB slot found in similar relay designs. [#20652440]

How do I calibrate BL0937 power measurements in OpenBeken after flashing, and which reference meter should I use?

Calibrate BL0937 manually after flashing by comparing it to a better reference meter. The thread says OpenBeken on BK7231T and BK7231N supports Tasmota-style calibration, including commands such as VoltageSet, and that the Web App GUI also exposes calibration in the Tools tab. Use a meter of higher class than the relay’s built-in reading path. [#20660965]

How accurate is the energy measurement on the MS-101 after replacing the stock Tuya firmware with OpenBeken?

The thread does not give a tested accuracy figure after flashing. It states that the author did not perform precise precision tests, and says final accuracy depends partly on user calibration against a better meter. That means the MS-101 can meter energy with OpenBeken, but the thread does not provide a verified error range in %, W, or V. [#20660965]

Why does BL0937 energy monitoring work on BK7231T and BK7231N in OpenBeken but not on BL602 yet?

It works on BK7231T and BK7231N because that platform support is already implemented, but BL602 still lacks the required GPIO interrupt or pulse-counter HAL work. The author states that BL0937 and BL0942 have worked for a long time on BK7231T and BK7231N, while BL602 support is blocked by platform-specific interrupt handling and limited documentation. [#20661018]

BL0937 vs BL0942: which energy measurement chip is better supported in OpenBeken and easier to calibrate?

The thread does not rank one as better. It says BL0937 and BL0942 both fully work on BK7231T and BK7231N in OpenBeken, and both support Tasmota-style calibration. If you stay on those Beken platforms, the practical takeaway is that OpenBeken supports both chips and calibrates them through the same general workflow. [#20661018]

What safety-related parts are present inside the MS-101, such as the varistor, X2 capacitor, and BP2525 supply section, and why do they matter?

The MS-101 includes more protection parts than many cheap relays. The author highlights a varistor, an X2 capacitor, two electrolytic capacitors with a choke after the bridge, and a BP2525 supply stage that provides 5 V, then 3.3 V through AMS1117-3.3V. Those parts matter because they improve surge handling and power conditioning instead of relying on a minimal resistor-only approach. [#20652440]

Which pads on the WB2S module should I connect for RX, TX, and power when reflashing the MS-101 relay?

Connect the WB2S serial power, RX, and TX pads shown in the thread photos. The post gives a photo-based wiring guide and says, in plain text, "Solder the power supply, RX, TX" for reflashing. It does not list pad coordinates or castellated pad numbers in text, so use the pictured WB2S pinout view when wiring the programmer. [#20652440]

How can I tell whether a Tuya smart relay uses the stock cloud firmware or has already been converted to OpenBeken?

You can tell from how it is controlled. The thread says that if you do not upload OpenBeken, the device keeps the manufacturer’s firmware and everything works there; users replace it mainly to avoid surveillance risk, vendor limits, and server dependence. A converted unit instead runs OpenBeken locally and uses its own template and calibration workflow. [#20661018]

What causes MAC address issues after flashing a BK7231T device, and how can I preserve or restore the original MAC on a WB2S module?

The thread only confirms that MAC address issues can exist after flashing, but it does not explain the cause or provide a recovery method. The last reply mentions "the issue of the same MAC after flashing" as an open concern, then shifts topics without a fix. So this thread is useful for flashing and metering, but not for MAC preservation on WB2S. [#20661038]

Which other Tuya-compatible WiFi modules share a footprint with WB2S and ESP-02S-style boards, and what can I swap them with?

The thread lists a large compatible family. It names CB2S, FL_M99_V1, TYWE2S, TYZS6, TW-02, WR2, WB2, WBR2, WR2E, WB2S, WA2, and XT-BL02 as having a very similar footprint and says they are compatible with ESP-02S. In this MS-101, though, the key advice is that you do not need to swap WB2S at all; just flash it. [#20652440]

How does the MS-101 with energy monitoring compare with similar Sonoff-style relays in terms of features, price, and cloud independence?

It offers more built-in metering than basic Sonoff-style relays, but the thread says its price is slightly higher. The author’s summary is direct: construction is good, the manufacturer even kept the varistor, and the extra value is the energy measurement board. After OpenBeken flashing, it also gains local control and avoids dependence on the manufacturer’s cloud server. [#20652440]
Generated by the language model.
%}