Trying to understand PLEG condition true/false evaluation

I have a PLEG condition to check my door locks every 30 minutes to see if the door is closed (via a door/window sensor) and locked (kwikset locks) and a 30-minute “interval” schedule. I have noticed that if the door fails to lock, as in the case where it wasnt quite closed all the way so the deadbolt couldnt engage, that the condition below stays true, even though it should be false:

!p5FrontDoorLocked and p6FrontDoorClosed and CheckInterval
(Would be true if the Front door is unlocked, and closed, and its the 30 minute check interval).

So this works perfect in the case that the door was closed all the way and was unlocked… it becomes true, which fires the action to lock the door. But in the case where the door wasnt quite closed all the way and it tried to lock it but failed, the condition stays true forever, even though the CheckInterval value is false for 29.9999 minutes out of 30.

When I look at CheckInterval I see this: “State: false”. “Last true: 2016-08-21 15:30:00.106”, “Last False: 2016-08-21 15:30:00.145”. So I dont understand how the condition above could be true when CheckInterval is false. What I would expect to happen, is that after 30 more minutes it would try to lock the door again, but this doesnt happen since the condition gets stuck on “true”.

What am I missing? Any help is appreciated. Thanks!

No Status Report (PDF) … No Comment!

I’ve attached the status report. It may be a little confusing, as its slightly different from what I said above. I was trying to simplify it/make it more readable (I made this PLEG device a few weeks ago when I was learning).

-So the schedule is “CheckInterval” which you can see is False in the report. (was last true for a few hundredths of a second, as expected)
-The condition is called “c5LockFrontDoor”, which is “p5FrontDoorLock == 0 and CheckInterval and p6FrontDoorSensor == 0”. Regardless of the values of p5FrontDoorLock and p6FrontDoorSensor, CheckInterval is false, so it seems the condition as whole should be false. Yet, it shows as true.

The problem is that you do not have an explicit OFF schedule for CheckInterval … so no evaluation takes place … none of the other inputs changed.
You should add an off interval say 30 seconds later or 1 minute later.
Or you can set repeats to true.

Maybe I am misunderstanding how an “interval” schedule works. But what I see on the status report is that it becomes true at 30 minutes, and then false a fraction of a second later. So I was assuming that it becoming false meant by nature it had an “off” event. So are you saying I need to add an off of type “Interval” 30 seconds later? See the screenshot I attached. It just seems to me that it would become true at say 12:30, false at 12:30 + fraction of a second, then is set to false again 30 seconds later.

I think I get it, but its still confusing. So I had read this before from the PLEG basics guide: “If a Schedule does not have a Stop Type, it will not have an off event. Such a Schedule will only cause
the evaluation of a Condition in which it is used when it turns on and its state will, at that point, always be true.”. I just thought that maybe since it was an “Interval” schedule, it didnt apply, especially after I saw that the schedule became false just after it became true. But I just noticed that the same happens for the Schedule I am including a screenshot of. The On type is Monday-Friday at 10:35, and there is no Off event. Based on what it says in that guide, it seems like it would remain “True” after 10:35, but it doesnt, it becomes false a fraction of a second later. So what I’m taking from this is that even though the schedule itself shows false, there is no “off event”, and thus the condition that is it used in doesnt get re-evaluated, and thus remains true. Very confusing, but I think i get it…assuming what I just said is correct.

If those conditions are evaluated as because a different event has changed … the Schedules with NO off time will be treated as a FALSE.

i.e.
A Schedule with NO off time will cause an Evaluation of conditions when it is tripped and will have a value of TRUE.
If iconditions are evaluated at ANY other time the schedule will have a value of FALSE.