Any owners of Samsung laundry appliances out there will know they play a distinctive jingle when finishing a job. I find it incredibly annoying (mostly because it becomes stuck in my head for at least two days after hearing it), however disabling the chime causes me to forget to unload my clothes until I run out of boxers.

I’m not a fan of most smart home products, because I distrust the cloud and I like to have control of my data. The only off-the-shelf “smart” products I have are simple Zigbee (802.15.4) devices, and a Roomba (because it can be configured for local control, with its cloud functionality disabled). Thus, when I bought a new washer and dryer a few years ago, I opted for non-smart variants, thus sacrificing a built-in notification capability.

In this post, I’ll exhibit my stubbornness by explaining how I used Home Assistant, ESPHome, and some magic to get my dryer to tell me when it’s done without playing that awful song.

Home Assistant is open source smart home management software, and I’ve been using it for over a year now to control and monitor various things in my home. The ESPHome is a related project that lets you easily integrate Espressif microcontrollers to monitor things that might not have native integrations.

My first attempt to get monitoring for my washer and dryer in Home Assistant involved vibration sensors, however it turned out that modern appliances are simply too well-balanced for this to be a reliable method of detecting if they are running. Thus I switched my focus to determining whether they were actively using any power.

Due to pixie magic (i.e., electromagnetics, physics, etc.), it is possible to detect an electric field when there is current flowing through a wire. Ideally, you can clamp something around a wire and the job is done. This is incredibly reliable, however requires separating the hot and neutral conductors, and I didn’t feel like putting in that kind of effort.

Instead, I redirected my effort into searching for a sensor that can detect current in a cord without splitting it apart. I found this module from Modern Device, which uses a pair of Hall effect sensors to be able to differentially sense a pair of conductors. Magic.

I purchased a few NodeMCU ESP8266 to hook them up to. In retrospect, ESP32 would have been a better choice, as it has multiple ADC lanes, and I could have used one MCU for both appliances.

I connected the sensor module to one, configured ESPHome, and flashed the firmware. The configuration is incredibly straightforward.

  - platform: adc
    pin: A0
    name: "Dryer current sensor voltage"
    update_interval: 1s
    - sliding_window_moving_average:
        window_size: 15
        send_every: 15

Then, the module is simply zip-tied to the dryer power cord.

ESP8266 and current sensor attached to cord

I did some laundry, and it got me a graph like this in Home Assistant:

Plot showing voltage measured from the current sensor while dryer is running

I did not care to do any absolute calibration, so just set up an automation to notify when this voltage goes below a threshold:

alias: Dryer notify
description: ""
  - platform: numeric_state
    entity_id: sensor.dryer_current_sensor_voltage
      hours: 0
      minutes: 2
      seconds: 0
    below: 0.5
condition: []
  - service: notify.notify
      message: "Dryer has finished"
mode: single

That’s it. A lot of effort exerted, all for this:

Notification that dryer finished

The process for the washer was largely the same, but with a different voltage threshold.

More Home Assistant content coming soon, maybe, if I’m motivated.