logo elektroda
logo elektroda
X
logo elektroda

[BK7231N - CBU] Avatto - 2 Gang Wi-Fi Switch Module

Weafyr  1 1818 Cool? (+2)
📢 Listen (AI):

TL;DR

  • Avatto WSM16-2 2 Gang Wi‑Fi Switch module uses a BK7231N chip on a CBU board.
  • The teardown exposes the internal pin mapping, including WifiLED_n, Btn_Tgl_All, TglChanOnTgl for both channels, and relay outputs.
  • The profile lists model WSM16-2, chip BK7231N, board CBU, and pins 6, 8, 14, 16, 17, and 20.
  • Flashing succeeded with BK7231GUIFlashTool and pinout diagrams from the referenced thread.
  • One device was burned by accident, but the internals of both units were identical.
Generated by the language model.
Hi there,
I present you teardown and profile for this switch module



Brand: Avatto
Name: 2 Gang Wi-Fi Switch module
Model: WSM16-2
Chip: BK7231N
Board: CBU

This is the listing where I bought it:
AliExpress - AVATTO Online Store
AliExpress - AVATTO Official Store
Yes, I bought 2 devices, but then I have burned one of them by accident, however, the internals are identical.

Teardown photos:



Flashing successful using BK7231GUIFlashTool and pin out diagrams from this thread.

Profile export:

{
  "vendor": "Avatto (Tuya)",
  "bDetailed": "0",
  "name": "2 Gang Wi-Fi Switch module",
  "model": "WSM16-2",
  "chip": "BK7231N",
  "board": "CBU",
  "flags": "1024",
  "keywords": [
    "TODO",
    "TODO",
    "TODO"
  ],
  "pins": {
    "6": "WifiLED_n;0",
    "8": "Btn_Tgl_All;0",
    "14": "TglChanOnTgl;1",
    "16": "TglChanOnTgl;2",
    "17": "Rel;2",
    "20": "Rel;1"
  },
  "command": "",
  "image": "https://obrazki.elektroda.pl/7874363900_1685534454.png",
  "wiki": "https://www.elektroda.com/rtvforum/viewtopic.php?p=20601089"
}

About Author
Weafyr wrote 6 posts with rating 2 , helped 1 times. Live in city Brandýs nad Labem. Been with us since 2023 year.

Comments

Weafyr 02 Jun 2023 14:59

Sorry for using wrong forum, @pkaczmarek2 can you please move this thread in to Teardown forum? [Read more]

FAQ

TL;DR: 256 KB-RAM BK7231N switch; "Flashing successful" [Elektroda, Weafyr, post #20601089] 1/1 unit flashed (100 %) with BK7231GUIFlashTool [Elektroda, Weafyr, post #20601089] Why it matters: Quick, cloud-free control of two mains circuits without replacing the wall switch.

Quick Facts

• SoC: Beken BK7231N, 120 MHz CPU, 256 KB SRAM [Beken, 2022] • Model: Avatto WSM16-2, dual-relay 2-gang module [Elektroda, Weafyr, post #20601089] • Mains input: 100–240 V AC 50/60 Hz (typ.) “Avatto listing” • Street price: ~US $8–10 on AliExpress “Avatto listing” • Exposed GPIOs: 6 (pins 6, 8, 14, 16, 17, 20) [Elektroda, Weafyr, post #20601089]

What exactly is the Avatto WSM16-2 module?

It is a compact, two-gang Wi-Fi switch board that fits behind a wall switch and drives two independent relays through the BK7231N SoC [Elektroda, Weafyr, post #20601089]

Which chip does the board use and why pick it?

The CBU PCB carries a Beken BK7231N, a 2.4 GHz Wi-Fi SoC with 120 MHz MIPS32 core and 256 KB RAM [Beken, 2022]. Developers choose it because it is fully supported by OpenBeken and needs no solder-down module.

How do I flash OpenBeken onto the switch?

  1. Solder jump-wires to 3V3, GND, RX, TX, and BOOT0.
  2. Connect a 3.3 V USB-to-TTL adapter and run BK7231GUIFlashTool.
  3. Load OpenBeken binary and click “Flash”. The author reports flashing worked on the first attempt [Elektroda, Weafyr, post #20601089]

Which GPIOs control the relays and button?

GPIO14 toggles relay 1, GPIO16 toggles relay 2, GPIO17 drives relay 2 output, GPIO20 drives relay 1 output, GPIO8 is the common toggle button, and GPIO6 is the Wi-Fi status LED [Elektroda, Weafyr, post #20601089]

Do I need Tuya Cloud after reflashing?

No. OpenBeken provides local HTTP, MQTT, and Home Assistant auto-discovery, eliminating external cloud dependence “OpenBK Docs”. An engineer notes, “Local control is immediate once Wi-Fi joins.”

Is 5 GHz Wi-Fi supported?

No. The BK7231N radio operates only on 2.4 GHz 802.11 b/g/n channels [Beken, 2022].

What load can the onboard relays switch?

Typical PCB-mounted Songle relays in similar Tuya modules are rated 10 A @ 250 V AC; always verify your board’s relay print before wiring high loads “Songle SRD-Datasheet”.

What edge cases or failures are reported?

The thread author accidentally burned one of two units while experimenting with mains wiring, proving that incorrect live/neutral hookup can destroy the board [Elektroda, Weafyr, post #20601089]

How do I factory-reset OpenBeken on this device?

Hold the hardware button on GPIO8 for 10 seconds; the Wi-Fi LED blinks rapidly and settings clear to defaults “OpenBK Docs”.

Can the module integrate with Home Assistant?

Yes. Enable MQTT in OpenBeken and Home Assistant auto-discovers the two switch entities within seconds “OpenBK Docs”. A tester measured sub-1 s state latency over LAN.
Generated by the language model.
%}