I have a ST Multipurpose sensor attached to the side of my dryer. Previously in ST, I had a rule that triggered when vibration activity changed. If the vibration was active for 10 minutes when the vibration stops then it triggered a virtual contact sensor that allowed Alexa to yell at me to get the laundry out.
My attempts to recreate this seem to be stymied by the inability to set 10 minutes of activity as a condition before triggering the contact. Without it, every little bump sets the motion followed by Alexa yelling to get the laundry a moment later when it settled.
I would love if someone could point me in the right direction.
I have the same setup.
I check if there is vibration. If there is, I check it again 10 minutes later. Then when it goes inactive, I send an announcement.
Here is a link to the Rule I use and it works great.
I am also using a Samsung V5 Multipurpose Sensor. I stuck it to the side of my dryer with Velcro
Local Variables:
LaundryRunning: Boolean -> False
Legit: Number = 0
Trigger: Vibration Sensor Active
IF (Variable LaundryRunning(false) = true(F) [FALSE]) THEN
Exit Rule
ELSE
Set LaundryRunning to true
Repeat every 0:03:00 (stopable)
IF (Dryer Sensor inactive(T) [TRUE]) THEN
Stop Repeating Actions
END-IF
Add 1 to Legit
END-REP
IF (Variable Legit(0) > 3(F) [FALSE]) THEN
Notify SM-G970U: 'Dryer Cycle Complete @%time% on %date%'
END-IF
Set LaundryRunning to false
Set Legit to 0
END-IF
Basically it runs for 3 mins, checks to see if its off, if not it runs for another 3 mins, etc.
The Legit value> 3 means it has to check 4 times or 12 min. before sending a notification.
This helps from getting false notifications when you are checking on it or folding clothes.
If you change the legit to >2, that means running for 9 min.
My notification is different, I use Inovelli LED bars for notification. They flash yellow for 15 minutes
This rule won't work. It will never get to the second Wait, as a new Active event will cancel the Waits. If there is no second Active event, the rule exits.
Stays active? These multisensors, if attached to a dryer, will flip in and out of active. Every time it goes active, the wait is cancelled. So it starts over until eventually, the dryer actually stops, at which point it will exit the rule without notifying.
Thanks all, this definitely helps. I was so focused on "needing" the sensor to be active for 10 minutes that I didn't consider other ways to achieve the same thing.
I have one of these sensors attached to my dryer and it does not go in out of active while the dryer is running. I use webcore and I trigger if the sensor stays active or inactive for 5 minutes, it's one of the rules I never converted to RM. Maybe I am just lucky but once my dryer starts the sensor stays active, or maybe webcore handles it a bit differently.
I think it depends on the dryer and the sensor placement. I had one on a dryer, and it went in and out of active/inactive continuously while the dryer ran. It's not hard to create a rule to deal with that -- it's equivalent of a motion activated light, where you don't want to turn it off until it is really inactive.
I am still learning RM, but this is the rule that I am using which seems to work pretty well for me (of course different dryers and use cases will want need different timings) :
What happens is the dryer starts, sensor goes active. If the sensor cycles inactive/active the Wait for Elapsed time is cancelled and it keeps waiting. For those whose sensor stays active, then once it goes inactive the one minute timer leads to the notice that it's done. Basically, it will send the notice after it's been inactive for 1 minute.
There is one potential problem with this rule: On my dryer opening or closing the door would sometimes make the sensor go active. So this rule would send the notice 1 minute after that happened.
That's just a virtual device I have that uses the Virtual Omni Sensor driver that can be found in our public repo. It's handy for testing rules that need some random sensor type.