I need a rule to turn on a light when motion is detected, and then turn it off after 3 minutes, but these are the conditions.
only between sunset and sunrise, certain time or based on illuminance. (I'm using aqara motion sensor and I'm not sure if it is capable of measuring illuminance)
IF (Lights On): Exit Rule
IF (Certain TIME) OR (Motion is active AND Time is between Sunset and Sunrise) THEN
On: Light
Off: Light --> delayed 0:03:00
END-IF
What I need is to turn on the light automatically if someone walks in my living room only if it's dark and light is off and then turn it off after 3 minutes.
Sorry for my poor English.
Ah - ok. Then we can forget about the certain time. I don't know if the Aqara sensors do lux, but if they do ......
Trigger:
When motion is *active*
Actions:
IF (Lights On): Exit Rule
IF (Illuminance > 100): Exit Rule
IF (Time is between Sunset and Sunrise) THEN
On: Light
Off: Light --> delayed 0:03:00
END-IF
Replace the 100 with whatever lux value is appropriate for your needs.
Fair enough. I'll post it for Rule Machine but Motion Lighting is the way I would go for this. Select 'Apps' and then 'Add built-in app' select Motion Lighting apps. There are restrictions for Lux and Time in that app.
Try search for Lights on motion pluss app and install that. It's an easy one, if you give up RM.
I have this app running in the living room and here is my rule. Change to 3 minutes instead of my ten, you find under restriction part. Good luck.
Lights on Motion Plus is another option. Try them both and see what works for you. I tried and didn't care for Lights on Motion Plus.
I would stick with the built-in apps first so you know what's available out of the box and then try the other app. That is just my preference. Do whatever makes sense to you.
Here is the RM actions. Depending on how you want this to respond you could move the Cancel delayed actions before the IF statement.
Hmm,
I can’t see this rule turn off the light until next morning when the lux is above set value, if triggered after dark? Does it?
I guess a switch or dashboard tile is used for that, for this one?
The goal I had was to fully automate the light, without any switches, and at the same time minimize the agressiveness and need to keep moving in the room, more than natural. And to be honest, there is not so much movement when laying on the couch and wathcing TV, even with 2 people in the room.
But one motion sensor looking at the room from one side, close to entry points, and another one in the window closer to the U-shaped couch, seems to work pretty well to achieve this. Both with catshing arm movements and the right time to turn on the lights based on outside darkness. Its a tuning thing, so it takes some tweeking, for usre.