I have an appliance module attached to a relay to control my garage door, similar to the setup in this post:
For the door status, I have a tilt sensor installed at the top of the door. I am having issues getting PLEG properly working. I have read though most of these threads regarding PLEG programming, but am missing something. Please help a noob out.
I would like to have my garage door automatically close if it is accidentally left open. I only want this to happen if it is left open over night, starting at 9:00 pm and ending at 7:00 am. If the door is open any other time, I would like it to remain open.
Inputs:
Triggers
GarageDoorArmed Tilt sensor is armed (Door is closed).
GarageDoorTripped Tilt sensor is tripped (Door is open).
Schedules
GarageDoorSchedule Every weekday from 9:00 pm ? 7:00 am
Conditions:
GarageDoorLeftOpen GarageDoorTripped AND (GarageDoorTripped; NOW > 5:00)
AutoCloseGarageDoor GarageDoorLeftOpen AND GarageDoorSchedule
Actions:
AutoCloseGarageDoor Immediate - 1; Delay 05 ? 1
The issue I am having is in the condition (I think). If PLEG has the setup above, the garage door never closes. If I delete my GarageDoorLeftOpen condition, and use only it?s expression in the AutoCloseGarageDoor so it looks like this:
AutoCloseGarageDoor GarageDoorTripped AND (GarageDoorTripped; NOW > 5:00)
The garage door does close after 5 minutes.
A side note, I defined the GarageDoorArmed input as an extra check, to make sure the garage door is not already closed before pulsing that relay. I was going to put that in my AutoCloseGarageDoor condition, like so:
AutoCloseGarageDoor GarageDoorLeftOpen AND GarageDoorSchedule AND !GarageDoorArmed
I personally would rather Vera send me a notification if I forget to close the garage door and close it myself.
With that said does there really have to be a schedule for this? Perhaps you can have it run a check when you’re going to bed when you may do some other functions. For example, at 23:20 (I’m almost always in bed by this time) I have PLEG check several things based on security. You could easily include this check as part of that.
If you decide you want to use a schedule, does the schedule really need to include the morning? Do you tend to come home very late?
My point is, isn’t there a discrete time that you could have PLEG make this check once, when you’re very unlikely (or will never) open the garage door after?
If you do decide to use a schedule, I’ve heard people have more success with making the schedule opposite of the time they want instead of taking it past midnight.
So, instead of your schedule being from 9pm to 7am make it 7am to 9pm and in the condition just use !
So
AutoCloseGarageDoor GarageDoorLeftOpen AND !GarageDoorSchedule
You should be able to get it to auto-close in that window of time, with the way you are identifying what you want to do.
it is probably best to post your PLEG status report.
Sensors have essentially four states On/Off and Armed/NotArmed. Perhaps you are crossing over on those variables.
How you construct:
[quote=“kingsoapface, post:1, topic:181411”]Triggers
GarageDoorArmed Tilt sensor is armed (Door is closed).
GarageDoorTripped Tilt sensor is tripped (Door is open).
Schedules
GarageDoorSchedule Every weekday from 9:00 pm ? 7:00 am
Conditions:
GarageDoorLeftOpen GarageDoorTripped AND (GarageDoorTripped; NOW > 5:00)
AutoCloseGarageDoor GarageDoorLeftOpen AND GarageDoorSchedule
Actions:
AutoCloseGarageDoor Immediate - 1; Delay 05 ? 1[/quote]
these inputs and conditions will affect PLEG’s understanding on what to do.
If you made a PLEG schedule from 9pm to 7am, that should be fine. It is when you you use sequence operators that bridging midnight may give you a problem, as prim8 suggests.
GarageDoorArmed Tilt sensor is armed (Door is closed).
Armed usually has nothing to do with open or closed.
The 4 states are:
Armed and Open
Armed and Closed
ByPassed and Open
ByPassed and Closed
Most folks use the Opend/Closed states …
Or they use the Armed Open/Close if they want to use the Armed state as a way to disable the trigger/automation logic for a period of time.
Thank you all for the replies. I found another thread where the guy wanted to set up exactly what I was trying. I changed up some of my naming of the triggers to make a bit more sense.
Triggers:
GarageDoorOpen Garage Door Sensor is Tripped
GarageDoorCheck Checks the status of the garage door every 30 minutes
GarageDoorSchedule Every Day, 8:59 pm - 7:01 am
Condition:
GarageDoorOpen AND GarageDoorNight AND GarageDoorCheck
Action:
AutoCloseGarageDoor Immediate - 1
This seems to be working as I expect.
I may be wrong on this, but I think the issue was with my:
“GarageDoorArmed Tilt sensor is armed (Door is closed)”
trigger. When I clicked status, I would get an error stating that it could not get the status of GarageDoorArmed.
Here is the other thread that I pretty much copied off of: