Re-evaluate motion sensor status after delay

apologies if this has been covered elsewhere, but i have a particular scenario that i'm trying to work out.

My dining room lights are on a motion sensor; a fairly standard rule in rule machine that evaluates the sensor status to turn on the lights, but then turns off with different intervals depending upon whether an associated switch is on or off.

My dining room adjoins the kitchen and it is open plan, so every time i walk past the dining room while in the kitchen the dining lights come on. The obvious solution is move the sensor, but I was wondering if there's a more elegant solution that evaluates the rule the first time, then a second time after a delay - thus:

  • If motion is detected then turn on the dining lights at low level.
  • If motion sensor is still active 5s after the motion was initially detected, then raise to full brightness. (the 5s appears to be the cycle time of my motion sensors)

that way they'd still come on dim as i walk past, but would not be bright until I entered the room.

My mind is blank as to how to achieve this, so thoughts welcomed as to whether it is possible! Thanks.

I do this with my big lights in the kitchen/dining using a virtual switch. If motion stays active for 10 minutes, then the lights turn on. Otherwise just accent lighting in the room for a drink or whatever quick. I sure wish I were at home to look up the rule for you. I'll give you a description and maybe this will help to spark your imagination. If motion is active in either room, then it turns on a virtual switch. That switch toggles on and off with motion. then another rule is set to turn on the lights after a 10 minute delay if that switch is on. If it's off, then the rule cancels. It's actually pretty darn accurate overall, though it might seem like it would take a while to turn on those lights, but i have several motion sensors to detect activity in the two rooms and they all have to be inactive. I was thinking that you could do something like that for your rule?

Slightly off topic, but what motion sensors do you have that evaluate every 5 seconds?

Ah, yes - that makes sense. Thankyou. i was trying to think of a rule that would do it all, however two rules are probably the answer. One rule to put the lights on dim with any motion, and another one to go to full brightness if a virtual switch is on for more than x seconds using 'cancel delayed actions' in my resets. I'll give that a go when I get chance.

In truth it's not too far away from what i'm doing now, i guess...I think I just needed inspiration!

thanks,

1 Like

I'm using a Samsung Smartthings sensor; in the logs for the sensor status changes i recall seeing instances of it going from inactive to active to inactive in 5s - which i assume is resulting from the sensor 'resetting' after losing motion.

I can report back next time i have a look.

thanks.

Awh .. well I'm just a girl with a good idea from time to time. I'm glad that I could inspire you! Good luck and I'd really like to hear about what you ended up doing with the rule. My kitchen and dining rooms have the most complex setup in the house. Always lots going on there and it's always changing. I strive to NOT press a button and to NOT ask alexa for something. That was the stipulation my husband put on this hobby. Mostly, the HAF stays high if I follow that standard. (He's so spoiled)
[EDIT]
I do have my accents brighten on motion in that room. I'll post the rules here later this evening.

2 Likes

@c.j.winter here are the rules that I mentioned. This one dims the kitchen cabinet lights if there is not activity and brightens when there is. We use this automation more than the overhead lights. Unless we're doing something. Then the lights will come on after 10 minutes of activity. Here are the rules

image

This is the kitchen with the accents at 100%

4 Likes

Brilliant, thanks - I'll have a read tonight.

Thankyou.

1 Like

Wow, April! :astonished:

Amazing rule, I have to admint, well done!
I just wish we could cut and paste in rule machine...
Setting this one up is a few clicks, for sure!
Thats why I mostly use the lighting apps out there.
Getting the IFs and THENs correct in right places can be a challenge sometimes. I need more trail and error time... hehe.
This rule will for sure help many to set up lighting in RM, for sure. I have tagged it to find it again.
THANKS!!!
RogerThat
Oslo, Norway

1 Like

PS: Nice kitchen, by the way! :slight_smile:

1 Like

Why thank you! It wasn't something that I set up in one sitting. I got one aspect working on it and moved on to the next until I molded it to what it is there. My kitchen is my favorite automation because there is so much going into that room. I strive to make my house interact with us, so this has helped. Also, lots of motion sensors. It's definitely a showpiece when people are over. Knowing how much work it was, I'm happy to help with a rule like that.
And I'm glad you like our kitchen. I was fortunate to be able to remodel it when we bought it two years ago. :flushed:

3 Likes

Yeah, I also thought that rule was not cocked up in one go.
It is very cool and took things to the next level for sure! Great work!:slight_smile:

Fantastic remodeling job! Just love it! I bet its even better looking with evening light mode on. :wink:
Personally we like warm lights in most rooms, but automating color temperatures(cooler/brighter) during the hours one usually coocks, is a cool automation feature. :slight_smile:

Yah. I tried to keep the KISS method in mind. So I just kept adding kisses. HA! :kiss:

That was a very nice compliment. Thank you!

Thanks! That's my regular light mode. The big lights turn on after 10 minutes of activity in the room. The only time all of the lights come on automatically in the kitchen/dining room are between 5pm and 7pm for dinner. I like the warms in the bedrooms and living rooms. The cabinet lights are just enough light to do something quick in the kitchen or dining. If you're not quick, you'll get the bright ones. :grin:

1 Like

Haha, yeah. I guess if one open the fridge and look for something snacky for more than 10 minutes, the automation rules are not faulty and to be blamed... Hehe!
PS: Might happen to many of us... How many times during an evening do we open the cupboards to look for some «small snacks»? Hahaha
Should install some contact sensors and set up warning notifications (appmessage/sound/light alarm) if they are opened after dinner time... Hohoho

1 Like

Oh, my pantry light turns on if I open that "snack" door. :grin:

I distinctly remember my father making a statement when I was young "Do you think something is going to change in there? I should just take a picture of it and post it on the door." haha! At my house, the pantry is where you want to be.

Haha, love it!
I actually say that to myselves from time to time... hehe.
The answer is always NO! Hahaha
RogerThat

1 Like