I’m running PLEG 5.9. I understand that in a schedule if you don’t put an Off time that the schedule will never go Off. But it looks to me like even though it doesn’t generate an Off, it still goes False (at least according to my Status report attached). Have a look at the schedule called SanMateo_Heartbeat.
What is confusing me is that even though the state of the schedule is false, if you look in the Conditions section of the report at the condition called _SanMateoHeartBeat_Events it stays true even though the only condition is the schedule (which is false). I understand that by putting an _ in front of the name it will run regardless (which I’ve done) but it still doesn’t make sense to me that if the schedule is false, why is the condition true?
Richard, I haven’t said it in awhile, but I can’t tell you how much I appreciate all of the work that you do for this community. Vera would be pretty worthless without the plugins that you’ve created and the effort that you make. Hopefully the community can pay you back in some way at some point.
The problem is that, because a schedule without an off doesn’t generate an off-event, conditions using it do not get updated (unless they use other terms that change). There are two fixes: Add an off to the schedule - say an interval of a few seconds; Put an underscore on the front of the condition name.
The only thing that can change the value of EndOfNightSchedules is the EndOfNights input … and that is defined as a Schedule that only ever gets’s evaluated when it is true … hence the condition can only be true.
I suppose I already knew this but just to confirm, even though the schedule is going false, PLEG only evaluates when something goes True? If I put an Off parameter on the schedule would it evaluate differently?
I understand that putting an _ before the name will force it to run even though its already true, but I’d like to get the schedule input to be false, have it force the condition to be false, and then become true the next time the schedule input becomes true.
A schedule without an off time only has an on-event. When this fires, any conditions that use the schedule are evaluated with the schedule value as true. Unless they have another term that changes, they will not be evaluated again until the schedule’s next on-event - also with the value true. Consequently the condition remains stuck at true.
If you put an off time on your schedule, it will cause an off-event. This will cause the condition(s) that use the schedule to be evaluated with the schedule value as false. This is the same thing that happens with Triggers - they have both on-events and off-events so conditions are evaluated for both states.
Out of curiosity, was there a bug up until recently that allowed my schedules to work without an Off time and without an _ in the condition name?
Yes there was. It could cause conditions to be re-evaluated with the schedule value as false but it wasn't consistent. I had some conditions that got reset and others that didn't. Anyway, it got fixed in PLEG 5.6 and a lot of people found they were relying on the bug...