I am new to PLEG and attempted to follow examples to get a timed light scenario working and so far no luck.
My garage has 4 sensors -
One on a door between house and garage (HouseDoor)
One on a door between garage and exterior (SideDoor)
One of the roll-up garage door (BayDoor)
Motion sensor
What I want to do is -
Turn on light if any of the sensors are tripped
Turn off light if no motion sensed for 10 mins, regardless if turned on manually or because of tripped sensor
Triggers
Name Description
Light_Is_On Garage: Light is turned on
BayDoor_Tripped Garage: Bay Door Sensor is tripped
SideDoor_Tripped Garage: Side Door Sensor is tripped
HouseDoor_Tripped Garage: House Door is tripped
Motion_Tripped Garage: Motion Sensor is tripped
Motion_NotTripped Garage: Motion Sensor is not tripped
Conditions
Name Expression
TurnOnLight (NOT Light_Is_On) AND (Motion_Tripped OR SideDoor_Tripped OR HouseDoor_Tripped)
AutoLightOff NOT TurnOnLight AND (Motion_NotTripped; NOW > 00:10:30)
Does this go into an (almost) infinite loop of turning the light on and off ?
When your TurnOnLight Condition Trips … it fires an action to turn on the light.
This causes the trigger LightIsOn to go true … and condition TurnOnLight to go false.
Now, if there has been no motion for 10 minutes … It will immediately fire condition AutoLightOff
which will cause an action to turn off the light.
This will cause the trigger LightIsOn to go to false.
Now, If this was all started by SideDoor_Tripped or HouseDoor_Tripped you will repeat this cycle. i.e. TurnOnLight will fire … because it becomes true again.
It’s to late for me to think about this anymore … and I am travelling … So hopefully someone else will provide a solution.
Try this, I did this months ago, it was a true dare. But with the help of @RexBeckett and @RichardTSchaefer, I did it. It is more that you are asking for, but you can adjust it to your needs, or increase your expectations. In your case instead of the dimmers to be the triggers, just swap them for the sensors.
[quote=“Vreo, post:4, topic:177696”]Try this, I did this months ago, it was a true dare. But with the help of @RexBeckett and @RichardTSchaefer, I did it. It is more that you are asking for, but you can adjust it to your needs, or increase your expectations. In your case instead of the dimmers to be the triggers, just swap them for the sensors.