Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Ocir

macrumors newbie
Original poster
Apr 24, 2015
27
0
Denmark
Hi,

i have an aqara motion sensor connected in homekit
i want to setup a automation to turn on the light, and stay turned on until i leave the room.

right now the light turns off after 20minutes as the automation says, but i thought that it triggered a motion in that period of 20 minutes and reset the timer.
 

Itinj24

Contributor
Nov 8, 2017
4,479
2,562
New York
Seems like a limitation with HomeKit. Same thing happens with the Hue motion sensor. It’s like the sensor is disabled after the initial motion is detected. I keep trying to think up ways for workaround to this but fall short rendering motion sensors useless in my case.
 

StumpyBloke

macrumors 603
Apr 21, 2012
5,405
5,990
England
My lights stay on as long as the hue motion sensor detects movement (which is expected default behaviour). I use them in every room with the same result.
 

Itinj24

Contributor
Nov 8, 2017
4,479
2,562
New York
My lights stay on as long as the hue motion sensor detects movement (which is expected default behaviour). I use them in every room with the same result.
What if you’re still for a period of time... Would the lights go off? I can imagine someone working in an office at a desk isn’t constantly moving. Also, do you manually turn the lights off or do you have an automation to turn them off when the sensor stops detecting motion? How does your setup look?
 

StumpyBloke

macrumors 603
Apr 21, 2012
5,405
5,990
England
Yep if I’m very still they go off. I’ve got the sensors set to high sensitivity so doesn’t take much to kick it off so the lights come on/stay on.

They go off after a particular time depending on the room. All done though the hue app.
 
  • Like
Reactions: Itinj24

Debauch

macrumors regular
Jul 6, 2013
211
366
I’ve never tried this so not sure how it would work but ... when you’re setting up an automation for a motion sensor the trigger is based on “Detects Motion” or “Stops Detecting Motion”. Couldn’t you set up two automations? One to turn the lights on using “detects motion” and one to turn them off using “stops detecting motion”?
 

d.steve

macrumors 6502
Jan 6, 2012
351
150
The way "detects motion" works is the state transition from "no motion" to "motion".

Once motion is detected, it won't retrigger until it goes to "no motion" and then back to "motion".

The Aqara IIRC goes back to "no motion" after one minute, so it would have to not see motion for one minute and then see motion again to restart the timer.
 

malcky77

macrumors regular
Oct 12, 2019
247
108
Perhaps it might be easier to have a second sensor in the same room to work as you want it....1 sensor to trigger when you walk in the room and can detect normal movements when your at your desk, so that the light remains on.......and the second sensor positioned in a way that only sees you as your leaving the room.
 

d.steve

macrumors 6502
Jan 6, 2012
351
150
Ok, I've been giving this some thought, as it's a use case that I've been interested in but haven't gotten to thinking about. So this is a "hmm...what if....??".

Automation 1: on "detects motion" turn on the light. That's it.
Automation 2: on "no motion detected" turn on the light and turn off in 20 minutes.

That way, the light stays on so long as motion continues to be detected, and turns off after 20 min of no motion.

The caveat here is that if automation 1 fires within 20 minutes of automation 2 firing, I think the turn off timer might not be canceled unless automation 2 fires again before the original 20 minutes expires. I'd happy to be wrong, but I'm not at home RN to test.

So, this works only if your motion sensor sensitivity is high enough and/or timeout is long enough that it'll keep detecting motion so long as you're in the room before the timeout occurs.
 
  • Like
Reactions: Ocir

d.steve

macrumors 6502
Jan 6, 2012
351
150
Ok, I've been giving this some thought, as it's a use case that I've been interested in but haven't gotten to thinking about. So this is a "hmm...what if....??".

Automation 1: on "detects motion" turn on the light. That's it.
Automation 2: on "no motion detected" turn on the light and turn off in 20 minutes.

That way, the light stays on so long as motion continues to be detected, and turns off after 20 min of no motion.

The caveat here is that if automation 1 fires within 20 minutes of automation 2 firing, I think the turn off timer might not be canceled unless automation 2 fires again before the original 20 minutes expires. I'd happy to be wrong, but I'm not at home RN to test.

So, this works only if your motion sensor sensitivity is high enough and/or timeout is long enough that it'll keep detecting motion so long as you're in the room before the timeout occurs.

so I just tested and this doesn’t work at all. Sorry.

The “no motion” automation only turns off the light after x min if it turned it on in the first place. It was automation 1 that turned it on.

that means you need to use one automation. Going from no motion to motion will restart then 20min timer.

No idea why this isn’t working for you because for me, the aqara sensor times out in 1 min. So long as it retriggers within 19 more min, the timer would reset.
 
  • Like
Reactions: Ocir
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.