Delay before motion retrigger


In my garden I have a motion sensor, everytime it sees a movement it will trigger (CLOSE -->OPEN) and plays a sound.
Now I want to add a delay so it doesn’t play a sound every movement but (example) only after 5 minutes again.
So the ‘retrigger’ should be disabled for 5 minutes, I tried several things with createTimer but cannot get it done.

Any idea’s ?

See the following:

The short of it is use a lock or a Timer and in the rule check to see if the lock is locked or the Timer is running and if it is skip the rule.

Hi Rich,

With your link i’ve created the following :

var Timer timer1 = null

rule "Motion detection backyard"
        Item pirSensor1 changed to OPEN
        if(timer1 == null) {
            timer1 = createTimer(now.plusMinutes(1)) [|
                timer1 = null

After 1st trigger (change to open), it won’t trigger until timer1 ( +1 minute) expires.