Etekcity ESWL01 Wifi Switch

Just posting up that I can confirm this works with ESPhome. Like the author of the hackaday article below, I never liked the idea of putting SONOFFs in my walls due to their lack of certification and mediocre build quality. That said, I saw that the Etekcity ESWL01 Wifi Switch, although not officially supported by Tasmota, had worked with Tasmota. I ordered a few and must say the build quality is MUCH higher than that of SONOFF switches.

Hack-a-day: Hack My House

I had to use an FTDI board to flash the initial binary, but now OTA works perfectly. Rock-solid operation for a week now and have individual control of the front-panel LED, the relay, and the capacitive switch. Example ESPhome config below:

esphome:
  name: wifi_switch
  platform: ESP8266
  board: esp01_1m

wifi:
  reboot_timeout: 0s
  fast_connect: true
  manual_ip:
    static_ip: [xxx.xxx.xxx.xxx]
    gateway: [yyy.yyy.yyy.yyy]
    subnet: 255.255.255.0
  ap:
    ssid: wifi_switch
    password: [ap password]
    channel: [ap channel]
  networks:
    - ssid: [Primary SSID to connect to]
      password: [Password of primary SSID]

web_server:
  port: 80

api:
  port: 6053
  password: [API Password]
  reboot_timeout: 0s

ota:
  safe_mode: true
  password: [OTA Password]

switch:
  - platform: gpio
    pin: 13
    id: relay
    restore_mode: ALWAYS_OFF
   # This is the actual rely control. Not setting the "name:" keeps it hidden

  - platform: template
    name: "Switched Load"
    id: switched_load
    turn_on_action:
      - switch.turn_on: relay
      - switch.template.publish:
          id: switched_load
          state: ON
    turn_off_action:
      - switch.turn_off: relay
      - switch.template.publish:
          id: switched_load
          state: OFF
    lambda: |-
      if (id(switched_load).state) {
        return true;
      } else {
        return false;
      }
    
    # This is the HASS switch to control the relay setup above
binary_sensor:
  - platform: gpio
    id: capacitive_switch
    pin: 14
    filters:
      - delayed_on: 100ms
      - delayed_off: 100ms
    on_press:
      then:
        - switch.toggle: switched_load

light:
  - platform: monochromatic
    name: "Front Indicator LED"
    id: indicator
    output: front_led
    restore_mode: ALWAYS_OFF
    default_transition_length: 500ms

output:
  - platform: esp8266_pwm
    id: front_led
    pin: 5

Best,

-J

1 Like

This was very helpful. I have the 3-way version of this switch (Etekcity ESWL03) and I could not figure out how to get the capacitive touch button to work until I saw this.

Thank you so much

@caple Its been few years since your reply but I guess I will still ask. Did you figure out how to get 3 way version fully working ?
I am converting all my etekcity switches to ESPHome. The 3 way switch is working with the above template but I am am not able to get it to sync up the state across both 3 way switch pairs.

Would be very helpful if you can share your configuration.