I am very happy with my set of flows that inform me when my laundry is done. It was quite some work to get it right and with help from you here on this forum I was able to manage it. I though: why not give some back. Here it is, a tutorial for some who might need it. Check the ‘situation’ description if you could need it!
Situation
You have a washing machine in a place where you can’t hear them. Usually the washing machine is finished quicker that the dryer. If they’re both on you want to be notified when both are done, so you can transfer the wet stuff in the dryer. But you also want to be notified when there is just one appliance in operation.
Prerequisites
You need a smart plug with electricity features. I use the TP-Link HS110 plugs. You need one for every device (so both washing machine and dryer).
Preparation
First we need to figure out which power consumption is usable for our flows. If you have the plugs installed and have ran a cycle you can see the power consumption of both machines in insights.
We need a power consumption threshold to determine when the machine is on.
This seems simple, but do not choose a value too low. It is not important that we trigger the status directly after you turned the machine on. It is more important that things run in a good was. Picking a low threshold may trigger the flow again.
We built in a check for this too, by the way.
And we need one to determine when it’s off.
That last one is tricky. Some machines pause before the last cycle. You can see that my washing machine drops and then slightly raises again. It also never uses 0 W. I found out that 2W is a safe value.
My dryer does something when it’s done but isn’t yet emptied. It uses around 12 W for that.
Check your own InSights. Remember that, if you use different programs, that the cycles and power consumption may change! You monitor things, you can built in log cards into your flow.
Let’s get started!
STEP 1
We use a few variables to guide things the right way.
-
Variable Berging - Notificatie was klaar (or Laundry done), integer, set it to 0.
This is the heart of the whole thing. When a machine starts, it adds 1 to the variable. When a machine is done, it’s subtracts 1. When the variable is 0 that is the trigger that the laundry is done. It doesn’t matter if just one or both machines are running. The math always works and goes back to 0. -
Variable Berging - Wasmachine bezig? (or Washer on?), boolean, set it to false.
This is a variable that marks a machine as busy. -
Variable Berging - Wasdroger bezig? (or Dryer on?), boolean, set it to false.
This is a variable that marks a machine as busy.
The two variables Melding [device] you see in the flow are not necessary, I use them for another purpose.
STEP 2
We make a flow to detect when the machines are on. These are mine:
How does this flow work?
- As you see the flow starts when the power consumption is changed.
- When the power consumption is more than 80 (washing machine) and 400 (dryer) and while a variable (machine = busy) is false the flow continues.
- The flow flags the busy variable to true, because the machine is running.
- The flow adds 1 to the heart of this whole thing: the variable to check if there needs to be a message when they are done.
STEP 3
We make a flow to detect when the machines are off. These are mine:
How does this flow work?
- The flow is also triggered when the power consumption is changed.
- When the power consumption drops below 2 or 100 and the variable per machine indicating that it is in fact running. the flow continues.
- It changes the busy variables to false. To mark the machines as done.
- It also subtracts 1 from the “done” variable.
STEP 4
We make a flow to notify when things are done.
Everything is setup to determine when the machines are running and finished. Now we need to trigger the series of events when one or both are done.
How does this flow work?
- The flow is triggered when the variable indicating that one or both machines are busy changes.
- We only need action when both machines are done, so the flow continues only when the variable is 0.
- In the “than” portion of the flow you can do whatever your want. In this case I do get a line on the timeline and my Homey calls that the laundry is done.
Optional step
What is Berging - Waar droogt de was?
This is a variable that stores text. In an other flow I calculate if the weather conditions outside are suitable for hanging the wet stuff in the air to dry. If the humidity is to high, I prefer to use the dryer.