Стартовый конфиг ESPHome
Собран по распиновке выше. Ключи и пароль Wi-Fi берутся из secrets.yaml в ESPHome. Перед прошивкой сверьте пины со своей ревизией устройства: у одной модели бывают разные платы.
substitutions:
name: blitzwolf-bw-shp7-double
esphome:
name: ${name}
friendly_name: "Blitzwolf BW-SHP7 Double socket with powermonitoring"
esp8266:
board: esp01_1m # most plugs and relays have 1 MB flash; check yours
logger:
api:
encryption:
key: !secret api_key
ota:
- platform: esphome
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap: {}
captive_portal:
switch:
- platform: gpio
pin: GPIO14
id: relay1
name: "Relay 1" # Relay1
restore_mode: RESTORE_DEFAULT_OFF
- platform: gpio
pin: GPIO16
id: relay2
name: "Relay 2" # Relay2
restore_mode: RESTORE_DEFAULT_OFF
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: true
name: "Button 1" # Button1 (pullup, inverted)
on_press:
- switch.toggle: relay1
- platform: gpio
pin:
number: GPIO12
mode: INPUT_PULLUP
inverted: true
name: "Button 2" # Button2 (pullup, inverted)
on_press:
- switch.toggle: relay2
status_led:
pin:
number: GPIO13
inverted: true # Red LED1(inverted)
sensor:
- platform: hlw8012
sel_pin:
number: GPIO3
inverted: true
cf_pin: GPIO4
cf1_pin: GPIO5
voltage:
name: "Voltage"
current:
name: "Current"
power:
name: "Power"
energy:
name: "Energy"
update_interval: 10s
# calibrate voltage_divider and current_resistor against a known load
# Other pins from the pinout:
# GPIO2: Red LED2(inverted)
# GPIO1: Blue LED (inverted)
Как прошить
- Большинство устройств прошивают по UART: адаптер USB-TTL на 3,3 В к пинам RX, TX, GND и 3V3, при включении зажать GPIO0 на землю (для ESP8266/ESP32). Сетевое питание при этом отключено.
- Чипы Beken (BK72xx) и Realtek прошивают через ltchiptool или cloudcutter без вскрытия — если прошивка устройства это допускает.
- Подробности и фотографии платы — страница устройства в базе ESPHome.
Свой конфиг с нуля — генератор ESPHome. Какие пины безопасны — распиновка.
Похожие устройства
- Bauhn (ALDI) ASPU-1019 Plug
- BlitzWolf BW-SHP2 Power Monitoring Plug
- BlitzWolf BW-SHP3 Power Monitoring Plug
- Blitzwolf BW-SHP6 Socket with powermonitoring
- BlitzWolf BW-SHP8 Power Monitoring Wall Outlet
- Blitzwolf BW-SHP9 Triple powerstrip with dual USB power
- Brilliant Lighting BL20925 Power Monitoring Plug
- Brilliant Smart Plug