I have gotten frustrated trying to host some logic in a python script for detecting vibration using an accelerometer, and figured I’d use MQTT to send an average value to openhab every 5 minutes, and do the calculations there. Troubleshooting was just too difficult.
I’m thinking I’ll take a baseline every 24 hours and store that in a variable. Then, with every change, if the five minute average is ‘measurably’ different from the baseline I will set a device to be on or off.
Does this sound like a good approach? Does anyone have a sample rule/script they’d like to share?
Are you just trying to determine if the washing load is finished?
Have you thought of other approaches like monitoring the power consumption or even listening for that special beep that most machines make when they are done?
I’m just asking because I’d like to send out notifications when the load is finished too and have just started thinking of the different ways I could do it.
The most common approach for detecting if a washing machine (or any other electric device) has stopped working is monitoring it’s energy consumption. The easiest way, I think, is to use a smart Z-wave plug.
The solution would be to have a rule triggered if the energy consumption drops from a high value to a near zero value.
Thanks all. I’m pretty far along with the vibration sensor - having thought about detecting the completion LED (passively or actively) but vibration seemed easiest. The principal of detecting on versus off still applies (my high-efficiency washer appears to sleep often during a cycle), and how best to achieve it in OpenHAB needs to be worked through. I have a Raspberry Pi near the units and have a 3.3v arduino connected to it over serial for reading the accelerometers (one for washer, one for dryer).