logo elektroda
logo elektroda
X
logo elektroda

Which WiFi controlled relay module for Home Assistant? ATLO-SW1-TUYA

p.kaczmarek2 
ATLO-SW1-TUYA WiFi relay module with folded instruction manual in Polish, top view on the device and documents. .
The ATLO-SW1-TUYA is another tiny (43x39x22 mm) relay module offering control of a single receiver via WiFi. It is mounted in a box and, in addition to WiFi, it can work with a classic bistable switch. Here I will show how to change its firmware to connect it to Home Assistant. The whole thing is available to buy for £30.

I got this unit from a reader along with a whole set of similar relays for several rooms - I just uploaded the firmware at his request.

We start by unpacking. The product designation is ATLO-SW1-TUYA, and you can also see the name of its importer, although this is less important here as many shops sell similar products.
White box of the ATLO-SW1-TUYA module with identification label, barcode, and importer’s details. ATLO-SW1-TUYA WiFi relay switch module and Polish instruction manual on a white background. .
The kit also comes with Polish-language instructions for assembly and pairing with Tuya. Pairing will not be necessary for us in this particular case.
Installation manual of the ATLO-SW1-TUYA relay module with a technical specifications table and dimension diagram. The image shows a small ATLO-SW1-TUYA Wi-Fi relay module and a Polish user manual laid out side by side. Small WiFi relay module ATLO-SW1-TUYA next to unfolded Polish installation manual. .
The product itself has an additional buckle which makes it easy to install:
White ATLO-SW1-TUYA Wi-Fi relay module with screw terminals and technical specification on top of the case. Small white ATLO-SW1-TUYA relay module on a white background, with a light bulb symbol on top of the case. .
Time to look inside and change the firmware .
Open ATLO-SW1-TUYA relay module with visible PCB and removed white cover. .
The power section is again on a BP2525, which is a non-isolated step-down converter. This means that there may be mains potential across the PCB (and WiFi module). Then there is a 3.3V LDO powering the WiFi module.
Close-up of the ATLO-SW1-TUYA relay module PCB showing the BP2525 chip and SMD components. Close-up of the ATLO-SW1-TUYA relay module’s PCB showing electronic components and part labels. .
The relay was set 'on its side' to reduce the height of the product. The module used here is a CB3S (WiFi + BT) based on the BK7231N.
ATLO-SW1-TUYA relay module with capacitors, a relay, and a CB3S (WiFi/BT) module visible on the PCB. Close-up of the ATLO-SW1-TUYA relay module PCB showing a terminal block, relay, capacitor, and CB3S module. .
It's time to change its firmware so that it's cloud-free and connected to Home Assistant.
We upload OpenBeken: https://github.com/openshwprojects/OpenBK7231T_App
Download the flasher: https://github.com/openshwprojects/BK7231GUIFlashTool
We will need to solder 3.3V, GND, RX and TX. We will use a USB to UART converter for programming.
Here is the pinout of the module (bottom view!):
Bottom view of the CB3S module with labeled pinout and dimensions in millimeters. .
So first we solder the RX and TX - whittle down the pins, wires, solder:
ATLO-SW1-TUYA relay module PCB with red and purple power/programming wires soldered on. ATLO-SW1-TUYA relay module with soldered wires for programming, close-up view of the circuit board and electronics. .
Now we need to connect the power supply. We basically have two options:
- feed 3.3V from our LDO to the 3.3V line (or the 3.3V pin of the WiFi module)
- connect 5V to the input of the LDO (this will give us 3.3V at its output)
Do as you wish, the AMS1117 leads are in the network.
Green PCB of ATLO-SW1-TUYA relay module with black, white, red, and purple wires soldered to it. Close-up of an ATLO-SW1-TUYA module PCB with RX and TX wires soldered on. .
We follow the flasher instructions - start reading the flash (this will give us the GPIO configurations) and disconnect the 3.3V momentarily.
Screenshot of BK7231 Easy UART Flasher showing the extracted GPIO configuration and device template for CB3S/BK7231N in JSON format and a text summary. .
Success! Tuya JSON is:
Code: JSON
Log in, to see the code
.
Verbal description:

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

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

Instructions for importing the template:



HA Discovery Instructions:



Other related material on YT Elektroda.com:
https://www.youtube.com/@elektrodacom
Project repository:
https://github.com/openshwprojects/OpenBK7231T_App
After the import, it is still a good idea to add the PowerSave 1 command to the autostart, as these types of gadgets have weak power supplies and capacitors damage quickly in them.

In summary , this was another easy to reprogram product. We didn't even have to guess the role of the GPIO, as my flasher read and decoded everything correctly. After this short operation we can enjoy a fully cloud-independent relay controlled by WiFi.
Thanks to Bartek for providing me with a set of hardware to change the firmware, hopefully it will work well with your Home Assistant.
I've been monitoring the inside of these types of devices for a good few years now and fortunately they are still fully 'programmable', so if anyone wants cloudless automation at a low cost then by all means go ahead and buy.
And how do you use this type of product, do you change the firmware, do you like the manufacturer's cloud, or do you buy something that can already work locally on its own? .

About Author
p.kaczmarek2
p.kaczmarek2 wrote 11780 posts with rating 9909 , helped 563 times. Been with us since 2014 year.

Comments

Add a comment
sq3evp 02 Jun 2025 09:25

I have something similar, different logo but looks identical. Similar modules are probably mainly a matter of the chip fitted? [Read more]

p.kaczmarek2 02 Jun 2025 09:29

Rather, the interior will be more or less as I have shown. It's just that the importers are pulling these products and adding their logos on them. Show pictures (maybe from the inside too). [Read more]

truten23 02 Jun 2025 15:46

https://obrazki.elektroda.pl/7562280100_1748872003_thumb.jpg . I also use modules of this type. They are described as OXT. They come in various configurations. D operating one bulb and one switch,... [Read more]

sq3evp 03 Jun 2025 09:14

. This is the kind of thing I have - connected already, photo from the seller's website. https://obrazki.elektroda.pl/3880254000_1748934664_thumb.jpg . It is powered by applying phase (L) through... [Read more]

p.kaczmarek2 03 Jun 2025 09:27

OXT I have also already programmed some: Powerless relay on WiFi - OXT SWT10 - interior, programming . @sq3evp monitor that smart switch what you have and let me know if it breaks down, I've had instances... [Read more]

sq3evp 03 Jun 2025 12:54

. It's going to be hard because it's on a suspended ceiling. You have worried me but I will monitor, thanks for the warning. So far I can't hear the crickets, just the relay switching on/off on the... [Read more]

truten23 03 Jun 2025 14:36

@sq3evp, maybe nothing to worry about in the meantime. Of my 5 installed OXTs, in two years of use only one relay failed, twice. It was offline and unresponsive to the switch. It needed a hard reset in... [Read more]