Hi!
I’m from Brazil and I just brought an smart plug called ‘eKaza’. It works with Smart Life and uses TYWE2S + BL0937 chip…so I managed to install Tasmota and it’s working perfectly with this template:
{"NAME":"NX-SM400","GPIO":[0,0,0,32,2720,2656,0,0,2624,288,224,0,0,0],"FLAG":0,"BASE":18}
Now, I’m trying to make it work with ESPHome, since I’m trying to migrate all my devices to ESPHome.
I’m trying first the basic: relay and button. I have this configuration right now:
substitutions:
name: 'sp_mlavar'
ssid1: 'Skynet_dvcs'
ssid2: 'Skynet'
esphome:
name: sp_maquina_lavar
platform: ESP8266
board: esp8285
wifi:
networks:
- ssid: $ssid2
password: !secret wifi_skynet_pwd
- ssid: $ssid1
password: !secret wifi_dvcs_pwd
manual_ip:
static_ip: 192.168.22.60
gateway: 192.168.22.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "sp_maquina_lavar Fallback"
password: "Z7Aw17U0Kh1d"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
web_server:
port: 80
auth:
username: jmaurin
password: !secret web_server_pwd
binary_sensor:
- platform: gpio
pin:
number: GPIO3
mode: INPUT_PULLUP
inverted: true
name: "Power Button"
on_press:
- switch.toggle: relay
- platform: status
name: "Status"
switch:
- platform: gpio
id: blue_led
pin:
number: GPIO13
inverted: true
- platform: gpio
name: "Socket Monitoring Switch"
pin:
number: GPIO14
# inverted: true
id: relay
The problem is that with Tasmota, everything works fine with both 110v and 220v…but with ESPHome, only works with 220v! I can’t make it work in 110v.
When I plug into 110v socket, the smarty plug turns on and connect to my AP…I can ping, access web interface, etc etc…but when I press the button to turn relay on/off, it just turn relay on for less than 1 second and reboot entire system (stop ping). Relay doesn’t stay on, just a fast ‘click’ and go back to off, then system restart.
The most bizare thing is that this only happens in 110v with ESPHome.
That am I missing?
Tasmota firmware:
110v = Works
220v = Works
ESPHome firmware:
110v = Reboot after button click (or turn switch on using API/ HA, reboot too)
220v = Works
Some pictures of device: