That's the name of the game...WAF Test! Keep 'em happy or they'll threaten to rename it to WIFEitat.
You should get the Hubitat Award for Creativity! That is awesome!
I live in California and I think a similar setup would be a great earthquake detector. Of course, the house shaking and rattling is a good indicator too.
Yeah, I got a good laugh out of that spring mount. It needs some googly-eyes, though.
Ooooh....maybe I'll break into Wifey's craft stuff and decorate the sensor. Haaaa!!
How would you write a rule that would not arm until it has vibrated for a set time. For me, I was thinking that if it vibrates for a minute, that should arm it, then if it doesn't vibrate for 5 minutes, that should trigger the wash complete notification but I have no idea how to write that rule. I'm willing to live with a 6 month battery swap.
"A Rule" <-- that's a bad starting point
In Hubitat, Rules are free. Start with a rule per state and THEN see if you can reduce.
You'll need a Rule to measure the Arming. That will be tested in the 2nd Rule.
Hard time with simple rule
Ok, how would I write a rule to measure the arming? I can see when acceleration is active but I have no idea how to tell when it has been active for 1 minute.
The Vibration sensor hasn't triggered since the last wash, so the False Action has occurred, thus the 'other rule' is disabled by virtue of the Private Boolean.
Once the vibration triggers, it must run for 120 seconds continuous. Any 'false starts' and it gives up, waiting for vibration to start again. When it does run for 120 seconds, the 'other rule' is enabled by virtue of the Private Boolean.
The 'other rule' is dead until the Private Boolean gets True. Once True it waits for vibration to end, continuously for 5 mins, and then sends a message (in this example.)
The "arming" rule waits 5 mins 30 seconds of no vibration to disable the 'other rule.'
At the bottom of this Rule, inside Restrictions is a switch for the Private Boolean that needs to be on:
Thank you. I haven't gotten the hang of private booleans yet. I thought it through and came up with these two rules. Can you take a look and tell me what the advantages and disadvantages are for each approach... And also is there a way to do push notifications instead of sms?
In this case you are using a Virtual switch device in place of the Private Boolean. Potato / Tomato
Absolutely. Visit https://pushover.net and create an account for yourself. It's free for a week. $5 for the rest of your life. Completely worth it and you can send 7500 notifications per month, no extra charge.
Next, create a Virtual device and set it to use the built in Pushover driver. You'll need to paste the two 'keys' from the account created to the Device page [Pushover API Key, Pushover User Key] and the name you gave your phone.
Now instead of sending a SMS you just pick that virtual device and Bob's your Uncle.
So there are no advantages or disadvantages to either method... And seeing up pushover now, got a hubitat icon?
Right Click, view image, save it as Hubitat72x72.png
The Virtual Device method seems to be easier to grasp. Lots of people are using it and I don't see a lot of questions about HOW that works.
Hubitat's Rule Machine (RM) has so many ways of doing something similar, that for a Binary State, a virtual switch is overkill. (You than have the virtual in your list of devices, meaning it's name better be really good ) Private Boolean, Evaluate Rules, Run action of a Rule, Pause/Resume a rule.
Until the latest release, the only way to Count was to use a Virtual Dimmer and set it's dim value -- that wasn't overkill THEN because it was pretty much the only way. Now we have Global Variables and they do the same.
Another place a Virtual would HELP is if you had something other than RM to communicate with. Motion Lighting could set a Virtual on or off that would be seen in RM to do other work. Neither Private Boolean or Global Variables are accessible outside of RM. Yet another, is Hub to Hub. I have 3 hubs interconnected and I could have Virtuals on one hub cause an action on either of the other two via Link to Hub.
So, from a high level there are differences that can be exploited, but for your particular pair of Rules, there's not much difference.
Good RM Example rule_machine
I wanted a dark mode icon
My first reaction to this... That would make one hell of a "smart" cat toy! I may have to try it so I can get notifications that my cats are playing.
Wifey decided that we needed to have 4 cats for SOME UNKNOWN REASON! Needless to say, motion sensors have been used over the years on the little F'ers. Haaaaaaaaaaa!
I am still getting inconsistent vibration while machine is running. I may have to construct something to amplify vibration. Any other hints on a place to put the sensor on the machine to get the most accurate results?
I gave up on multipurpose sensors and used smart plugs which report energy usage. I put one on the washer and one on the dryer. (note this won't work for electric dryers)
I also created two virtual switches (Washer Active, Dryer Active). These are used in dashboards for at-a-glance status, as triggers for Alexa TTS (speaks when either switch is turned off), and also restrictions for the opposing rule (since energy reporting can be noisy).
It's not a cheap solution, but one that has proven to be quite reliable.