Can someone explain motion sensors to me?

Most battery-operated motion sensors will go to sleep for a period of time in order to conserve battery. For example, the guide for my Ecolink Z-Wave Plus Motion Sensors state, "Will wait 4 minutes after a motion is detected before checking occupancy again, to save battery".

This is where I always get confused.

If the motion sensor goes to sleep for 4 minutes following a sensed motion, does it wake up after 4 minutes, look to see if motion is occurring then go back to sleep, or does it remain in a sensing mode until it senses motion?

Let's say you want a motion sensor to keep the lights on when a room is occupied and turn the lights off when the room is empty. You create a rule to turn the lights on immediately upon sensing motion and turn the lights off after 30 minutes of inactivity. What happens if the room is occupied but each time the motion sensor woke up to check, there wasn't any moving for it to detect?

Thanks, Glenn

The ones I have sense and then "sleep" (while in a motion state of "active") for 60 seconds. After that time they revert to "inactive" but immediately become sensitive once again to motion. So any motion from that time onwards will re-activate them once again, and then they will register "active" and then pause their sensing once again for another 60 seconds.

In practical terms, this means that any timeout on your motion lighting should be a few multiples of this timeout time, in order to allow motion to be sensed once again to keep the lights on. I've found in most cases that 4 or 5 minutes is an adequate timeout on lighting to allow sufficient time for the sensor to sense motion once again and then retrigger the motion lighting rule and cancel the auto-off on the lights. For an area that has little motion but where you still want the lights to stay on, you would need to extend the timeout further to allow more time for triggering. Or provide an alternative method, like a camera with person/object detection to still retain the lights on.

And here is an example rule for motion lighting with such a timeout (in this case 4 minutes), in case it helps...

Actually I think the "cancel wait" is not required because the wait gets automatically cancelled when the rule retriggers but I'm superstitious so I left it in lol :rofl:

2 Likes

In the case of the Ecolinks, once the detect motion they go into a sleep state for approx 4 minutes. During this time the status remains as Active. This all makes perfect sense to me.

What's always been a bit unclear to me is what happens when the motion sensor hasn't detected any motion. Does it remain in an "awake" state looking for motion or go in an out of a sleep state in order to conserve battery.

Perhaps one way to test your theory is to:

  • Activate the sensor by moving in front of it and within 4 minutes,
  • Open the device setup page for the sensor
  • Click the inactive command
  • Move in front of the sensor to see if it changes it's status in HE to active

Simon

The 4 minute 'sleep' means that it will not transmit any data over the mesh network to conserve power. The PIR sensor in the device is typically going to continue actively sensing the environment. The 'sleep' is conserving the extremely high level of power that is require to transmit data. Simply monitoring the PIR sensor requires very little power whatsoever. So, during the 4 minute 'sleep', the device is constantly 'watching' the PIR sensor's value. At the end of 4 minutes, if there has been no motion during that time, it will transmit a motion:inactive update. If there was any motion detected before 4 minutes was up, the 4 minute 'sleep' will have been restarted from the time of the last 'inactive' sensor value.

Hope this helps to explain what is going on.

7 Likes

I don’t use Z-Wave motion sensors (except for the one that came with my Ring alarm system) because :nauseated_face::face_vomiting:

My limited experience with them is the ones that take a long time to reset are for security applications, not lighting or other triggers you would like for them to reset faster. Most Zigbee sensors reset from 30 to 60 seconds after no motion. If you need one to reset really fast, the Hue are capable of 5 seconds I believe and you can pretty easily hack a Xiaomi sensor to reset in 1 second. Probably want to also convert them to powered for such an application if they’re going to be used in high traffic areas ( I have hacked the Xiaomi Mijia motion sensor at my front door for this and it is powered by a 5v adapter with a 5v to 3V buck converter).

2 Likes

That explains everything! Thank you.

1 Like

Actually, the Hue Motion has the following Retrigger settings:

10 seconds
30 seconds
1 minute
2 minutes
3 minutes
5 minutes

The Hue Motion Sensor is very fast to respond to motion and seems well built. The motion sensitivity can be adjusted to high, medium or low, which can help if you have pets. It also reports Lux and temperature.

2 Likes

Angus, can you explain this to me? I have always been curious about this. If a motion rule like this triggers a second time or more do all the waits/ delays get canceled, *as well as all actions following wait/delay? I mean if the motion becomes active a second time, and the wait gets canceled from the first iteration, do the actions which follow the wait from the first iteration get canceled too or do they execute to complete the first iteration in full while the second iteration runs?

LJ

@bobbyD

When you get a moment can you provide an answer to the question I posed above?

LJ

I think he’s pretty busy managing the new hub firmware and protection service beta testing.

1 Like

You are probably right. There is no hurry on this. I need to just set up a test scenario and figure it out.

I am beta testing the release too. I will get to this question later too.

LJ.

From the RM documentation...

Wait for Events and Wait for Condition

Wait for Events pauses rule execution until some specified event occurs. Multiple events can be defined to cause the wait to end. In effect, this introduces another trigger-like capability into the Actions. There is also an event type specifically for Wait for Events named Elapsed Time. When the Elapsed Time expires, the wait will be over, irrespective of other events it may be waiting for.

Wait for Condition is similar to Wait for Events, but instead a Condition is evaluated. If the condition is true, no wait occurs, otherwise the rule execution is paused until the condition is met. Wait for Events and Wait for Condition may both be used in a Simple Conditional Action. Additionally, both pending Wait for Events and Wait for Condition will be cancelled each time a rule is triggered, and can be also cancelled by another rule with Stop Rule Actions, or by a Cancel Wait action (which presumably would have been part of a Delayed Action).

When a WAIT a is cancelled, all subsequent actions are also cancelled.

Delay statements are NOT cancelled by the rule being triggered.

1 Like

@ogiewon

You are awesome, as always! The documentation! Who would have thought?! (Sarcasm).

sorry I didn’t check that first. I am a bit conditioned that the docs are sometimes incomplete. Sorry about that.

Thanks for the assist!

LJ

1 Like