Getting used to working with PLEG but i have hit a stumbling block with a schedule i created.
The plan is that the light turns on when the “night and day” plugin reports in that “Night” has fallen to true
Then i want the lights to turn off at 23:00
The condition with the schedule is called “SoffitOff”
Triggers
BrickLightsOff Whenever the Brick Wall Lights is turned off
BrickLightsON Whenever the Brick Wall Lights is turned
Day Day or Night indicates Day time.
Night Day or Night indicates Night time.
PorchLightOff Whenever the Porch Light is turned off
PorchLighton Whenever the Porch Light is turned on
SoffitLightOn Whenever the Soffit Lights Front is turned on
SoffitLightsOff Whenever the Soffit Lights Front is turned off
Conditions
SoffitOn No Night AND SoffitLightsOff
SoffitOff No SoffitLightOn And TimeOff
BrickandPorchOn No Night AND BrickLightsOff AND PorchLightOff
BrickandPorchOff No Day AND BrickLightsON AND PorchLighton
I have also attached a PDF of my PLEG
Is anyone able to let me know where i am going wrong?
So in your condition !SoffitLightOn and only haveing one condition of “SoffitLightOn” would do the same.
The “!” = “NOT” or “not ON” if that makes sense.
Also day and night plugin is fine, but there is also day and night built into PLEG, so you could (not required) also remove the day and night plugin from PLEG inputs if you wanted and save another input or clean things up. To use the day and night use the “Schedules” and set it to “at sunset” or “at sunrise”. Or add the offset 20 min before or after sunrise.
Which brings me to your main problem that I see.
The schedule called “TimeOff” is not set to turn on or has a “Unknown” on the “ON Type” box. Which looks like it should be set to “WEEKLY” and have every day of the week checked to work everyday. The timer in its current state is never started so it’s never TRUE and just stuck on FALSE currently.
This is where you could just set this timer for the on time and the off time related to sunrise and sunset and use it in both the on and the off condition. Instead of “At certian time of day” you can choose “At Sunset” or what ever.
All you need to show is the PDF … and then reference inputs, conditions, or actions in your message.
You do not need two triggers for complimentary states i.e. BrickLIghtsON and BrigkLightsOff
Delete one, (i.e. BrickLightsOff) and where you would have referenced it later replace it with !BrickLightsOn
You can also use NOT BrickLightsOn
You will often Need complimentary conditions if you have different actions for the TRUE and FALSE conditions.
As an advanced PLEG user you can reduce this to one condition, by putting some logic in your actions!
But it’s simpler to Have:
SoffitOn No Night AND SoffitLightsOff
SoffitOff No !SoftOn
Now to your posted question …
You have a timer called: TimerOff
You do not set an off time, so this will always be true … It can be used to poke a condition to be re-evalated, often the condition will need “REPEATS ON”
i.e. if for the following conditon:
FireAt11 TimerOff
After running one time the condition would always be true.
Change TimerOff to be called TimerOn and set it up as:
On at Sunset off at 11:30 PM every day
Then change the condition:
SoffitOn (SoffitLighsOff; NIGHT) and TimerOn
SoffitOff ! SoffitOn
Note I also change the logic for SoffitOn … the way you had it you could never manually turn it off, because if you manually turned it off the PorchLightOff would trigger and cause the condition to be true again … and turn the light back on!
You still have TWO triggers for the same device. (One for On and one for OFF) you only need 1.
Also many of your triggers do not have time stamps. So either they have NEVER happened since you defined them in PLEG or they are not setup properly … Delete them!
Right,
Hopefully i have sorted out my PLEG instance.
I have tweaked the schedule somewhat and hopefully i have clicked with how to work on more advanced pleg logic
I havent been able to test it until tNight starts and 23:00 hits.
My previous set up wasn’t turning some of the lights off so wanted to start it again
Best Home Automation shopping experience. Shop at Ezlo!