Homey Community Forum

Aqara Motion Sensor - Ikea Trådfri

Hi all!

I bought my Homey early 2019 a few weeks ago and up to now I really enjoy using only 1 app instead of 7 to control my home :slight_smile:

In the kitchen I have an Aqara Motion Sensor which I use in combination with some Ikea Trådfri lamps. The idea is to switch all the lights on in the kitchen when there is motion detected. The flow is: when motion sensor sees something and it’s after sunset; turn on the lamps. No problems so far.

However, this motion sensor checks (based on what your preference is) between 60 till 86400 seconds for motion. I use 60 seconds. I now have a flow that the lights turn off in case there is no motion detected. This works, but the lights in my kitchen will go off, and directly on when i’m still in the kitchen after 60 seconds.

Any tips/tricks to prevent this off and on switching?


Are you moving in the sensor’s field of view during those 60 seconds?

Yes, I do. Looks like the motion sensor switches automatically to no motion detected after the 60 sec. Then immediately back to motion detected. The lights also react like this -> off after 60 sec and immediately on again.

Your flow is much to simple, you have to use a countdown or logic cards. Maybee this post can help you: Kitchen light goes of

Try setting a higher value (65 or 70 seconds). Perhaps (not sure, can’t test myself) the value you can set is the timeout period, not the grace period.

If that’s the case, setting the timeout to exactly the same value of the grace period (which might be fixed to 60 seconds), what happens is:

  • the sensor triggers at time 0, sends a “motion detected” message, and goes to sleep for 60 seconds
  • after 60 seconds, the timeout has expired (the 60 seconds that you configured) so it sends a “no motion detected anymore” message
  • however, when it sees motion at that time it will immediately send a “motion detected” message again

So it first sends “no motion detected anymore” followed by “motion detected”.

If you increase the timeout, this will happen:

  • the sensor triggers at time 0, sends a “motion detected” message, and goes to sleep for 60 seconds
  • the sensor wakes up, notices that the timeout hasn’t been reached yet (that will happen at 65 seconds, so it still has to wait 5 seconds), so doesn’t send a “no motion detected anymore” message
  • if the sensor sees motion in the period of 5 seconds, it will reset the timeout back to 65 seconds, send another “motion detected” message, and goes to sleep for 60 seconds; otherwise, it will send a “no motion detected” message after 5 seconds since it woke up again
1 Like


First load the App named Chronograph. Than you have to make 2 Flows…

1st Flow (Light goes on) :
-motion sensor detect motion

  • it is after sunset
    -Turn light on
    -Start or replace Timer (Chronograph) - give the timer a name and a run time.

2nd Flow: (turn the light of)

  • Timer (type your name you gave it in Flow one) has finished
    -Turn the Light of

The Timer starts every time new, if the motion sensor detect motion. So the light will go out first if the sensor detects no more motion in the room.


This was the issue! I changed it to 65 and now it works like a charm. Thanks for this Robert!

And also thanks for the other tips, I’m learning a lot :slight_smile:

1 Like