-
Notifications
You must be signed in to change notification settings - Fork 13
Support for Sonoff SV with esphome
autopower_developer edited this page Oct 12, 2020
·
3 revisions
If you want user Sonoff SV as boiler action component, please flash it with esphome, you can use configuration below:
esphome:
name: sv01
platform: ESP8266
board: esp01_1m
wifi:
networks:
- ssid: !secret SSID
password: !secret SSID_PWD
domain: !secret SSID_DOMAIN
# Enable logging
logger:
# Enable Home Assistant API
api:
password: !secret esphome_api_password
ota:
password: !secret esphome_ota_password
web_server:
auth:
username: !secret esphome_http_username
password: !secret esphome_http_password
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: True
name: "SV01 button"
on_press:
- switch.toggle: relay
switch:
- platform: gpio
name: "SV01 Relay"
pin: GPIO12
id: relay
output:
- platform: esp8266_pwm
id: sv01_led
pin:
number: GPIO13
inverted: True
light:
- platform: monochromatic
name: "SV01 LED"
output: sv01_led
id: led
And then edit source extaction.py
:
"relay": ["digest", "username", "password", "post", "url_1", "action_off", "action_on"],
to:
"relay": ["digest", "esphome_http_username", "esphome_http_password", "post", "fqdn_or_ip", "/switch/your_relay_name/turn_off", "/switch/your_relay_name/turn_on"],
where:
-
esphome_http_username
is username used in config file -
esphome_http_password
is password used in config file -
fqdn_or_ip
is fqdn from config file -
your_relay_name
is relay name from config file