Making ‘dumb’ Dishwashers and Washing Machines Smart: Alerts When the Dishes and Clothes Are Cleaned

I love the idea of everything in my home being able to communicate with each other. Thanks to Home Assistant I already have a lot of things talking to each other.

This is going to solve a massive first world problem. Or maybe it won’t. I’ll let you decide. The latest trend is for every device in your home to be connected to the internet. ‘The internet of things’. I can’t (or don’t want to) replace the dishwasher in my apartment (I’m a renter). I need to use other tools that will allow me to monitor the state of my dishwasher, and then use that information to tell me when the dishes are clean, so I don’t forget to empty it.

I don’t want to fork out thousands of dollars for a washing machine that can connect to a smart phone app, that will most likely be abandoned at some point in the future. Looking at you, Samsung.

 

Ingredients

I’ll be using the following hardware and software for this. Feel free to replace it with whatever works best for you. You may not have Z-wave, so any power monitor and contact sensor should work, as long as the end results match up.

  • Home Automation Software – I’ll be using Home Assistant, but other Home Automation software can be used as well, just check your poison of choice documentation.
  • Z-wave Power Monitor / Switch – I’ll be using the Aeotec Smart Switch
  • Z-wave Door/Window Sensor – I’ll be using a Fibaro FGK101

 

Monitoring The State

The first step is to decide how you’ll be monitoring the state of the machine. I like to use z-wave power switches, as you can easily tell when a machine is in use by how much power it is drawing. If no power is being used by the washing machine or dishwasher, then they’re off and not in use. The good thing using the Aeotec Smart Switch is it comes built-in with power level monitoring, and can easily be connected to a Z-wave Flood Sensor, so that if a flood is detected power is immediately cut.

I want to be alerted when either my washing machine or dishwasher have completed their cycle, but only if they haven’t already been emptied. There’s no point in sending myself or my fiancé an alert when we have already taken out the washing or put away the dishes.

 

DISHWASHER

First up the dishwasher. Once running, the dishwasher will draw power. Once finished, it will remain in a “standby” state until you open the dishwasher and turn it off. This means I can purely use the power level to determine if the dishwasher has been emptied or not. Once the dishwasher is finished, as long as someone opens the dishwasher and turns off the power, I’ll be able to see the power drop to zero, and mark the dishwasher as dirty again.

 

WASHING MACHINE

Unfortunately my washing machine is a bit smarter. Once the washing machine has finished, it will “beep” to let anyone within earshot know that the cycle is complete. After a couple of minutes, it will then turn itself off so it doesn’t waste standby power. This throws a slight spanner into the works, as I now won’t be able to tell if the washing machine is full and ready to have clothes taken out of it.

For the washing machine, I’ll use a combination of the power monitor and a Fibaro Door/Window Sensor. Once the washing machine has stopped running, I won’t reset the washing machine until the door has been opened, as detected by the door sensor.

 

Obligatory Caution

Before using a smart switch or plugin energy monitor on a high energy device (such as a washing machine/dryer/dishwasher), always check how much power your machine will draw from your smart switch/energy monitor.

See my notes at the end of this post for more details.

 

Defining the Stages

It can be a bit tricky using power levels alone to detect where in the cycle your machine is up-to. During the spin cycle, the power level may drop for several minutes and then pickup again. You don’t want to be alerted each time this happens.

To solve this, I’ll be using Home Assistant’s  input_select  component. This will allow me to define several states that the machines could be in. First, let’s define them.

 

DISHWASHER

Dirty The default state of the dishwasher. Dishes will be packed into the dishwasher until it is full and turned on.
Running The dishwasher is turned on and cleaning the dishes.
Drying The power level has dropped, and the dishwasher can now be considered to be “drying” the dishes.
Clean The power level has dropped for a few consistent minutes, and is now drawing “standby” power. Once power returns to 0, we’ll return back to the “Dirty” state.

 

WASHING MACHINE

Idle The default state of the washing machine. The washing machine is off and clothes have been unpacked.
Running The washing machine is turned on and cleaning the clothes.
Finishing The power level has dropped, and the washing machine will be finishing soon.
Clean The power level has dropped for a few consistent minutes. Once the door opens, we’ll return back to the “Idle” state.

 

Transitioning Between Stages

Because power levels can go up and down, we need to make sure our system transitions between each stage correctly. That’s where the power of using a dropdown comes in. Let’s define some rules for how our machines may change states.

Why is this important? We don’t want to get spammed when the power goes up and down. Using the flow above, we can use delays to ensure that the machine is in the right state. Let’s say the Washing Machine is ‘Running’, and the power level drops. Once the power level drops, we’ll move it into the ‘Finishing’ stage. Once in the ‘Finishing’ stage, we’ll wait a certain amount of time before moving into the ‘Clean’ state and sending our notifications. However, if the power level increases again (such as the spin cycle starting again), then we’ll go back to the ‘Running’ stage, so the process can repeat.

The same logic applies for the dishwasher.

So how can we achieve this in Home Assistant? First we need to setup our input_select  dropdowns.

This will create two dropdown elements in Home Assistant that look like these:

 

Adding the Logic

Now that we have each phase of the machine cycles setup in Home Assistant, it’s time to automate the transitions between each stage. As I’m using a z-wave smart switch, we can use their power levels for this. Home Assistant makes these available to us as additional sensors. We’re looking for the power sensors.

Once you’ve found the entity that is tracking power consumption, lets add some automations to Home Assistant to move through the stages according to the diagram above.

First, the dishwasher is the easiest, as we will only be looking at the power levels.

These automations will change the input_select  component to the value according to where the dishwasher is up to. Once someone turns the dishwasher off, the power will drop below 1 (aka zero) and the dishwasher will be marked as clean.

The washing machine uses some similar logic. Which you can see below. However, we’ll wait for the door to open before we change the status, as it will turn itself off after a timeout.

 

Sending The Alerts

So now the fun part, we have Home Assistant reporting each stage of the washing machine/dishwasher cycle. It’s time to add some alerts around these. A simple alert when the dishwasher is clean looks like this:

That will send an alert to my phone via Pushbullet when the dishwasher has finished. However, that’s not always ideal.

  • If I turn on the dishwasher then go out, I will receive an alert on my phone when I am out, and forget about the dishes.
  • If I turn on the dishwasher at night before bed, I’ll get an alert when I’m asleep.
  • This will only send an alert to me. What if I am out, but my fiancé is home, it would be better to send her the alert so she can empty the dishwasher.

 

Making The Alert Smarter

So let’s see if we can make this notification more smart. Home Assistant will know who’s home and what time it is, so let’s update the automation to include the following rules:

  1. Don’t send an alert if it is after 10:30pm, or before 8:30am.
  2. Don’t send an alert unless someone is home. No point alerting us if no one is home to unpack the dishwasher.
  3. If the dishwasher is clean, and the time ticks past 8:30am, and people are home, alert them the dishwasher is ready.
  4. Only send an alert to the people who are home. Don’t bother anyone who isn’t at home.
  5. If the dishwasher is clean, and someone arrives home, send everyone who is home an alert, but only if the alert wasn’t sent in the last thirty minutes.

Let’s go ahead and make some adjustments to that notification above. First let’s apply rule 1 and 2.

 

We can easily add a time trigger now so that I get an alert at 8:30am if the dishwasher is clean.

 

Now the fun part, rule 4. In Home Assistant, we can use a Notify Group to dictate who will get the alert. I’ll setup three groups. One which will send an alert just to me, one which will send an alert just to my fiancé, and finally one which will send both of us an alert. Let’s go ahead, and change the action part of our alert now.

 

Finally rule 5. We’ll use another for  delay, of 10 minutes. This makes sure we’ve been home for a few minutes to put things down before we’re reminded to empty the dishwasher. It also gives the other person time to come inside from collecting the mail, or chatting up a storm with the neighbours, before the alert is sent.

We’ll use a template condition, to make sure that the alert isn’t sent multiple times. This is important. If my device is marked as home first then two minutes later my fiancé is marked as home, in ten minutes and twelve minutes the alert will be sent to both of us! Which might get annoying, very quickly.

 

The same logic can then be applied to our washing machine alert.

 

Home Assistant Nuances

If you’re using Home Assistant, there’s a few things you can do to make things look more user-friendly on the front-end, and a couple of things to watch out for.

 

Z-WAVE POLLING

In order for your z-wave power modules to report updated power levels, you may need to adjust your polling settings. I have mine set as following.

 

REPORTING OPEN CLOSED STATUS

I’m using a Template Sensor to make the door status easier to use. If you prefer to use the same, here’s how I do it.

 

HOW IT LOOKS

The dropdown menu for the status can get a bit clunky, so I’m also using two more Template Sensors to display a read-only view of the status on the Home Assistant webpage.

Using groups, Here’s how Home Assistant renders these cards.

 

Smart Switches and Power Usage

Devices with spinning parts (ie dishwashers and washing machines) may draw a high amount of power. Luckily for me, I have modern appliances which don’t draw too much power.

Before you plug your washing machine or dishwasher into a smart switch, always check the maximum power draw supported by your smart switch.

In my case, I am using an Aeotec Smart Switch 6 for my washing machine. According to the specs, the Australian version can handle up-to 10 amps of power usage (the US version can handle 15 amps at 120 volts). Looking at my washing machine manual, the maximum power is used when “washing and heating”, which is rated at 2,000 watts. Using a simple online calculator, the maximum amps drawn from my washing machine is 8.69 amps, which is just under the 10 amps supported by the smart switch.

My washing machine is a newer model, with an energy star rating. If your washing machine is older, it may draw more power than a smart switch can handle. You may risk burning out the smart switch, or under-powering your machine and causing damage.

 

Wrapping Up

Using some smart switches, and door/window sensors we’ve now integrated two commonly used household appliances into our smart home. I haven’t had to fork out thousands for the latest appliances with a smart phone app, and even better my home automation controller, Home Assistant is responsible for watching everything.

Using the information already known by Home Assistant, notifications are sent only when required and in a way that don’t spam our phones every-time something happens.

There’s a heap more applications you can use for smart switches, or door/window sensors. What cool automations have you created with these? I’d love to hear them.

Recommended Posts
  • PuckStar32

    Well written and very interesting setup!

  • Alex

    This is great thanks! One thing is to find a way to control the appliances from phone or computer, like being able to start a cycle.

  • Eamonn O’Connell

    Very helpful. Thanks!

  • PuckStar32

    Hi Phil. With the new zwave names, to what did you change this part of the automation?
    trigger:
    – platform: numeric_state
    entity_id: sensor.fibaro_system_fgwpef_wall_plug_power
    value_template: ‘{{ state.attributes.power_consumption }}’
    above: 150

    As that attribute doesn’t seem to exist anymore.

    • Hey PuckStar

      Have you renamed your devices? You’ll need to do that first using the Z-wave panel in Home Assistant, and then rename the node.

      let’s assume I rename

      to

      the automation should look like

      You might also be able to see what the attribute is called from the States menu. This contains all the entities Home Assistant can see.

      Hope that helps!

      • PuckStar32

        So you still have an entity with a attribute “power_consumption”?

        I don’t seem to have that anymore.
        Here you can find all my wall plug entities:
        https://docs.google.com/spreadsheets/d/1IGjXkacd33-AFRYeFlD4dpSYDlRNq-tLSKnfJRlv2YA/edit?usp=sharing
        I didn’t rename the entity because I only have 1 of these plugs so the name given is fine for me.

        I think (didn’t test it yet) that this will work for me:
        trigger:
        – platform: numeric_state
        entity_id: sensor.fibaro_system_fgwpef_wall_plug_power
        above: 150

        • I admittedly haven’t switched over to the new entity IDs myself yet. I haven’t gone through and named all my devices yet.

          However, here’s one I have renamed

          According to the cards for these, the new IDs will just remove the numbers, so they should become

          That is from a Aeotec Smart Switch 6

          • PuckStar32

            I wasn’t necesarrily talking about the renaming. With only 1 device I don’t think it’s really needed.

            Anyway I can confirm power_consumption attribute is gone but this works well:

            trigger:
            - platform: numeric_state
            entity_id: sensor.fibaro_system_fgwpef_wall_plug_power
            above: 150

  • poldim

    What’s your groups.yaml code look like for the image you posted?

    • I’m using a couple of group cards

  • PrinceDroflet

    Good to hear that this Aeotec works for your washer. I’m thinking of switching a wi-fi TP-Link hs110 currently on our old washer with this Aeotec switch to fill up a bit of a gap in my gradually expanding z-wave mesh. I’ll double check the current on this washer but I think it is only drawing 600W at 115V. It uses hot water input, so no heating element. My main usage is to run the washer at 6:20 in the morning before the electricity goes to peak rates, but I’ll try some of your code to get a notification that it is finished the cycle.
    Be very careful using the on-line calculator. Volts x Amps = Watts is true only for DC or for AC with a pure resistive load. For an inductive load such as a motor Volts * Amps = VA > Watts. Look in your washer’s manual for a max amps or max volt-amp rating, or google “power factor” for the technical details.

Start typing and press Enter to search