PLEG Schedule Test

Can anyone tell me why this condition(Scheduled) remains true on day 6? I expected it to change to false at the Off After time, but it does not. How can I make the schedule change to false at the Off or Stop time?

Trigger
Motion Motion Sensor is tripped

Schedule
Name Type Random On Delay Off After Type Random Off Delay
Scheduled Weekly:1,2,3,4,5 None Weekly:1,2,3,4,5 None

Conditions
Scheduled AND Motion AND…

Can see the start and stop time … that’s available on the status and report page.

Are you starting in the evening and shutting off after midnight ?
In that case you want to start on M-F and stop on T-S.

There is no midnight traversal.

Status today, 10/12. You’ll notice that the state remains true since 19:03 the previous day(Sunset). I expected it to turn false at 23:30.

[tt]Scheduled Weekly t 1,2,3,4,5 None Weekly 23:30:00 1,2,3,4,5 None true 2013-10-11 19:03:50.109 [/tt]

Just confirming that you are on 5.13 for PLC.
Is this a new/changed schedule ?
If not did it work on the other days ?
Was there a Vera Restart coincident with this time ?
I will have to build a test case for this.

The problem was first noticed on PLC 5.11. I have since upgraded to 5.13 although the schedule has not reached an activate/deactivate time since then.

The schedule is not new or changed.

It may or may not have worked on other days. Testing was originally performed during the on time period. It seemed to be working, but the “failure” is continued on operation at off hours, a situation that can easily go unnoticed.

No restart/reload.

Hold off on the test case. I will make more careful observations after the next activate/deactivate cycle and report back. I’ll also set up a new schedule to see how that behaves.

I’m having similar problems with PLEG Schedules. I recently converted all my VERA Scene Schedules to PLEG and I’ve found that they don’t always fire as expected — it appears that they fail to END properly.

This schedule is executed to disarm a motion sensor and cancel/mute a timer to prevent the lights from being turned off during the schedule period. When the schedule ends the ACTION is to re-arm the motion sensor and to unmute/start the timer that turns off the lights.

Attached are screen shots of the configuration and the status from one of these schedules. The schedule is set to START everyday at sunset which as near as I can tell it never fails to do. It is set to END everyday at 04:00 the next morning. I’ve seen a consistent failure to END. I figure I must be doing something wrong but as you can see from the STATUS display at 09:50 local time the state of the schedule, which should have ended and gone FALSE at 04:00, was still TRUE.

I’ve seen this in other similar PLEG schedule functions, they simply do not END as expected.

Can you verify that Vera did not Restart around 4:00:00

Richard, there is no indication that it did. I have another schedule that did not end properly but in that case it was a weekend schedule and I didn’t have the end date set for the following day so I don’t know if this problem Apple’s to it out not. This particular schedule is 7 days so the correct end date situation doesn’t apply. I have another u day schedule that fails to end properly as well. Similar configuration.

This is what Mike is seeing as well.
How many schedules do you have ?
I need to find out from MCV if there is a limit ?
I may be hitting a max # of outstanding timer limit in MCV.

I was hoping that at least some of my problems were down to a faulty or corrupt firmware on my Vera lite. After the upgrade to Vera 3 a couple of days ago, i had a few things not going as they should have, but i ignored it waiting for the system to settle down. Now that everything is installed properly and working fine, i had a familiar problem. A schedule not turning off. So it looks as if my problems have not gone away. I am not sure this is down to number of schedules, i do not have that many. I have 28 in one PLEG, 1 in my second PLEG. I have not got debugging turned on, as i have not got usb logging enabled yet, i have not had time to do that (and i was hoping that everything would work fine with the new Vera).
So this is just an interim report, especially as i have seen this post and i seem to be not alone with the problem of schedules not turning off. And thinking back, i think most of the time if not all the time the problem seems to be the turning off, i cannot remember an event not turning on, but i have had a lot of not turning off. So that might get us a little closer in trying to narrow down the problem

[quote=“RichardTSchaefer, post:9, topic:177327”]This is what Mike is seeing as well.
How many schedules do you have ?
I need to find out from MCV if there is a limit ?
I may be hitting a max # of outstanding timer limit in MCV.[/quote]

I have about 10 countdown timer plugins running and about four PLEG schedule functions

I should have been more specific.
How many schedules in the PLEG where the schedule failed.
Did they all have an On and Off time ?

For me it is normally just one failing, but they all have different on/off times. Most of my timers are fixed on/off times and 5 or 6 of my schedules are self timers. I also noticed again that some actions do not get triggered. So far only actions switching a multi switch. What is strange that action also included a scene. That did run. So the action triggered, did not switch the multi switch, but run the scene.

[quote=“RichardTSchaefer, post:12, topic:177327”]I should have been more specific.
How many schedules in the PLEG where the schedule failed.
Did they all have an On and Off time ?[/quote]
In the case I cited there are TWO schedules, a WeekDay and a WeekEnd both with the same on time but different off time. In both cases there are random start/end time offsets. I think I figured out what was wrong with this one. The Weekend schedule was active this morning Tuesday and in looking at it I realized that it was set ON and OFF for Sat/Sun. Which meant that it would become active Sunday morning stay set until NEXT Saturday. Since it crossed Midnight I changed the OFF days to Sunday/Monday and that should fix that. :o

But I have attached another new schedule (new as of today) that is intended to block a bedroom motion sensor between the hours of 22:00 and 07:00 the following morning. I set it up this morning and made certain that it was FALSE at about 07:15 this morning. But at 08:15 I noticed the sensor wasn’t firing and I found the schedule set TRUE for some reason. There are TWO schedules in this PLEG also, “Master_Bedroom_Schedule” and “Master_Bedroom_Motion_Block”. This one has fixes start/stop times, the other has the variable offset for both start and stop.

A general question then, is it advisable to cycle the schedules manually (“Do It Now”) twice when they are first created to force them to “get with the program” before the PLEG is closed and saved ;D ???

Similar to mikee123 I’ve also seen the occasional situation where not all the action items for a scheduled event are fired, but it does not seem to be consistent and it hasn’t been long enough to sense a pattern. In my case all the PLEG schedule items are “new”, about two weeks or so, and replaced VERA scheduled activities so they are still getting “tweaked” occasionally.

Thanks Richard

Mine also only fail occasionally. Which probably makes it a lot more difficult to track the problem…

I’m not certain but from what I understand VERA is not an interrupt-driven realtime operating system and in that case things are occasionally going to fall through the cracks if she is busy doing something else. So there is not a lot that Richard or anyone else can do about that :slight_smile:

Folks, do not worry about what’s under the covers … that for me to worry about.
I will build some test cases to stress the times and see if I can’t find out what’s happening.
Without a test case I can only try to react to the details of the problems as you describe them.

Richard, I’ve noticed a problem but have no idea where its located. I’ve tried several edits to Schedules in PLEG and they do not “take.” For example I edited the start time on a schedule, close the PLEG and hit “SAVE”. When it restarted I found that the change had NOT been saved. The only way i could change values in a schedule was to delete schedule, SAVE, reopen the PLEG and add the schedule back in with the change then SAVE again! This has happened consistently for me.

Just a quick update to this (my AT&T UNiverse is down … again). I have a PLEG schedule running in the bedroom that bypass a motion sensor between 11pm and 07am to keep the lights from going on by motion during that period. It activated as expected at 11pm but went inactive (false) at about midnight. I have removed several other PLEG schedules because they either don’t complete at the scheduled time or complete prematurely like this one.

Do all the Schedules that are giving problems run through midnight? Have you tried setting separate Schedules for the Bypass and Arm Conditions? e.g.

Schedules
D2300 Start-Type: Weekly 1,2,3,4,5,6,7 Time: 23:00 Stop-Type: None
D0700 Start-Type: Weekly 1,2,3,4,5,6,7 Time: 07:00 Stop-Type: None

Conditions
MotionBypass D2300
MotionArm D0700

I’m not suggesting it can only be done this way. It’s a diagnostic step.