Making a dumb dryer smart

When I first started automating stuff around my house, Notifications from my washer and dryer were high on the list of things to do. I created a notifier for my washer using a wemos D1 mini and IFTT (project can be found here) as one of my first projects. It was a lot of messing around but it was cheap and has worked well for some time. I needed to find a different solution for my dryer as it had no running led that I could use to passively get the status from. After a lot of messing around with a vibration sensor I gave up when I saw a TP-link HS110 smart plug on sale.

My current solution for dryer notifications is all handled by the Home Assistant platform that I have running on a raspberry pi 3. Basically Home assistant can see my HS110 smart plugs energy usage and let me know when the current drops below 100W.  While the HS110 is primary designed to be a smart plug I leave it on all the time and only use it to pull the energy readings. Note TP-link also sell a similar looking cheaper plug known as the hs100, this plug lacks the energy monitoring option so it would be useless in my case.

Below is my Home Assistant configuration.yaml file

Note that the input_boolean: is there to make a fake switch in the Home Assistant GUI to indicate state, the sensors you can see in the pic at the bottom of the page.

#configuration.yaml

switch: 
  - platform: tplink
    host: 192.168.x.xx  # You will need to find out the ip of your hs110

input_boolean: 
  dryer_switch:
    name: Dryer
    initial: off
    icon: mdi:tumble-dryer   

sensor:
  - platform: template
    sensors:
      dryer_current:
        friendly_name: 'Dryer Current'
        value_template: '{{ states.switch.dryer.attributes["current_power_w"] }}'
        unit_of_measurement: 'W'
 
      dryer_total_kwh:
        friendly_name: 'Dryer Total kWh'
        value_template: '{{ states.switch.dryer.attributes["total_energy_kwh"] }}'
        unit_of_measurement: 'kWh'

      dryer_today_kwh:
        friendly_name: 'Dryer Today kWh'
        value_template: '{{ states.switch.dryer.attributes["today_energy_kwh"] }}'
        unit_of_measurement: 'kWh'   

Below is my Home Assistant automations.yaml file

As you can see below I am using Google TTS to send an announcement to my Google home speaker. You could send your notification anyway as Home Assistant has many options. The first 2 automations above are just setting the position of the fake switch in the Home Assistant GUI.

Some of you who are familiar with Home Assistant YAML code may wonder why I am setting the switch on only after 1 min and why the off switch state will only trigger if it had previously been on. I was getting some phantom “The Dryer is finished” announcements so these changes were so a short spike would not set the fake switch on. Also I found if the hs110 dropped off and on the network I would get an announcement, at one point I looked at at my Home Assistant dashboard and the dryer current and kWh had no value, as soon as the value returned another announcement was heard. Since I added these checks I have not had an issue.

# automations.yaml

# Dryer switch state on
- id: dryer_on
  alias: Dryer On
  trigger:
  - entity_id: sensor.dryer_current
    platform: numeric_state
    above: '100.0'
    for:
      minutes: 1
  action:
  - service: input_boolean.turn_on
    entity_id: input_boolean.dryer_switch  

# Dryer switch state off
- id: dryer_done_switch_state
  alias: Dryer Done switch state
  trigger:
  - entity_id: sensor.dryer_current
    platform: numeric_state
    below: '100.0'
for:
minutes: 2 condition: - condition: state entity_id: 'input_boolean.dryer_switch' state: 'on' action: - service: input_boolean.turn_off entity_id: input_boolean.dryer_switch # Dryer Done announcement - id: dryer_done alias: Dryer Done trigger: - entity_id: input_boolean.dryer_switch platform: state to: 'off' condition: - condition: time after: '8:00:00' before: '23:00:00' action: - service: tts.google_say entity_id: media_player.hallway_speaker data: message: 'The Dryer is Finished.' cache: true

And below is what my Home Assistant Laundry card looks like.

 

Update September 2019: I recently swapped out my 20 year old dryer for a more modern, less faulty unit. This new dryer keeps stopping and going back the other direction to reduce tangles and wrinkles. The pauses were giving me false finish notifications that I have now eliminated by changing the switch off state check to wait for 2 mins before reporting it is off.