RM4 rule help

Hello fellow hubitaters,

I'm back to request assistance with a rule I need to implement for the WAF. So we have a motion sensor in our bathroom and my kids tend to take long showers well they are not actually kids any longer but that is beside the point. Anyway no matter what they do they tend to take a lot of time in the bathroom and I want to be able to have google tell them to get off the pot after the motion sensor is activated 3 times. This would be 15 minutes since each time is set to keep the lights on for 5 minutes each.

I have everything needed in place to accomplish this just not sure how to structure the rule and of course I would prefer these notifications would only go off during acceptable times such as between 10:00 AM - 10:00 PM for example.

Since this was the wife's idea and she thinks it would be fun I would really like to implement this rule for her.

Anyway if anyone has any ideas how I would need to structure the rule that would be great!

What type of motion sensor do you have? Your current rule hard turns the lights off after 5 minutes of the sensor going Active even if the sensor is still active? I don't understand that. Why would you have it set up that way? Or do you, in fact, have it set to turn the lights off after 5 minutes of INACTIVITY. Which would make much more sense. What I suspect is happening is that the sensor goes active once when they go in and then goes inactive a couple of times if no motion is detected but then goes active again, preventing the lights from turning off.
But, the solution to your issue is actually easier than all that. Instead of triggering off the motion sensor, trigger off the lights going on. That way, if they are on for 15 minutes, they get the announcement. Then you can cancel that timer on the lights going off.

Hey @Ryan780 that is correct it turns it off if no activity. It's a Smartthings motion sensor I use. I guess my question is how do I use RM4 to account for the time the light is on? I'm still learning RM4 so not sure where I would set this up. I will see what I can find though.

Yeah I have looked at this and not sure how to set this up at all. RM4 I'm sure is a powerful tool but beyond basic rules I just don't get it at all.

What you want to do is trigger off the light turning on with a delay. I know, it's not really intuitive. But the easiest way to figure out what your trigger should be is what was the last device event that happened before the thing you want to have happen. In this case, it was the light turning on. So, your rule would look something like this:

image
So, the trigger in this case is the bathroom lights CHANGING because we want to cancel the announcement if the light is turned off before 15 minutes. Then in the action we begin a delay of 15 minutes that is cancelable when the light is on and cancel that delay if the light is turned off early.

1 Like

Thank you sir yeah I struggle with the more advance rules. I will check this out and let you know. Might be this weekend before I get to it though.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.