SWB1 - $25 power strip

Kinda stoked, because I picked up this power strip off amazon for 25 bucks… (FCCID: 2AJK8-SWB1)

Was kind of a gamble hoping it was esp based, although I had seen other posts indicating could solder and flash, and was hoping this was the same model…
https://www.amazon.com/dp/B07MFTRMM3

Not only does it work great with ESPHome – but I was able to do OTA install using Tuya Convert, and got it up and running in a few minutes… (after using tuya convert to install Tasmota, just set it up in ESPHome, downloaded the bin, and uploaded via the Tasmota UI)

The button and light work with HA, but I didn’t set them up to do anything yet… Should probably add an on_double_click automation, but I’m not sure if I want it toggle all 4…

Anyhow, here’s the config I used:

esphome:
  name: swb1-power
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Swb1-Power Fallback Hotspot"
    password: "[redacted]"

captive_portal:

# Enable Home Assistant API
api:

ota:
  password: "[redacted]"

logger:


# Device Specific Config

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO13
      mode: INPUT_PULLUP
      inverted: True
    name: "SWB1 Button"

  - platform: status
    name: "SWB1 Status"

sensor:
  - platform: wifi_signal
    name: "SWB1 WiFi Signal"
    update_interval: 60s

switch:
  - platform: gpio
    name: "SWB1 Relay 1"
    pin: GPIO12
    id: relay1
  - platform: gpio
    name: "SWB1 Relay 2"
    pin: GPIO14
    id: relay2
  - platform: gpio
    name: "SWB1 Relay 3"
    pin: GPIO15
    id: relay3
  - platform: gpio
    name: "SWB1 Relay 4"
    pin: GPIO5
    id: relay4

light:
  - platform: status_led
    name: "SWB1 LED"
    pin: GPIO0

4 Likes

Hey @hairlesshacker - great thread and thanks for the link! This was just what I was looking for and, as of today, it’s still using an ESP class chip which means ESPhome et al will work.

In case someone else out there is looking to get at this from a hardware level, I mapped out the pin header:

That 5V pin heads to the 3.3V regulator at the bottom, so you just feed in 5V and the regulator will handle the conversion.

edit: I should probably add - the diagram above is not required unless you have some desire to hack at the hardware. This device, as of this writing, still supports conversion via tuya-convert with no need to physically open the device.

1 Like