Blitzwolf BW-SHP9 is an extension cord with 3 220V output relays, and one ‘dual’ usb relay.
There is one button available on it, and no powermonitoring.
My config for it looks like this:
substitutions:
device_name: shp9
# NO Powermeasurement
# BW-SHP9
# relay1 is controlling a lamp, and the button is controlling the relay1
# All relays can be controlled through Esphome/HA, but the button only controls relay1
# Wifi is set with static IP, and fast_connect is used as the SSID is hidden
# The Web server is active, and both web_server and OTA is protected by PW.
esphome:
name: '${device_name}'
platform: ESP8266
board: esp8285
on_boot:
then:
# - switch.turn_on: relay1
- switch.turn_on: relay2
- switch.turn_on: relay3
- switch.turn_on: relay4
wifi:
ssid: !secret wifissid
password: !secret wifipw
manual_ip:
static_ip: 192.168.1.100
gateway: 192.168.1.1
subnet: 255.255.255.0
fast_connect: true
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${device_name} Hotspot"
password: !secret appw
logger:
baud_rate: 0
web_server:
port: 80
auth:
username: !secret webuser
password: !secret webpw
api:
ota:
password: !secret otapw
time:
- platform: homeassistant
id: homeassistant_time
text_sensor:
- platform: version
name: "${device_name} ESPHome Version"
- platform: wifi_info
ip_address:
name: "${device_name} ip"
ssid:
name: "${device_name} ssid"
binary_sensor:
- platform: gpio
id: button
internal: true
pin:
number: GPIO13
mode: INPUT_PULLUP
inverted: true
on_press:
- light.toggle: relay1
switch:
- platform: gpio
pin: GPIO14
id: relay2
name: 'livingroomextension-socket2'
- platform: gpio
pin: GPIO5
id: relay3
name: 'livingroomextension-socket3'
- platform: gpio
pin: GPIO15
id: relay4
name: 'livingroomextension-usb-socket'
output:
- platform: gpio
id: light_relay
pin: GPIO12
light:
- platform: binary
id: relay1
name: Floorlamp
output: light_relay
status_led:
pin:
number: GPIO0
sensor:
- platform: wifi_signal
name: '${device_name} wifi signal'
update_interval: 60s
accuracy_decimals: 0
- platform: uptime
name: '${device_name} uptime'
unit_of_measurement: days
update_interval: 300s
accuracy_decimals: 1
filters:
- multiply: 0.000011574
I use it for controlling a floorlamp by the couch (in socket 1), and then just for poweroutlets and as a usb charger.