Can't figure out how INTERVAL and DELAY ON/OFF working together in PLEG schedule

Trying to configure a light when i’m out to go on and off (ghost scene), with a maximum on/off time and with a random on/off time.

Ex:

Every 30 mins, open the light for 15 to 30 mins. Which means the off time should be between 0 and 15 mins maximum.

Somebody could you tell me how to set it with PLEG.

Note the control is done with a virtual switch triggered by a scene days/night. The condition is ok too… but the interval and delay… I don’t fu… understand. ;-(

You would have an ON interval time of 30 minutes.

You would have an OFF interval of 30 seconds with a random off delay of 14:30 (Delays will be between 30 seconds and 15 minutes)

Thanks a lot for the quick reply.

It’s seems the solution doesnt work. The light stay open for a minute and its flashing for a second and it continue for an other minute.

I used an interval ON 1 min and a interval of OFF 5 sec and a delay of 25 sec for testing.

Any idea ?

Thanks

Anyone can tell me when the stop is triggered relatively to the start period event ?

Anyone can confirm the delay start or stop is applied at the beginning of the period ?

Any body already have this receipe for this ??? :wink:

Post your status report so we can see what you are doing.

Finally found out…

General info :

  1. Interval ON and OFF and triggered independently, from the beginning of the schedule
  2. Delay is applied at the beginning of the Interval ON or OFF (the status is ON or OFF only when the delay is finished)

Config :

Virtual Switch : vsGhostfirstfloor //triggered by a DAY (OFF)/NIGHT(ON) app and in MODE Away or Vacation
Pleg manager : mGhostFirstfloor

Schedule : sGhostfirstfloor

  • Interval On : 1h - every hour the schedule will be On (No mater what every hour the ON will come back, but delayed by the following delay)
  • Interval On delay : 10 min (0 to 10 mins)
  • Interval Off : 45 min - every 45 mins the schedule will be Off (No mater what every 45 mins the Off will come back, but delayed by the following delay)
  • Interval Off delay : 10 min (0 to 10 mins)

Note even though a delay is applied, the timer reminds exactly the first time when the schedule has been started. So if the schedule start at 17h, then the Interval ON will be triggered at 18h, 19h, 20h… but the real status ON will be ON only when the delay period will be finished. Samething for the OFF schedule. At 17h45, 18h45, 19h45… the the status OFF will be triggered based again on the delay period. So it could be really triggered Off between 17h45 and 17h55 until 18h (or a bit later) when the ON interval will kick in again, depending on his own delay.

Condition :
cGhostfirstfloor1 : sGhostfirstfloor and vsGhostfirstfloor //schedule is on and virtual switch is on

  • action : open lights
    cGhostfirstfloor2 : !sGhostfirstfloor and vsGhostfirstfloor //schedule is off and virtual switch is on, note the negative condition with the !
  • action : close lights

That’s it… 3 days to figure it out… ;-( I must be stupid.

I hope it will help others…

ote even though a delay is applied, the timer reminds exactly the first time when the schedule has been started. So if the schedule start at 17h, then the Interval ON will be triggered at 18h, 19h, 20h.... but the real status ON will be ON only when the delay period will be finished. Samething for the OFF schedule. At 17h45, 18h45, 19h45.... the the status OFF will be triggered based again on the delay period. So it could be really triggered Off between 17h45 and 17h55 until 18h (or a bit later) when the ON interval will kick in again, depending on his own delay.

Not exactly!
When a ON timer is tripped … it schedules the NEXT ON Time and the OFF time (if specified).
The NEXT ON is the ON Interval + Random On Delay.
The NEXT OFF is the OFF Interval + Randon Off Delay.

This is why the ON Interval needs to be greater than the OFF Interval + MAX Random Off Delay.

Thanks for the rectification.