logo elektroda
logo elektroda
X
logo elektroda

[CB3S/BK7231N] AVATTO TS02-EU-W3 light switch (triple version)

p.kaczmarek2  0 2487 Cool? (+5)
📢 Listen (AI):

TL;DR

  • The AVATTO TS02-EU-W3 triple light switch uses a CB3S module with BK7231N and was flashed with OpenBK7231T App.
  • Inside, it has an ADS TS04 2052 button controller and an isolated flyback power supply based on OB25133JP.
  • The switch costs PLN 50 and the flashing setup needed only four soldered wires.
  • After flashing, it works 100% locally without cloud or manufacturer servers and can integrate with Home Assistant or ioBroker.
Generated by the language model.
Disassembled AVATTO TS02-EU-W3 light switch with internal module visible.
Today, as standard - we change the light switch firmware at the reader`s request. I flashed a few more switches from this series, but here I will put the flashing instructions and a template for one piece. Thanks to the software change presented here, this switch will be able to work 100% locally, without the cloud, without the manufacturer`s servers and will be compatible with Home Assistant.

Purchase AVATTO TS02-EU-W3
The switch can be purchased for PLN 50, which is quite a good price for a version with three relays:
Official purchase offer of the Avatto TS02-EU-W3 WiFi Touch Light Switch on the Avans online store.
Packaging:
Box with information about downloading the Smart Life app. Box of AVATTO touch switch.
Let`s see what we get in the set:
Back view of the AVATTO TS02-EU-W3 light switch with port labeling. AVATTO light switch set with instructions and accessories on a table.
We usually change the firmware in this section, but if you want to use the manufacturer`s apk, here are the instructions:
Smart light switch user manual showing installation steps and wiring diagrams. User manual for AVATTO TS02-EU-W3 light switch showing device addition and voice control instructions.


Interior of AVATTO TS02-EU-W3
We question the front:
Interior of AVATTO TS02-EU-W3 light switch with visible CB3S module.
There is a CB3S module inside, you can upload https://github.com/openshwprojects/OpenBK7231T_App
On the back of the PCB you can also see the button controller:
Interior of AVATTO TS02-EU-W3 switch with visible electronic components.
This chip is ADS TS04 2052:
Circuit board with a module and electronic components.
This time the AMS1117-3.3V is not on the front board, but together with the power supply, which here is based on OB25133JP:
Close-up of the internal components on a circuit board. Interior of the AVATTO TS02-EU-W3 switch with visible electronic components on the PCB. Close-up of a circuit board with several electronic components, including OB25133JP. Close-up of the circuit board inside the AVATTO TS02-EU-W3 switch.
so we have an isolated flyback converter here, this is quite typical in this type of switches, and in "smart switches" (modules) I often see non-isolated step down converters:
Typical application schematic for OB2513x isolated converter

AVATTO TS02-EU-W3 programming
According to the readme of our flasher:
https://github.com/openshwprojects/BK7231GUIFlashTool
You can also check out the Elektroda channel, there are flashing video tutorials:
https://www.youtube.com/watch?v=Yb3zXtBdSnE&list=PLzbXEc2ebpH0CZDbczAXT94BuSGrd_GoM&index=7
CB3S documentation is available online:
https://developer.tuya.com/en/docs/iot/cb3s?id=Kai94mec0s076
We solder four wires:
Close-up of a circuit board with wires soldered to a module
Here`s my whole layout:
Workbench with a circuit board connected to a breadboard with wires
Flasher is able to correctly load the Tuya configuration:
Screenshot of Tuya configuration for AVATTO TS02-EU-W3 device.
Code: JSON
Log in, to see the code

2MB copy of the batch:
https://github.com/openshwprojects/FlashDumps/commit/54d00ea1ed2031dba8180b3e7fb0b14181a91026
OBK template:
Code: JSON
Log in, to see the code

After such configuration, it can be connected, for example, to Home Assistant : :





Summary
Simple and pleasant flashing, even simpler than in the case of ESP8266, because here we soldered only 4 and not 5 cables, and in addition, the configuration was decoded by my flasher. Now you can connect this switch with Home Assistant or ioBroker as we showed in our tutorials on the Elektrody channel:
https://www.youtube.com/@elektrodacom
If you have any questions or problems with changing the load, I will be happy to help.

About Author
p.kaczmarek2
p.kaczmarek2 wrote 14440 posts with rating 12411 , helped 650 times. Been with us since 2014 year.

Comments

FAQ

TL;DR: For AVATTO TS02-EU-W3 owners, this guide solves cloud dependence by flashing a 3-gang CB3S/BK7231N switch with only 4 wires. As the author says, "100% locally." It also provides the exact OpenBeken pin map and shows Home Assistant use after flashing. [#20987889]

Why it matters: This switch can be converted from Tuya cloud firmware to fully local control with a documented template, decoded configuration, and a simpler flashing setup than a typical ESP8266 switch.

Comparison AVATTO TS02-EU-W3 / CB3S Typical ESP8266 switch
Flashing wires 4 5
Firmware path shown OpenBK7231T_App Not the focus here
Config recovery Tuya config decoded by flasher Not stated
Control model after mod Local, cloud-free, Home Assistant compatible Not stated

Key insight: The most valuable result is not just successful flashing. It is the recovered Tuya configuration and ready OpenBeken template, which turn this exact 3-relay switch into a repeatable, local-only Home Assistant device. [#20987889]

Quick Facts

  • Typical price is PLN 50 for the triple-relay AVATTO TS02-EU-W3, which makes it a low-cost 3-gang smart switch candidate for local firmware replacement. [#20987889]
  • The switch uses a CB3S module based on BK7231N and was flashed with OpenBK7231T_App rather than the stock Tuya firmware. [#20987889]
  • Flashing required 4 soldered wires, and the author explicitly notes this is simpler than 5-wire ESP8266 switch flashing. [#20987889]
  • The power section includes AMS1117-3.3V and an OB25133JP supply controller, and the author identifies the supply as an isolated flyback converter. [#20987889]
  • The published OpenBeken mapping assigns relays to P14, P26, P24, buttons to P10, P7, P8, and the WiFi LED to P23. [#20987889]

How do I flash the AVATTO TS02-EU-W3 triple light switch with OpenBK7231T_App using the CB3S/BK7231N module?

You flash it by wiring the CB3S module and loading OpenBK7231T_App. 1. Open the switch and locate the CB3S board. 2. Solder 4 programming wires and connect them to the flasher setup. 3. Use BK7231GUIFlashTool, read the device, then write the new firmware and apply the shown OpenBeken template. The author states the process is simple and that the decoded Tuya configuration was loaded correctly. [#20987889]

What pin mapping and OpenBeken template should I use for the AVATTO TS02-EU-W3 3-gang WiFi light switch?

Use the published OpenBeken template for model AVATTO TS02-EU-W3 with chip BK7231N and board CB3S. The mapping is Btn1=P10, Btn2=P7, Btn3=P8, Rel1=P14, Rel2=P26, Rel3=P24, and WifiLED_n=P23. The template also identifies it as a 3 gang WiFi Light Switch from Tuya. That mapping is the key configuration needed after flashing. [#20987889]

Which four wires need to be soldered to program the CB3S module in the AVATTO TS02-EU-W3?

The post confirms that you need 4 soldered programming wires, but it does not name each signal in text. The photos show the solder points and the full flashing layout, so the thread gives the physical method rather than a typed pin list. If detection fails, recheck those four solder joints first because the post relies on that exact wiring setup. [#20987889]

How do I read and decode the Tuya configuration from an AVATTO TS02-EU-W3 with BK7231GUIFlashTool?

Use BK7231GUIFlashTool to connect to the CB3S module and read the device configuration. The author shows the flasher correctly loading the Tuya configuration and publishes a long decoded JSON block with fields such as module=CB3S, ch_num=3, rl1_pin=14, rl2_pin=26, and rl3_pin=24. That decoded data lets you rebuild the switch behavior in OpenBeken with much less guesswork. [#20987889]

What is the CB3S module, and how does it relate to the BK7231N chip in Tuya-based smart switches?

CB3S is the radio module inside this switch, and BK7231N is the chip used on that module. "CB3S" is a Wi-Fi module that hosts the BK7231N SoC, provides the smart-switch control platform, and is the board you physically flash in Tuya-based devices. In this AVATTO model, the author identifies the internal module as CB3S and uses BK7231N-targeted OpenBeken firmware on it. [#20987889]

What is an isolated flyback converter, and why is it used in the AVATTO TS02-EU-W3 instead of a non-isolated step-down converter?

The AVATTO TS02-EU-W3 uses an isolated flyback converter in its power section. "Isolated flyback converter" is a power-supply topology that converts mains voltage to low voltage while adding galvanic isolation, a key safety characteristic for smart switches powered directly from AC lines. The author says this is typical for this switch type and contrasts it with many smart modules that instead use non-isolated step-down converters. [#20987889]

Why is the AMS1117-3.3V regulator placed on the power-supply section in this AVATTO switch instead of the front board?

In this switch, the AMS1117-3.3V regulator sits with the power supply, not on the front board. The post identifies AMS1117-3.3V next to the OB25133JP-based supply stage and notes that this layout differs from some other boards. That placement keeps the 3.3 V regulation close to the supply section that generates low voltage for the logic electronics. [#20987889]

How do I connect an AVATTO TS02-EU-W3 running OpenBeken to Home Assistant for fully local control?

Flash OpenBeken, apply the shown template, then add the switch to Home Assistant as a local device. The author states that, after this configuration, the switch can work 100% locally, without the cloud or manufacturer servers, and can be connected to Home Assistant. A linked video demonstrates the Home Assistant side after the firmware change. [#20987889]

What hardware components are inside the AVATTO TS02-EU-W3, including the ADS TS04 2052 and OB25133JP, and what do they do?

The switch contains a CB3S module, an ADS TS04 2052 button controller, an AMS1117-3.3V regulator, and an OB25133JP-based power stage. The author shows the CB3S as the main smart module, identifies ADS TS04 2052 on the PCB back as the button controller, and describes OB25133JP as part of the isolated flyback supply. Together, these parts handle wireless logic, touch or button input, and low-voltage power generation. [#20987889]

BK7231N/CB3S vs ESP8266 for flashing smart switches — what makes the AVATTO TS02-EU-W3 easier to program?

This AVATTO switch is easier because the author used only 4 wires instead of 5. The post says flashing was even simpler than ESP8266, and the flasher also decoded the Tuya configuration automatically. That means less wiring and less manual reverse-engineering before the switch becomes usable with OpenBeken and local automation. [#20987889]

What does the WiFi LED and relay pin assignment look like for the AVATTO TS02-EU-W3 OpenBeken configuration?

The OpenBeken assignment is relay 1 on P14, relay 2 on P26, relay 3 on P24, and the WiFi LED on P23. In the published template, the LED is labeled WifiLED_n;0, which indicates an active-low WiFi status LED. The three buttons are mapped separately to P10, P7, and P8 for the three gangs. [#20987889]

How can I back up the original 2MB firmware dump from a Tuya CB3S switch before installing OpenBeken?

Back up the original firmware by reading the device before flashing and saving the dump. The thread links a 2MB copy of the batch in the FlashDumps repository and labels it as the original backup for this switch family. That gives you a reference image to keep before replacing the stock firmware with OpenBeken. [#20987889]

What troubleshooting steps help when BK7231GUIFlashTool does not correctly detect or flash the AVATTO TS02-EU-W3?

Start by checking the 4 soldered programming wires and matching your setup to the photos. Then compare your readout against the decoded Tuya configuration, which should show fields like module=CB3S and ch_num=3. If the tool still fails, use the linked flashing tutorial videos and the CB3S documentation the post references. A wrong connection is the clearest failure case shown in this thread. [#20987889]

How much does the AVATTO TS02-EU-W3 typically cost, and what comes in the box?

The switch typically costs about PLN 50 for the triple-relay version. The post shows the retail package and the included contents in photos, but it does not provide a typed inventory list. The practical takeaway is that the low price targets buyers who want a 3-gang smart switch to reflash for local use. [#20987889]

What are the practical benefits of replacing the stock Tuya firmware on the AVATTO TS02-EU-W3 with OpenBeken for local control and cloud-free use?

The main benefit is fully local control without the cloud or manufacturer servers. The author explicitly says the modified switch can work 100% locally and be used with Home Assistant or ioBroker after configuration. That improves privacy, reduces vendor dependence, and gives you a reusable 3-relay platform with a published template and known pin map. [#20987889]
Generated by the language model.
%}