i have an sonoff s31 switch that worked wonderfully until it didn’t this past week or so. i noticed that it disappeared off esphome and my apple home bridge via homeassistant. so i try flashing it again using usb → uart and after disconnecting and connecting 5v power it seems to work just fine, i can ping its mDNS address and control it via HA. but when i put it all back together and plug it into the wall, it stops responding to mDNS and i can’t control it via HA. it is connected to wifi because i see it in unifi console and i can ping the ip address directly.
i also bought a brand new one off amazon and same behavior.
any ideas?
esphome:
name: laundryroom-light-switch
friendly_name: laundryroom-light-switch
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "f"
ota:
password: "f"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Laundryroom-Light-Switch"
password: "f"
captive_portal:
uart:
rx_pin: RX
baud_rate: 4800
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: True
name: "Sonoff S31 Button"
on_press:
- switch.toggle: relay
- platform: status
name: "Sonoff S31 Status"
sensor:
- platform: wifi_signal
name: "Sonoff S31 WiFi Signal"
update_interval: 60s
- platform: cse7766
current:
name: "Sonoff S31 Current"
accuracy_decimals: 1
voltage:
name: "Sonoff S31 Voltage"
accuracy_decimals: 1
power:
name: "Sonoff S31 Power"
accuracy_decimals: 1
id: my_power
switch:
- platform: gpio
name: "Sonoff S31 Relay"
pin: GPIO12
id: relay
restore_mode: ALWAYS_ON
time:
- platform: sntp
id: my_time
status_led:
pin:
number: GPIO13
inverted: True