I use a Belkin Insight to monitor my washing machine, and to send me a push notification when the wash cycle is over. This works really well! I would like to extend the technique to my dryer, but it is 220V.
Has anyone found a reliable/safe way to monitor power draw from a 220V appliance within Home Assistant?
Yes, either you cut the cord and put the wires in accordingly, or you can do it with an extension cord (obviously you will need to cut the extension cord, or just buy a cord, plug and socket). The latter is the way I use it. If you have a lot of space behind the socket, you might be able to fit a shelly in there, they can sit behind the socket and looks a bit better, but really that is up to you (and your situation ofc).
You can also use a whole home energy monitor and just leverage it for this specific application. I’ve seen elsewhere where a device like this one https://amzn.to/2OwqpXb works.
I use Blitzwolf-SHP2 with Esphome to monitor my dryer. Works like a charm and very safe! Recently ordered 10pcs of SHP6 to monitor my washing machine, dishwasher, well waterpump, pool pump, TV, coffe machine etc.
I´ve recieved my shp6 plugs and flashed them via tuya-convert. I was a bit lazy and flashed all of them with the same esphome bin and unfortunately I bricked one of them during individual OTA update. At least I only got one to solder
They are not calibrated yet, but I intend to do it similar as Frenck, useing the code below.
#############################################
# #
# BW-SHP6 #
# #
#############################################
substitutions:
plug_name: uttag_esp_03
esphome:
name: ${plug_name}
platform: ESP8266
board: esp8285
on_boot:
priority: -10
# Turn on switch during startup
then:
- switch.turn_on: relay
wifi:
ssid: "X"
password: "Y"
fast_connect: on
# Enable logging
logger:
# Enable Home Assistant API
api:
password: "X"
reboot_timeout: 12h
ota:
password: "Y"
# Sync time with Home Assistant
time:
- platform: homeassistant
id: homeassistant_time
# Text sensors with general information
text_sensor:
- platform: version
name: ${plug_name}_version
- platform: wifi_info
ip_address:
name: ${plug_name}_ip
ssid:
name: ${plug_name}_ssid
sensor:
# Uptime sensor
- platform: uptime
name: ${plug_name}_uptime
# WiFi Signal sensor
- platform: wifi_signal
name: ${plug_name}_wifi_signal
update_interval: 30s
# Power sensor
- platform: hlw8012
sel_pin:
number: GPIO12
inverted: true
cf_pin: GPIO05
cf1_pin: GPIO14
change_mode_every: 3
update_interval: 10s
# Current sensor
current:
name: ${plug_name}_current
unit_of_measurement: A
accuracy_decimals: 3
filters:
# Map from sensor -> measured value
- calibrate_linear:
- 0.0 -> 0.0
- 1.0 -> 1.0
- 2.0 -> 2.0
- 3.0 -> 3.0
- 4.0 -> 4.0
- 5.0 -> 5.0
# Make everything below 0.01A appear as just 0A.
# Furthermore it corrects 0.013A for the power usage of the plug.
# - lambda: if (x < (0.01 - 0.013)) return 0; else return (x - 0.013);
# Voltage sensor
voltage:
name: ${plug_name}_voltage
unit_of_measurement: V
accuracy_decimals: 2
filters:
# Map from sensor -> measured value
- calibrate_linear:
- 0.0 -> 0.0
- 100.0 -> 100.0
- 200.0 -> 200.0
- 300.0 -> 300.0
- 400.0 -> 400.0
- 500.0 -> 500.0
# Power sensor
power:
id: power
name: ${plug_name}_power
unit_of_measurement: W
accuracy_decimals: 1
filters:
# Map from sensor -> measured value
- calibrate_linear:
- 0.0 -> 0.0
- 1000.0 -> 1000.0
- 2000.0 -> 2000.0
- 3000.0 -> 3000.0
- 4000.0 -> 4000.0
- 5000.0 -> 5000.0
# Make everything below 2W appear as just 0W.
# Furthermore it corrects 1.14W for the power usage of the plug.
# - lambda: if (x < (2 + 1.14)) return 0; else return (x - 1.14);
# # Total daily energy sensor
# - platform: total_daily_energy
# name: ${plug_name}_daily_energy
# power_id: power
# filters:
# # Multiplication factor from W to kW is 0.001
# - multiply: 0.001
# unit_of_measurement: kWh
binary_sensor:
# Binary sensor for the button press
- platform: gpio
name: ${plug_name}_button
pin:
number: GPIO13
inverted: true
on_press:
- switch.toggle: relay
switch:
# Switch to toggle the relay
- platform: gpio
id: relay
name: ${plug_name}_switch
pin: GPIO15
on_turn_on:
- light.turn_on: led
on_turn_off:
- light.turn_off: led
output:
# Relay state led
- platform: esp8266_pwm
id: state_led
pin:
number: GPIO02
inverted: true
light:
# Relay state light
- platform: monochromatic
output: state_led
id: led
# Uses the red LED as a status indicator
status_led:
pin:
number: GPIO00
inverted: true
The SHP2 for my dryer is not calibrated. I used a graph to define which current level that should set each dryer state.
Edit 1:
Fixed mixup on state_led(blue) and status_led(red)