Module is based on WiFi Light Switch module from LoraTap.
Module’s main controller is a TYWE3S, based on ESP8266.
![](https://ibn.by/wp-content/uploads/2020/02/switchInner3-300x204.jpg)
Original firmware works through tuya could, just like a two-channel module. And exactely same reasons to flash own firmware.
To flash firmware we need an RS232 interface with 3.3v. I was using FTDI.
![](https://ibn.by/wp-content/uploads/2020/02/ftdi.jpg)
We need 5 connection points.
![](https://ibn.by/wp-content/uploads/2020/02/switchConnection-1024x879.jpg)
TYWE3S | FTDI |
---|---|
VCC | VCC |
GND | GND |
RX | TX |
TX | RX |
IO0 | GND |
Connection is pretty simple. Don’t forget to set 3.3v on FTDI! It’s necessary to pull IO0 to GND to boot in flash-mode.
Following GPIO’s are used in the module:
GPIO | Mode | Description |
---|---|---|
0 | out | Red LED (1 – on, 0 – off) |
4 | in | Switch (1 – released, 0 – pressed) |
12 | in | Pairing button (1 – released, 0 – pressed) |
13 | out | Relay (0 – open, 1 – close) |
16 | out | Blue LED (1 – off, 0 – on) |
Unfortunately, it’s hardly possible to solder connection-wires without unsoldering TYWE3s module or relay. Therefore I had to design and print a jig. 3D model can be downloaded from Thingiverse.
Set following parameters in the Arduino Studio:
Generic ESP8266 Module, CPU 80MHz, Crystal 26MHz, Flash Size 1MB
![](https://ibn.by/wp-content/uploads/2020/02/Arduino-1.8.10-1.png)
Gonna flash Dee firmware: