I am rather new to PLEG and trying to create a logic that allows 3 lights to be controlled by two motion sensors. I started with the exmple in [url=http://forum.micasaverde.com/index.php/topic,14709.0.html]http://forum.micasaverde.com/index.php/topic,14709.0.html[/url] and modified form there but now I think something I did may be causing things to crash or become hung. Here is my scenario. I have a stairwell in my house that I want to control via motion. It’s a windy staircase so two motion sensors are needed to catch both someone entering from above and from below. There are three lights that need to be controlled. My motion sensors have a 7 minute timeout. I also want the ability to flip the light to manual as per the example. I created a logic using one motion and one light which worked great. I then modified it for the other lights and the other motion sensor. Now when one sensor trips some but usually not all 3 of the lights will turn on and then everything else seems to stop processing. I cannot do anything inside the PLEG device including view Report, Status and Logs. Any help with the logic or why it is is unstable would be exrememly appreciated. Here is my configuration.
[code]Triggers
LightBHCHOn Whenever the Back Hall CH is turned on
MotionBackHall Whenever Back Hall Motion detects motion whether is armed or disarmed
LightBHSCOn Whenever the Back Stairs SC is turned on
LightDHSCOn Whenever the Down Hall Sc is turned on
NoMotionBackHall Whenever Back Hall Motion stops detecting motion whether is armed or disarmed
NoMotionUpstairs Whenever Upstairs Motion stops detecting motion whether is armed or disarmed
MotionUpstairs Whenever Upstairs Motion detects motion whether is armed or disarmed
Conditions
Name Repeat Expression
TurnOnBHCH No !LightBHCHOn and (MotionBackHall or MotionUpstairs) AND ((!LightBHCHOn;MotionBackHall) or (!LightBHCHOn;MotionUpstairs))
TurnOnBHCH No !LightDHSCOn and (MotionBackHall or MotionUpstairs) AND ((!LightDHSCOn;MotionBackHall) or (!LightDHSCOn;MotionUpstairs))
TurnOnBHCH No !LightBHSCOn and (MotionBackHall or MotionUpstairs) AND ((!LightBHSCOn;MotionBackHall) or (!LightBHSCOn;MotionUpstairs))
AutoOnBHCH1 No TurnOnBHCH; LightBHCHOn > 15
AutoOnDHSC1 No TurnOnBHCH; LightDHSCOn > 15
AutoOnBHSC1 No TurnOnBHCH; LightBHSCOn > 15
TurnOffAutoOnBHSC No AutoOnBHSC1 and LightBHSCOn and (LightBHSCOn;NoMotionBackHall) and (LightBHSCOn;NoMotionUpstairs) and (NoMotionBackHall; now > 3:00) and (NoMotionUpstairs; now > 3:00)
TurnOffAutoOnDHSC No AutoOnDHSC1 and LightBHSCOn and (LightDHSCOn;NoMotionBackHall) and (LightDHSCOn;NoMotionUpstairs) and (NoMotionBackHall; now > 3:00) and (NoMotionUpstairs; now > 3:00)
TurnOffAutoOnBHCH No AutoOnBHCH1 and LightBHSCOn and (LightBHCHOn;NoMotionBackHall) and (LightBHCHOn;NoMotionUpstairs) and (NoMotionBackHall; now > 3:00) and (NoMotionUpstairs; now > 3:00)
TurnOffManualOnBHSC No !AutoOnBHSC1 and LightBHSCOn and (LightBHSCOn;NoMotionBackHall) and (LightBHSCOn;NoMotionUpstairs) and (NoMotionBackHall; now > 3:00:00) and (NoMotionUpstairs; now > 3:00:00)
TurnOffManualOnDHSC No !AutoOnDHSC1 and LightDHSCOn and (LightDHSCOn;NoMotionBackHall) and (LightDHSCOn;NoMotionUpstairs) and (NoMotionBackHall; now > 3:00:00) and (NoMotionUpstairs; now > 3:00:00)
TurnOffManualOnBHCH No !AutoOnBHCH1 and LightBHCHOn and (LightBHCHOn;NoMotionBackHall) and (LightBHCHOn;NoMotionUpstairs) and (NoMotionBackHall; now > 3:00:00) and (NoMotionUpstairs; now > 3:00:00)
Actions
Actions for Condition: cTurnOffAutoOnBHCH
Device Actions:
Immediate
Device Action Arguments
Back Hall CH SetLoadLevelTarget newLoadlevelTarget=0
Actions for Condition: TurnOffAutoOnBHSC
Device Actions:
Immediate
Device Action Arguments
Back Stairs SC SetLoadLevelTarget newLoadlevelTarget=0
Actions for Condition: TurnOffAutoOnDHSC
Device Actions:
Immediate
Device Action Arguments
Down Hall Sc SetLoadLevelTarget newLoadlevelTarget=0
Actions for Condition: TurnOnBHCH
Device Actions:
Immediate
Device Action Arguments
Back Hall CH SetLoadLevelTarget newLoadlevelTarget=100
Actions for Condition: TurnOnBHCH
Device Actions:
Immediate
Device Action Arguments
Back Stairs SC SetLoadLevelTarget newLoadlevelTarget=100
Actions for Condition: TurnOnBHCH
Device Actions:
Immediate
Device Action Arguments
Down Hall Sc SetLoadLevelTarget newLoadlevelTarget=100[/code]