Help with a rule

I want to create a rule that will turn on a light if motion sensors have been active (off and on) for more than 10 minutes, this idea is complicated, so I have no idea where to begin. I believe that I need more than one rule to work together, but where to start.
Here is the scenario:

3 motion sensors one is a multisensor 6
4 light sources

These lights turn on and off based on lux, mode, and activity.

During off times, the lights may be (restricted) off, but if there is activity in the room (kitchen) for more than 10 minutes, then It's probably warranted to turn on lights. The sensors go active and inactive, so that's not working for me to turn the light on if I'm in there. Can't base it on lights because some may not be on based on time of day. So I could really use some suggestions on how to tackle this problem. My goal is not to have to manually turn on a switch. I don't want to make this too long and cumbersome to read. I'll be paying attention to my thread, so any questions or solutions, I should see right away.

TIA

The first idea that comes to mind is to use one rule to turn on a Virtual Switch based on motion of any of the sensors. Make sure that the delay for OFF also includes CANCEL. This gives you 1 switch which you can use in another rule...

Rule 2, If Virtual Switch is ON, Delay 10 minutes and then turn on real Light Switch(es). When Virtual Switch turns off, turn off real switch(es).

Something like that should work. You might also be able to use the private boolean.

Or, I bet someone else will come along and tell you how to do it with one rule! :wink:

I'm totally gonna try this right now. Thank you!
Since you're here, is there a way to use a rule to refresh a device status? My multisensor in my kitchen could stand to be refreshed when there is motion, but I don't want to constantly refresh it. Just once when the initial room wakes up. Any ideas on how to do that? (I'm totally taking advantage of the help while it's here.) It's for that same rule. I obviously don't want light on if it's bright enough in there either.

Sure thing! In Rule Machine, add a TRIGGER. Use the Motion as the trigger, and make the action REFRESH of the device in question.

I looked there and it didn't dance. I'll look again after I finish up your first suggestion. thanks! I'll post back in a few minutes.

Here is a test RM Trigger that I just created as an example for you. This assumes that the device you want to REFRESH has the Refresh capability defined. Do you see a REFRESH button when you view that device's detail page?

1 Like

I created a rule that turns on the virtual switch and off after a delay of 5 minutes if no action. Then a separate rule for the lights I'm going up to test this now, but wanted to post it in case you have other suggestions. I'll still be connected to this thread.

The rule turns the lights on if the vs had been on for 10 minutes. Turns the vs off after 5 mins of inactivity. As soon as I'm done walking circles in my kitchen for 10 minutes I'll check it out. Thought of using this vs to translate into my other kitchen rules.

Let's back up. The original problem was how to get my kitchen lights to turn on if I'm in there and active for 10 minutes. The solution that @ogiewon suggested worked perfectly. It's just simply an avenue to turn on said lights if that switch has been on for more than 10 minutes and the lights are in an off state. What was not communicated was that there are completely separate rules that take care of the normal use scenarios of on and off . So this solution is just for those times that it would be nice to have the lights on outside of normal use. Do you feel like this will work? If I do push that threshold and the lights do turn on, there is nothing keeping them on based on that vs. So they'll turn off again based on the off rule already set in place.

Ok, so this worked as intended. I left out the part where the vs turns off the lights because I have rules in place to take care of that. I just wanted the outside of the norm scenario to turn these on. That VS will come in handy. I totally need to remember to look to virtual switches to solve these types of problems I often forget that. Thanks for the help on this one.

Of course, there are a thousand ways to peel this potato and others will look at it, I'm sure. I'm open to suggestions. This solution was definitely the short route because I didn't have to reconfigure my existing rules to make this fit.That was nice. Thanks @ogiewon for the lesson. I'm going to look into that refresh rule and set some restrictions so these lights don't rule the roost 24/7.

1 Like

This rule doesn't refresh motion sensors? I need it to update lux in my multisensor 6. Is there a way to do that?

I donā€™t have a Aeon Multi 6, so I do not know what options are available for manual refresh, if any. Itā€™s all based on what the device supports.

Awh nuts!

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