Geeni GNC-SW003 WiFi Power Bar Tasmotized

(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.


good job, congratilations.

Just a quick update that the LED under the button is connected to GPIO0 and needs to be set to LED1i.

1 Like

For anyone that comes across this, usetuya-convert instead. I can confirm it works perfectly on this device and it is OTA without any need to open up the switch.

@AaronCake did you ever figure out how to make the main switch/button work. Your configuration works perfectly except for the main switch/button.

Thanks for your post.

Actually ended up buying 2 more of these as they went on sale again, so I intend to give tuya-convert a try.

Honestly I haven’t tried to use the main button for anything other than putting the power bar into pairing mode. If I remember correctly, with the configuration above, pressing the button switches relay1 on/off.

If you want it to toggle all the relays, I suspect it can be done in Tasmota with a rule.

Not having ever used Tasmota rules, that’s about all I know on the subject.

For the amount of time I spent getting tuya-convert to work, I could have soldered wires onto 10 of these and flashed them via the serial port.

Just a bit of info for anyone else who might be running tuya-convert under Ubuntu 18.

-rename your wlan adapter from the long name Ubuntu assigns to wlan0
-install net-tools
-install npm prior to running the script . The script will uninstall it, but won’t run without it
-after, stop mosquito. It starts automatically after the install, which causes the flash to fail because it can’t start mosquito as port 1883 is in use
-after, stop systemd-resolved.service . It listens on port 53, preventing the installed dnsmasq service from starting. Then restart dnsmasq

Then follow the tuya-convert instructions.

Got this working today using rpi zero w connected to usb-ethernet running tuya convert.

1 Like

Template available here for Tasmota 6.4.16 +

{“NAME”:“Geeni GNCSW003”,“GPIO”:[52,0,0,0,22,21,0,0,24,25,23,26,17],“FLAG”:0,“BASE”:18}

See the wiki for templates here for use.

@robp2175 the button should control relay1 (first plug) when you push it. To make it control all of them you can set a rule to issue commands to each relay with rules as such:

Rule1 on button1#state do backlog Power1 2;Power2 2;Power3 2;Power4 2;Power5 2;Power6 2 endon

Then enable rule 1:

Rule1 1

That’s all. Push the button and enjoy the light show!

how do i get the power bar into pairing mode?

Assuming you are referring to it running TASMOTA.

Press the button 5 times quickly.

This of course only works if you have set up the button.

If you just flashed TASMOTA, it should be broadcasting a sonoff_ WiFi network. Connect to it, go to, and set up your WiFi.

The instructions were not clear. the wifi light is a button while the power button is a reset button. The wifi button gets it into pairing mode.

I know this post has been around a while, but it still comes up in searches.

Power0 affects all the relays at once, it’s easier to use than backlog. (See Commands - Tasmota)

But, Power0 2 still toggles each relay, whereas the default firmware toggles the “state” of the strip (all OFF if any one or more is on, all ON if all had been off).

So, here’s what I did:

  1. Tuya-Convert with a Pi to get Tamota on the Geeni.
  2. Watched the episode: :slight_smile:
  3. Updated the Tasmota firware to 8.3
  4. set so73 (decouple) to 1
  5. set so32 (long press time) to 8 (800 msec)

Then I set this rule:

rule1 on button1#state=10 do backlog power1 toggle;state endon on button1#state=11 do backlog power0 off; state endon on button1#state=3 do backlog power0 on; state endon

and turned rule1 on. (I had to add the backlog and state to force Tasmota to send an update so HA sees the change immediately, otherwise it could be out of sync for up to 299 seconds.)

This gives me:

  • a single press toggles the first relay,
  • a double press toggles turns OFF the whole strip,
  • a held (long-press) turns ON the whole strip.

I think one could replicate the exact function of the default power strip by examining the value of “power” or using some conditional rules… but that seemed like way too much thinking, and this works for me.


1 Like

My power bar, the same as your, just stop working. The diode D1 burn, can you read on your what model is that?

As soon as I have time I will open up one of my spares and check. I looked at my pictures but they aren’t bright enough to show the part number.

Opened one of my spares up last night.
The part number on D1 is “F7” which looks to be a fast recovery diode as per this datasheet:

Thank you to take the time. That will help me a lot.
I did’nt know what is à fast recovery diode. I test it on the board and it look like OK maybe but it complety burn and I have a capacitor burn to. I prefer replace both to be sure.
Thanks again!

Beware that some later versions of this product don’t have an ESP8266-compatible module installed. One I just picked up today “on clearance” has a WB3S module installed, and you can’t flash Tasmota or ESPHome on that device.

Compared to the photo of the PCB in the power strip, mine has the Wi-Fi module mounted on the top of board (same side as the relays) rather than on the bottom. Of course, you can’t see this until it’s too late :slight_smile: