logo elektroda
logo elektroda
X
logo elektroda

[CBU/BK7231N] AVATTO WSM16-W1 WiFi relay module for PLN 30 - firmware change

p.kaczmarek2 
WSM16-W1 Wi-Fi switch module with visible connectors and technical markings.
Today we are modifying another relay module for the box so that it works 100% locally, regardless of the manufacturer`s servers. Then we will also pair it with Home Assistant. This modification was made for a reader who sent me a set of gadgets that I haven`t described yet so that we could expand our electrode list of IoT device interiors .

Purchase of WSM16-W1
The module was purchased quite cheaply - less than PLN 30:
Product page of Tuya WSM16-W1 switch showing the device and a smartphone.
The description has standard Tuya talk:
Image of the AVATTO WSM16-W1 smart switch and a phone with an app.
What also catches my eye is that the description includes the version 250W and we got the versions 800W , I wonder if both versions have the same interior?
Parameters:
Table with parameters of a smart switch.
Packaging:
Packaging of WSM16-W1 relay module on a wooden background Box of AVATTO WSM16-W1 module on a wooden surface.
The contents of the set (well, there is a plastic mounting with hooks):
WSM16-W1 Wi-Fi switch module, manuals, and packaging on a wooden surface.
Instruction:
Smart module user manual with illustrations and QR codes. User manual for WSM16-1 module showing technical specifications. User manual for Avatto WSM16-W1 smart Wi-Fi switch. WSM16-W1 module instruction manual with diagrams and text.


Interior of WSM16-W1
We question the casing:
Interior view of the WSM16-W1 electronic module with electronic components on a green PCB.
Inside there is again a non-isolated converter based on OB2525. I also see a fuse resistor and a step down converter (U2), because OB2525 only provides 5V, and I need to generate another 3.3V for the WiFi module:
Close-up of the PCB of the WSM16-W1 module showing electronic components. Close-up of a circuit board with electronic components.
In this case, it was extremely difficult to remove the PCB from the other half of the housing. I had to gradually pry from each side.
WSM16-W1 relay module with visible electronic components, including a relay, capacitors, and a terminal block.
Inside is the CBU module:
https://developer.tuya.com/en/docs/iot/cbu-module-datasheet?id=Ka07pykl5dk4u
You can upload:
https://github.com/openshwprojects/OpenBK7231T_App
The whole thing is packed very tightly, the capacitor and the coil are specially placed:
Close-up of the WSM16-W1 module with electronic components on a wooden background.
In order to reduce the thickness of the module, the clever manufacturer placed the relay on its side:
Close-up view of an electronic relay module with FANHAR markings.


Changing the WSM16-W1 load

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
CBU documentation is available online:
https://developer.tuya.com/en/docs/iot/cbu-module-datasheet?id=Ka07pykl5dk4u
We solder four wires, first whiten the pads:
Close-up of the CBU electronic module with soldered components on the PCB. Close-up of the WSM16-W1 module with visible electronic components on the PCB.
Soldered:
Close-up of the interior of the WSM16-W1 module with connected wires.
Whole flashing system:
WSM16-W1 module connected to a breadboard with several wires.
Flasher correctly detects Tuya configuration:
Screenshot showing the BK7231 Easy UART Flasher interface extracting JSON configuration for a device module.
JSON:
Code: JSON
Log in, to see the code

Verbal description:

Device configuration, as extracted from Tuya: 
- Pair/Toggle All Button on P8
- WiFi LED on P6
- TglChannelToggle (channel 1) on P14
- Relay (channel 1) on P20
Device seems to be using CBU module, which is using BK7231N.
And the Tuya section starts, as usual, at 2023424

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

Uploading a template:



Configuration with HA:



This device probably needs to be entered as well PowerSave 1 to short startup command, otherwise we will have to replace the capacitor after a few months, as in this topic: https://www.elektroda.pl/rtvforum/topic3898805.html

Summary
The manufacturer has made every effort to pack this module into a small housing. Even the relay was specially mounted "on the side", so as not to increase the height of the module. Similarly with the coil and capacitor.
Changing the firmware was, as usual, hassle-free, just solder four cables and the configuration was automatically detected by my flasher again.
For such money - I can recommend this module.

About Author
p.kaczmarek2
p.kaczmarek2 wrote 11826 posts with rating 9927 , helped 564 times. Been with us since 2014 year.

Comments

Add a comment