Elegant way to check for a signal pattern over time as an automation trigger? (washing machine power...)

Hey everyone,

I’d like to make my washing machine a bit smarter, and was trying to work with what I got. I’ve got the overall watt of the apartment (NOT specifically for the machine itself, unfortunately), and I’ve got a window contact that detects when the washing detergent drawer is closed or opened. From there on, the washing machine cycle looks something like this, simplified:

  • drawer closed

  • 10-15 minutes later => peak above 2000, at least 3 minutes (water gets heated up)

  • 1,5 hours later => peak above 500, at least 2 minutes (tumbling)

  • 5 minutes later => peak above 500, at least 2 minutes (tumbling)

  • 10 minutes later => peak above 500, at least 2 minutes (tumbling)

As I cannot rule out other big consumers influencing the overall watt number of the apartment, I cannot just go by counting peaks. E.g. the watercooker might also generate a peak already 30 minutes after the machine heats the water, and to avoid counting that as the first tumble peak, I also need to take timeranges into account.

What is an elegant way to set that up as a trigger for an automation? My considerations so far are circling around creating a helper and individual automations that get triggered after another if things go according to plan, but is there a way to have that in one?

What I’m thinking about so far:

1st automation:
IF power is above 2000w for at least 3 minutes
AND drawer is closed for at least 10 minutes
THEN set washing_helper to “potential_laundry”

2nd automation:
IF power is above 500 for more than 2 minutes
AND drawer is closed
AND washing_helper = “potential_laundry” for more than 1.5 hours
THEN set washing_helper to “tumble1”

3rd automation:
IF power is above 500 for more than 2 minutes
AND drawer is closed
AND washing_helper = “tumble1” for more than 5 minutes
THEN set washing_helper to “tumble2”

4th automation:
IF power is above 500 for more than 2 minutes
AND drawer is closed
AND washing_helper = “tumble2” for more than 10 minutes
THEN set washing_helper to “tumble3”

5th automation:
IF washing_helper is “tumble3” for more than 5 minutes
AND drawer is closed
THEN set washing_helper to “done” AND send notification

6th automation (cleanup/reset):
IF drawer gets opened OR time = midnight OR washing_helper = “potential_laundry” for more than 2 hours
THEN set washing_helper to “idle”

Of course there might be scenarios that get triggered alone by the right combination of “drawer is closed without us doing laundry” and us cooking water or food, but I’d like to give it a try at least. But ideally without having to create a cascade of individual automations…

Thanks in advance, cheers!

I would get a plug that gives power readings to only track the washer.

Do you really need each step? When I was tracking washer for the wife in the past (new house has main floor laundry), she just wanted to know when it was complete.

I was hoping to get around buying a dedicated device for that. Aaaaaand I’m a bit suspicious of power plugs to run washing machines with. A lot of them are rated up to 3600W, but not for consumers like motors etc.

About the states: in the end I would only need “idle”, “running” and “done”, the other ones are only there to make the logic for jumping from automation to automation more robust.

Works fine for me, mine has been installed for 4 years and is still working good. Just choose some with quality that is appropriate with respect to energy consumption.

Which model is that one?

Got it. I did have to do some crazy stuff like this for the dryer.

I used a THIRDREALITY Zigbee Smart Plug with Real-time Power Monitoring,15A Smart Outlet, Zigbee Repeater on our clothes washer for a year and a half without issue.

In the US and bought from Amazon.

So far I’m happy with my 3rd Reality plugs. You would be using it with a default of on so the relay contacts won’t be subjected to closing and seeing a motor starting load.

Keep in mind that a monitored plug on a washing machine will likely never be turned on and off. therefore there isn’t a be problem when the switch failing due to the contacts closing and the huge inductive load being dropped on it. Most Zigbee and zwave you can set them so that they can never actually shut of, even accidentally. ( except with a power outage I guess. On that event the motor won’t be on either.)
On my sonoff pow I actually internally soldered a jumper across the relay contacts so it can’t turn off.