(My first post!)
A few months ago I purchased a Geeni GNC-SW003 WiFi power bar on sale at Canadian Tire for about $25. Figured there was a pretty good chance it was based on the ESP8266 and for the price I couldn’t go wrong.
Got it home, and found that the Geeni app was exactly the same as the Tuya app. Set it up using Tuya, and used the Tuya component of HASS to control it. All worked without issue.
But one of the goals of my home automation is to never rely on 3rd party “cloud” services. Only exception being Google Assistant, and things like weather feeds.
Opened up the power bar (once I found a triangular head screw driver…thanks for those screws, Geeni / Tuya) and yep, indeed it contained a TYWE3S module. Which is just an ESP8266, a bit of supporting circuitry, some flash, and the antenna. Almost the same as the ESP8266MOD. The pinout is easily found Googling for “TYWE3S pinout”.
I grabbed the continuity tester and traced back the base of the relay drive transistors to the appropriate GPIO pins on the TYWE3s.
They are below (relays right to left):
Relay 1: GPIO5
Relay 2: GPIO4
Relay 3: GPIO14
Relay 4: GPIO12
Relay 5: GPIO13
Relay 6: GPIO15
Button: GPIO16
Neither RX, TX nor GPIO0 were brought out to headers so I soldered short wires directly to the chip and connected up to my little ESP8266 programming breadboard.
Flashed Tasmota 6.3 using Visual Studio Code / Platform IO. Note it took two attempts to flash because I found GPIO0 had to be held to ground through the entire flashing procedure. Once flashed the chip rebooted and I saw it listed as a Sonoff in my DHCP list. Sweet! Relay 5 was also trying to click, but the USB port did not provide enough power.
Plugged it into mains, and relay 5 began clicking (I think GPIO13 is the LED on a Sonoff basic?).
Configured Tasmota as a generic module with the following pin settings:
After that, was able to control all relays through the Tasmota interface and via MQTT. By default the button acts to control Relay1 and do all the stuff it would normally do on a Sonoff. Rules in Tasmota could turn on all relays, or a HASS automation.