Washing Machine Monitor using Xiaomi Vibration sensor

I had a spare Xiaomi Vibration sensor laying around so I figured I’d put it to good use.

Attached it to the washing machine and it gives me this pattern:

Basically you see me slamming the door of the washing machine on the left, and then intermittently and at the end some heavy vibrations due to the spinning.

What I did was the following:

  • Create a history stats sensor counting the amount of ‘vibration’ events from the Xiaomi sensor in the last 15min, which gives me this:
    53

  • Create a boolean ‘washing machine is running’

I fire an automation when the count of the history stats sensor is above 4, if the boolean is set to off. Actions are turning on the boolean (so I only fire the automation once), delay of 15 min (after the spinning it’s a couple more minutes before the machine is finished), then I push a notification to my phone and turn the boolean off again.

I had a couple of dry runs checking if the pattern is more or less the same every time, it works really well :slight_smile:

8 Likes

I have tried to do the same thing but my sensor is not sensing the vibrations of the washing machine. Where have you placed your sensor?

@denis.besir, you can change the sensitivity of your vibration sensor through the Xiaomi Gateway, and you can probably do it through other gateways as well. I did this and I managed to get mine working, but I used NodeRed instead.

I placed mine on top, at a corner. Perhaps your machine vibrates less?

Just picked up the same sensor so hoping to do something similar!

I tried also.
I finally ended up by using a Shelly 1PM for about the same price. Way more reliable ! :wink:

I don’t want to go that route I’ll have no use for these vibration sensors!

Do like everybody : put it under your bed ! :wink:

hey @Skye how do you know the last 15min of the wash cycle?

The machine typically does quite a bit of high speed cycling which causes the vibration sensor to trigger a lot, I played around with the counter a bit to figure out the right threshold so it doesn’t prematurely think the machine is almost finished during a mid-program spin-up.

I guess it depends a bit from washing machine to washing machine, best way to figure it out is to put the counter in the HA recorder and keep track of it for several runs of a program and find a pattern.

1 Like

For anyone looking on how to do this with Aqara/Xiaomi vibration sensor…
The sensor can not sense the long vibration, it just gives a discreet vibration event and then resets and then a minute later gives another one and so on.
looking at the trigger pattern when it is attached can give you a good idea on how many events you need to count within a timeframe.

I haven’t found this post, I used Statistics sensor solution from this post

They both do a similar thing, choose what to play with.