I have a PLEG condition, which switches my garden lights on 50 minutes after sunset, and turns them off 22:20 weekdays and 22:50 weekends. This has been working for months without any problems, it is a very easy condition. The other day while watching TV i did see the lights go off (long before they should have) but they came back on straight away. The same happened today. So i checked my PLEG status, and i have no explanation why they have been turned off, and back on a minute later
Triggers
Night1 Day or Night indicates Night time. true 2014-03-17 18:54:56.121 2014-03-17 05:47:06.304
Vacation1 MultiSwitch Switch 8 is turned on false 2014-02-09 08:54:32.892 2014-02-10 17:59:34.257
Device Properties
WE11 Timer Weekend 0 2014-03-17 00:00:00.207 2014-03-15 00:00:00.213
Conditions
GardenOn No (((19:15:00;NOW) and WE11==0) or ((17:10:00;NOW) and WE11==1)) and Night1 and NOT Vacation1 and NOT GardenOff true 2014-03-17 21:17:34.145 2014-03-17 21:16:34.123
GardenOff No (WE11==0 and (22:20:00;NOW)) or (WE11==1 and (22:50:00;NOW)) false 2014-03-17 21:15:34.221 2014-03-17 21:16:34.129
I have attached this as a .doc for easier reading, and highlighted the problem times in Red
Using NOW you can sometimes fall into a datestamp issue when a slight delay happens at the operating level.
you came up with an interesting approach to this, but to simplify try:
Timer
WeekDayTimer A timer that starts 50minutes after sunset on SMTuWTh and ends at 22:20 on SMTuWTh
WeekEndTimer A timer that starts 50minutes after sunset on FS and ends at 22:50 on FS
Conditions
GardenOn = (WeekDayTimer OR WeekEndTimer) and NOT Vacation1 and NOT GardenOff
GardenOff = !WeekDayTimer OR !WeekEndTimer
Set the conditions to repeat
added bold to include your Vacation mode and GardenOff switch
Mike … I would check to see if your Vera is 1 hour off.
The times in the report are the times from your Browser.
Toggle something and check the timestamps to make sure the timestamps in the report correspond to current time!
@RichardTSchaefer
I checked and my times are ok, so that’s not the issue. I just remembered, a few days ago the lights did go off in the evening as they should, but when my wife woke up in the middle of the night they were on. In the morning they were off again. She forgot to tell me until a few days later, so did not get a chance to look at the status report.
@Bulldoglowell
I like your idea, when I first wrote that condition that possibility was not there, that was one of the first conditions I had done with PLEG. The problem is I do not want the lights to come on before 19.10 on weekdays or 17.10 weekends, so that would make it more complicated again. The idea is for the lights not to come on before 19.10 weekdays even if it is dark. In the summer with the longer days lights will come on once it is really dark.
OK, so like this:
WeekDayTimer a timer that starts at 19:10 and ends at 22:20 on SMTWT
WeekEndTimer a timer that starts at 17:10 and ends at 22:50 on FS
IsReallyDark a timer that starts 50mins after sunset every day
GardenON = ((WeekDayTimer AND (IsReallyDark;WeekDayTimer)) OR (WeekEndTimer AND (IsReallyDark;WeekEndTimer) OR (IsReallyDark AND (WeekDayTimer;IsReallyDark) AND (WeekEndTimer;IsReallyDark))) and NOT Vacation1
GardenOff = !WeekDayTimer OR !WeekEndTimer
this says GardenOn:
at 19:10 weekdays if it got dark before 19:10 OR
at 17:10 weekends if it got dark before 17:10 OR
at the moment it actually gets dark when it gets dark after these times
I think that would work. Looks more complicated though than what I have now, but it might still be better as it eliminates the NOW