Light scenerio

Hey everyone…
Totally new to PLEG and Vera. I can easily see that Vera functionality would be crippled without this plugin.

I want to create the following simple scenario and just want to make sure im moving in the right direction.

I only want this to run at night
I want to turn the kitchen lights on only if they are not currently on and motion is detected
I want to turn the foyer lights on only if they are not currently on and motion is detected
I want to the kitchen lights off if there is no motion for 60 seconds
I want to turn the foyer lights off if there is not motion for 60 seconds.

Triggers
FoyerLightsOn
KithchLightsOn
FoyerMotion
KitchenMotion

foyerlighttriggered - foyermotion and (not foyerlighton) and isnight
kitchenlighttriggered - kitchenmotion and(not kitchenlighton) and isnight
kitchenlightsoff - kitchenlighttrigger and (kitchenmotion ; now >60) and isnight
foyerlightsoff - foyerlighttrigger and (foyermotion ; now >60) and isnight

Welcome to Vera and PLEG. You are nearly there. Just a couple of suggestions:

Triggers
isnight DayTime indicates night

Conditions
kitchenlightsoff KitchenLightsOn and !KitchenMotion and (!KitchenMotion; Now > 60) and isnight
foyerlightsoff FoyerLightsOn and !FoyerMotion and (!FoyerMotion; Now > 60) and isnight

Great! Can you help me with one more request?
I wanted to see if I can stop the light from automatically going on if they have been tripped and turned off in the past 5 minutes. It is irritating to my wife to turn the lights off, walk past the motion detector and they turn back on.

Here is what I have so far.

foyermotion and !FoyerEntryLightOn and !FoyerHallwayLightOn and (!foyerlightstrigger or(foyerlightstrigger;now >300))and (!foyerlightsoff or (foyerlightsoff; now> 300)) and isnight

To keep your wife happy, you could add a sequence expression to stop the motion trigger for five minutes after the light is turned off by any means:

Conditions
foyerlighttriggered foyermotion and (not foyerlighton) and isnight and (!foyerlighton; foyermotion > 5:00)