Use a TP-Link HS110 to monitor my washing machine

I did this with two aeotec SmartSwitches, one for the washer and one for the dryer. The trick is to monitor your wash loads for data points so you know what the energy readings are for the different periods. Some units will have a constant draw, the dryer unit level may raise when you open the door (cause the light goes on), etc.

Once you figure this out, you know what your minimum power levels are and you can use these in an automation/sensor set up.

I have these two sensors set up (I usually document my code this way):

#
#   Automation Templates
#
#    True when washer power level is below 3.4 watts, high threshold of resting state
#    Default state is true
     washer_pwrdn:
       value_template: "{{ states('sensor.aeotec_smart_switch_6_power_10') | int < 3.4 }}"

#    True when Dryer power level is above 8.4 watts, showing dryer is in operation (as opposed to just having the door open)
#    Default state is false
     dryer_pwrup:
       value_template: "{{ states('sensor.aeotec_smart_switch_6_power_11') | int > 8.4 }}"

I also made two binary inputs to toggle the notification:

washer_switch:
    name: Toggle Washer Automation
    initial: off
    icon: mdi:water
dryer_switch:
    name: Toggle Dryer Automation
    initial: off
    icon: mdi:sync

It all comes together with the automations:

# Washer Notification Sequence

- alias: 'Washer Start'
  trigger:
    platform: state
    entity_id: sensor.washer_pwrdn
    from: 'True'
    to: 'False'
  action:
    service: input_boolean.turn_on
    entity_id: input_boolean.washer_switch

- alias: 'Washer Done'
  trigger:
    platform: state
    entity_id: sensor.washer_pwrdn
    from: 'False'
    to: 'True'
    for:
      minutes: 3
  condition:
      condition: state
      entity_id: input_boolean.washer_switch
      state: 'on'
  action:
    - service: notify.pushbullet
      data:
        message: 'Robert, the washer is done.'
    - service: input_boolean.turn_off
      entity_id: input_boolean.washer_switch

# Dryer Notification Sequence

- alias: 'Dryer Start'
  trigger:
    platform: state
    entity_id: sensor.dryer_pwrup
    from: 'False'
    to: 'True'
  action:
    service: input_boolean.turn_on
    entity_id: input_boolean.dryer_switch

- alias: 'Dryer Done'
  trigger:
    platform: state
    entity_id: sensor.aeotec_smart_switch_6_power_11
    state: '0.0'
  condition:
    condition: state
    entity_id: input_boolean.dryer_switch
    state: 'on'
  action:
    - service: notify.pushbullet
      data:
        message: 'Robert, the dryer is done.'
    - service: input_boolean.turn_off
      entity_id: input_boolean.dryer_switch

Why the 3 minute wait on the washer? Well my power levels drop when the washer is draining or filling for the rinse, so this takes that into account to prevent false positives. This is what I meant about spending time to get to know the cycles.

The bonus here is that because I am using PushBullet, all my devices get the notification and the phone speaks it out loud.

10 Likes