How to check there is no movement during a period of time
Answered
Hello,
Not found the answer in the existing posts...
How do I check that there is no movement detection during a period of time ?
What I'd like to do :
If no movements detected during 15 minutes then reduce the temperature setpoint of the heating system to 18°C
I found the "Wait" puzzle not answering my concern (can only check movement/no movement before and after the "wait" set time but doesn't check during the wait period)
Is there a way to do that simply ?
Thx for answers/advices
No connection
Real-time notifications may not work
Hi, if you want to check movement from a single sensor you ca try a rule like this:
When no motion
Join
Wait 15 minutes
Reduce temperature
Adding join to the rule ensure that every time motion is detected the rule restart from beginnig without doing nothing.
If you have multiple sensor you can try grouping them or setting up a virtual alarm in health care mode.
Hi, if you want to check movement from a single sensor you ca try a rule like this:
When no motion
Join
Wait 15 minutes
Reduce temperature
Adding join to the rule ensure that every time motion is detected the rule restart from beginnig without doing nothing.
If you have multiple sensor you can try grouping them or setting up a virtual alarm in health care mode.
Try this:
Create a Virtual Meter, with a value named 'StatusMotion'. You will be able to use the StatusMotion value to indicate how many minutes there was motion and how many minutes there was no motion.
The Rule.
WHEN [motion detector] = ANY or [scheduler, every minute]
# We first reset the StatusMotion meter
IF [motion detector] = MOTION and [StatusMotion] < 0
THEN SET [StatusMotion] = 0
IF [motion detector] = NOMOTION and [StatusMotion] > 0
THEN SET [StatusMotion] = 0
REFRESH ALL # this allows the reset to complete for the rest of the rule
IF [motion detector] = MOTION
THEN [StatusMotion] = [StatusMotion] + 1
ELSE [StatusMotion] = [StatusMotion] - 1
This should give you a StatusMotion meter which you can use to count the number of minutes it was on Motion or NoMotion. Like: +5 means that the past 5 minutes there was motion. -10 means that the past 10 minutes there was no motion.
For example to turn of the last after 3 minutes of no motion:
WHEN [StatusMotion] < -3
THEN turn of light
Caveats:
Because the rule runs on two tiggers (the motion detector and the scheduler), the first minute is probably never a full minute. In practice it has never bothered me.
Try this:
Create a Virtual Meter, with a value named 'StatusMotion'. You will be able to use the StatusMotion value to indicate how many minutes there was motion and how many minutes there was no motion.
The Rule.
WHEN [motion detector] = ANY or [scheduler, every minute]
# We first reset the StatusMotion meter
IF [motion detector] = MOTION and [StatusMotion] < 0
THEN SET [StatusMotion] = 0
IF [motion detector] = NOMOTION and [StatusMotion] > 0
THEN SET [StatusMotion] = 0
REFRESH ALL # this allows the reset to complete for the rest of the rule
IF [motion detector] = MOTION
THEN [StatusMotion] = [StatusMotion] + 1
ELSE [StatusMotion] = [StatusMotion] - 1
This should give you a StatusMotion meter which you can use to count the number of minutes it was on Motion or NoMotion. Like: +5 means that the past 5 minutes there was motion. -10 means that the past 10 minutes there was no motion.
For example to turn of the last after 3 minutes of no motion:
WHEN [StatusMotion] < -3
THEN turn of light
Caveats:
Because the rule runs on two tiggers (the motion detector and the scheduler), the first minute is probably never a full minute. In practice it has never bothered me.
Hello Nickyb2,
Thanks for the suggestion
It does work the way I intend. Good to know it's possible to enter a rule on a schedule basis. That was the thing I was missing
Cheers
Hello Nickyb2,
Thanks for the suggestion
It does work the way I intend. Good to know it's possible to enter a rule on a schedule basis. That was the thing I was missing
Cheers
Replies have been locked on this page!