PLEG Schedule logic

Hi guys, not sure if this is the best place, but here goes, I am trying to create a schedule for daytime and one for night time. I set it up per the attachment, but that is always false… not sure what I am doing wrong. I’d appreciate a pointer in the right direction.

Many thanks

Hi there,
I want to join my fellow beginner, have several schedules defined and some are working well while others for some reason don’t respond to changes. is it related to sunset and sunrise that my vera can’t define? is it because i defined it in a wrong way?
would be nice if someone can help us… :-
I am adding also a screenshot.
in the first you see how i define the sunset to sunrise, next one when i reopen it it seems like it reset’s itself (?).
the 3rd one is a simple one from 23:00 to 06:00
and the last pic, you see the schedules that some never been true, some been true but never false and not lately - whats that about?, and some that work fine…
looking forward for an answer. Thanks.

I understood I need to add the status report in pdf, so he it is

Hi Orenis,

mine started working, it was down to hard rebooting my vera (plus) and also changing my condition which I had in brackets with a comma, I removed the brackets and replaced the comma and now it seems to work…

There’s a plugin called “Day or Night” that might work better for you. It creates a virtual switch with “Day” and “Night” positions.

[quote=“timtownsend”]There’s a plugin called “Day or Night” that might work better for you. It creates a virtual switch with “Day” and “Night” positions.[/quote]My problem is that also absolute time schedule as you can see, such as 23:00 to 6:00 as I defined it, doesn’t seem to work… so I can’t rely on schedules as I don’t know which one will work and which won’t… so the whole concept of using PLEG is becoming ineffective…

Sent from my SM-A530F using Tapatalk

[font=Verdana]PLEG doesn’t like midnight (or the next day)[/font]

What you need to use is the NOT operator in the Condition.

For example the schedule you want is 2300 to 0900, then use a schedule for the same day 0900 to 2300 and use NOT in the Condition.

[quote=“zedrally”][font=Verdana]PLEG doesn’t like midnight (or the next day)[/font]

What you need to use is the NOT operator in the Condition.

For example the schedule you want is 2300 to 0900, then use a schedule for the same day 0900 to 2300 and use NOT in the Condition.[/quote]Got it. Will try. Thanks!

Sent from my SM-A530F using Tapatalk

You can also use an interval timer that begins at 23:00 and lasts 7 hours. It will be TRUE between 23:00 and 06:00 the next morning.

I’m in despair,
Nothing I tried worked, the schedules just refuse to work properly. Doesn’t matter how I define it nothing work, and everything is simple, not complicated things. Without being able to use schedules I can’t enjoy the advantages of PLEG and I’m going back to the bad scene managing of vera (which now is perfect comparing…:disappointed:)
Any suggestions not including writing codes in lua or whatever - I know nothing about it, will be appreciated.
Thanks.

Sent from my SM-A530F using Tapatalk

[quote=“Orenis, post:10, topic:199681”]I’m in despair,
Nothing I tried worked, the schedules just refuse to work properly. Doesn’t matter how I define it nothing work, and everything is simple, not complicated things. Without being able to use schedules I can’t enjoy the advantages of PLEG and I’m going back to the bad scene managing of vera (which now is perfect comparing…:disappointed:)
Any suggestions not including writing codes in lua or whatever - I know nothing about it, will be appreciated.
Thanks.

Sent from my SM-A530F using Tapatalk[/quote]

Reactor’s time conditions will gladly accept your 23:00 to 06:00 schedule and do the right thing. Maybe give it a try.

Without any Status Report then l can’t help.

Change your ‘Absolute’ start times to look like this (starting at 23:00:00) then use Interval to end it X number of hours later (as shown in my example). This will work.

There is a problem with all kinds of schedules, sunrise to sunset, absolute from to, almost none is working. I already posted the status report, but here it is again

Orenis,
Did you TRY the example I posted yesterday, using [Day of Week] as the start time? I suspect that you are using [Absolute] incorrectly. This exerpt is from the PLEG user guide:

[tt]Absolute - On a specified date and time. The year may be specified or left as * to signify any year.[/tt]

but your screen shot of the ‘sLateNight’ schedule configuration using [Absolute] does NOT contain any date data. This is not correct! Absolute schedules are better suited for once a year events like holidays and the date date would look something like this:

[tt]01/01/*[/tt]

for New Years day of every year.

In addition, ‘sLateNight’ NEVER starts simply because NO DATE data is entered.

My advice: dump all your [Absolute] schedules and convert them to [Day of Week] then try a simple schedule to prove it works. Once you get it working take a few minutes and Reread the PLEG users manual. I believe your are trying to use the wrong type of timer incorrectly. PLEG is a powerful tool with many options. Some are easy, some not so easy. But if you take the time to read the Users Guide you can avoid many issues or simply avoid options you don’t fully understand. My first actions with PLEG were VERY basic, and could have been done with Vera scenes, but they helped me understand HOW PLEG works.

Good luck

I would echo what kartcon has said. I’d rather not offer any more comment in case I confuse the situation further other to ask why haven’t you included the Sunrise/Sunset PlugIn, it’s powerful on it’s own and would/should simplify your logic.

The absolute option caught me out as well - good for holidays, birthdays etc like the others have said. Let us know how you get on with the rest? I’ve got some IsDay and IsNight schedules in PLEG and they work fine for me, why would you rather have another plugin as well? Just trying to understand?

[quote=“fyford”]The absolute option caught me out as well - good for holidays, birthdays etc like the others have said. Let us know how you get on with the rest? I’ve got some IsDay and IsNight schedules in PLEG and they work fine for me, why would you rather have another plugin as well? Just trying to understand?[/quote]First of all - thanks for all the advices, Kartcon- I’ve changed the schedules as you suggested, but only after doing a hard reset, and now everything seems to work, FINALLY!
So now I have it as daily.

Fyford, the reason to use another plugin is that for sunrise to sunset schedule I need either the built in option of PLEG to work or an outside plugin, and right now the sunset/ sunrise option doesn’t seem to function.

Thanks again, hope it will all work good now, and I will start to have more serious questions of how to compile a certain condition to get to the wanted result.

Sent from my SM-A530F using Tapatalk

Orenis, Glad you were able to make some progress with PLEG. Keep building, experimenting and learning. Work in small steps and make sure each small step works then start putting each little piece into more complex logic. PLEG is a powerful tool but once you get the hang of it your abilities are limited only by your imagination.

Feel free to ask for help here. There are lots of talented people here who are willing to help. Most are smarter than me but may not jump in if you have not done at least a little work trying to solve your problem yourself.

Sunrise/Sunset schedules are not hard to set up and work well within PLEG. Here are a couple examples. See photo.

Hi Guys,

I have another question. PLEG attached. Basically I have a Fibaro 3in1 PIR in my bathroom as well as some ceiling speakers driven by a SONOS amp and some philips hue strip lights built into the wall as accent lights.

Right so when the kids have to go to bath they like the lights to go on and they want them pink - you guess the gender… that part works just fine. I then have the Sonos come on with some nursery rhymes which is shuffled so they don’t always get the same one come on. I want to have a condition that only proves true if it wasn’t true already for say x amount of time. This way if the PIR detects someone at kids bath time the lights come on and the music plays as it does now, but if the person moves and the PIR detects movement again, it fires again and of course lights that are on are told to turn on so nothing happens but the music gets fired to play the next song which is pretty annoying. I thought I could get around it by using NOW but it does not seem to work. I was thinking maybe I can figure out if Sonos is playing and if it is then don’t do anything. I.e. for the condition to be true Sonos MUST be either on Pause or Stop but I can’t seem to figure out how to achieve this.

Any help appreciated, thanks

Best Home Automation shopping experience. Shop at getvera!

© 2021 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules