DSC/Envisalink motion sensor triggering lights

I have Envisalink configured and working properly on OpenHab2. I have a simple rule setup to put the house in stay mode when we go to sleep. I was trying to do two things last night and the system went nuts (I had to restart OpenHab2 to break the cycle).

I enabled a rule to turn on the kitchen lights and the corridor lights when the motion sensor is triggered after we go to sleep. The main use case being if my baby wakes up and my wife or I need to go get milk, we can head downstairs, trigger the motion sensor and have the lights turn on downstairs on their on. Leave the lights on for 7 mins (it takes us 5 mins to get done and 2 mins of buffer) and then turn them off. It sort of worked but the lights didn’t turn off for a long time. Every time we walked past the motion sensor (which is in an angle that covers the steps downstairs, the kitchen and the corridor, it seem the motion sensor was being triggered and it sort of kept all those in a cue and triggered the lights. We were awaken at 3:20AM and the lights were still turning on and off at 6:30AM

I have the following item Switch ZONE2_SENSOR (DSCAlarmZones) {channel=“dscalarm:zone:XXXXXX:zone2:zone_status”}

I setup the following rule:

rule "feeding time support"

when
Item ZONE_STATUS2 received command ON
then
If (HOUSE_SLEEPING.STATE == “ON”) //this indicates we went to sleep
{
Kitchen_Lights.sendCommand(100)
Corridor_Lights.sendCommand(50)
CreateTimer(now.plusSeconds(420), [|
Kitchen_Lights.sendCommand(0)
Corridor_Lights.sendCommand(0)
]
}

When we get up in the morning, we disable the HOUSE_SLEEPING State. I did that and for some reason the lights in the kitchen and corridor kept on going on and off following the 7 min schedule. I am guessing there is some kind of buffer either in Envisalink or OpenHab2 that keeps track of all the motion triggers and keeps on triggering the role. Any reco’s on how to avoid the rule being triggered continuously? Is there a way I can flush the buffer once the timer is complete?

Any help would be greatly appreciated.

Please use the code fences

Your item is:

Switch ZONE2_SENSOR (DSCAlarmZones) {channel=“dscalarm:zone:XXXXXX:zone2:zone_status”}

Your rule trugger is:

Item ZONE_STATUS2 received command ON

DO you see the difference?

Thanks for catching that. That is a typo in the question I submitted. It’s ZONE2_SENSOR. The rule works. The challenge is it seems to buffer every movement and it keeps on running the rule over and over again on past motion triggers instead of current motion trigger.

The rule will only run when an ON command is received.
What do the logs say when this behaviour occurs?