Module is based on WiFi Light Switch module from LoraTap.
Module’s main controller is a TYWE3S, based on ESP8266.

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.

We need 5 connection points.

| 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

Gonna flash Dee firmware:











