HomeGenie Forum

Automation Program Plugins and Wizard Scripting => Help => Topic started by: Bobpick on November 26, 2014, 11:11:55 PM

Title: Detecting movement with motion sensor
Post by: Bobpick on November 26, 2014, 11:11:55 PM
My motion sensors are firing several times when someone walks by, leading to some excessive email notifications.

Is there a way in the trigger code to tell it to only trigger once in a minute?
Title: Re: Detecting movement with motion sensor
Post by: nolio on November 27, 2014, 09:09:37 PM
Hi,
For me, there is different way :
Code: [Select]
Pause(60)
I think the last one is the better way ...
Bye
Title: Re: Detecting movement with motion sensor
Post by: bkenobi on November 27, 2014, 11:28:36 PM
In the Advanced Smart Lights code, I check for a variable time delay before firing events.  I highly recommend this approach.  It might be easier for you to add a pause(60), but it's not going to let your code run anything else in the mean time (if that matters).
Title: Re: Detecting movement with motion sensor
Post by: Bobpick on November 28, 2014, 01:18:05 AM
Even a 15 second pause would work.
Title: Re: Detecting movement with motion sensor
Post by: RoChess on November 28, 2014, 10:08:00 PM
Even easier might be to adjust the motion sensor itself. Z-Wave motion sensors for example are configurable how long the duration of the toggled status is. This is normally designed to allow batteries to last longer, but in this way you can make that work for you by using a time span that you only want to result in a single status update.
Title: Re: Detecting movement with motion sensor
Post by: bkenobi on December 01, 2014, 05:41:51 PM
Depends on the motion sensor if that's possible.  X10 MS series (e.g., MS16A) will send an ON command every time motion is seen which could be on the order of ~5 seconds.  It keeps sending the ON command ever time and there is no way to control this.  You can tell it how long to wait to send the OFF command, which is only sent once.