What I want to do is: turn on my porch light for 2 minutes if the D/W Sensor on the Porch door is tripped (not armed), however if the Porch Light is already on, I want it to stay on and not get turned off after 2 minutes if the Porch door was tripped.
Here are my values:
Triggers:
tPorchDoorTrip (Whenever the Porch Door Sensor is tripped)
tPorchLightOn (Porch Light is turned on)
Conditions:
cPorchLight_Trip tPorchDoorTrip and !tPorchLightOn
No Repeats checked
Actions:
Immediate Porch Light 100%
2 Min. Delay Porch Light 0%
Everything works as it should, however the issue that I am having is: if the Porch Light is turned off and the Porch Door is kept open, it keeps turning off the light after 2 minutes, then after 5 or 6 seconds it turns back on…then turns off after 2 minutes, then back on for 5 to 6 seconds…
What am I doing wrong? I’ve also tried to change the condition of tPorchDoorTrip to ==1, and I get the same results. I thought that the condition should only go through one cycle until I change the tPorchDoorTrip state.
Please help
If you want only once cycle then you need:
cPorchLight_Trip tPorchDoorTrip and !tPorchLightOn and (!tPorchLightOn; tPorchDoorTrip)
The last part is only true if the Door is Tripped after the light was last turned off.
Currently with your 2 minute delayed part of the action … your turn the light out … so if the door is still open … it retriggers the condition.
when I enter this condition in, it seems to work sometimes, sometimes it does not. Depending on which sequence I manually turn on the Porch Light (trigger tPorchLightOn) and/or trip the Porch Door Sensor (trigger PorchDoorTrip); it will either not turn on (then after 2 mins turn off) the Porch Light (if the Porch Light is turned off manually); other times, if the Porch Light is turned on manually, then the Porch Door Sensor is tripped, it turns off the light after 2 mins…very confusing, I have not been able to isolate the sequence that does both errors mentioned.
Is there another way that I can monitor if tPorchLightOn trigger is on or off and enter this into my condition, if so, what would my condition be written like? Possibly via the Device Properties (I am not sure what device property to monitor, nor what the condition would be written like? or via Luua code (I am very, very green with Luua code)?
On another note, I am using a 2 way dimmer switch for my Porch Light…not sure if this makes a difference with the errors above?
And another note: I am trying to do a similar action (with the same condition) with my Front Door Sensor and my Living room light all in the same PLEG plugin. Would I have to download a separate PLEG plugin…or may I do it in the same one that I am doing my Porch Light on (I am pretty sure that I can)? I do have the triggers, condition and actions written in already…could this be causing my errors?
You will need to set a condition that differentiates between auto-on and a manual on. Here is what has been discussed previously:
Input Triggers:
Motion Motion sensor Tripped
LightOn Light state is on
Conditions:
TurnLightOn !LightOn and Motion
AutoOnDetected TurnLightOn; LightOn < 5
TurnLightOff !Motion and AutoOnDetected and (AutoOnDetected; Now > 2:00)
Actions:
TurnLightOn Commands to turn light(s) on
TurnLightOff Commands to turn light(s) off
I found out that the issues that I was getting above were the result of slow polling info from the Light switch. I will try and see what I can do to improve on this.