My Vacation Ghost attempt using PLEG

I added a PLEG device specifically for vacation. It is normally in Bypass, and it is Armed with a Vacation mode multiswitch (I’m on UI5 and not using house modes).

My goal was to simulate independent activity upstairs and downstairs all day, with some randomness, and then turn all of the inside lights off at night. Between random on & off times with PLEG, and delays in execution Actions, I think I’ve done it well enough… but I’m open to any suggestions that might improve it. One thought I had was to add a “midnight snack” schedule that runs a few nights a week to turn some lights on & off in the wee hours.

All of the lights here are interior lights… my exterior lights will operate normally, from a different PLEG device. I haven’t tested this yet, but it looks like it should work.

[code]Schedules

Name On Type On Time On Days Random On Delay Off After Type Off Time Off Days Random Off Delay
s01_Upstairs_Ghost_1 Weekly 06:30:00 1,2,3,4,5 00:45:00 Weekly 09:00:00 1,2,3,4,5 00:45:00
s02_Upstairs_Ghost_2 Weekly 09:00:00 1,2,3,4,5,6,7 00:30:00 Weekly 17:00:00 1,2,3,4,5,6,7 00:30:00
s03_Upstairs_Ghost_3 Weekly 17:00:00 1,2,3,4,5,6,7 00:45:00 Weekly 21:45:00 1,2,3,4,5,6,7 00:45:00
s04_Downstairs_Ghost_1 Weekly 07:00:00 1,2,3,4,5 00:30:00 Weekly 11:00:00 1,2,3,4,5 00:30:00
s05_Downstairs_Ghost_2 Weekly 11:00:00 1,2,3,4,5,6,7 00:30:00 Weekly 18:00:00 1,2,3,4,5,6,7 00:30:00
s06_Downstairs_Ghost_3 Weekly 18:00:00 1,2,3,4,5,6,7 00:30:00 Weekly 20:00:00 1,2,3,4,5,6,7 00:45:00
Conditions

Name Repeat Expression
c01_Upstairs_Ghost_1_On No s01_Upstairs_Ghost_1
c02_Upstairs_Ghost_1_Off No !s01_Upstairs_Ghost_1
c03_Upstairs_Ghost_2_On No s02_Upstairs_Ghost_2
c04_Upstairs_Ghost_2_Off No !s02_Upstairs_Ghost_2
c05_Upstairs_Ghost_3_On No s03_Upstairs_Ghost_3
c06_Upstairs_Ghost_3_Off No !s03_Upstairs_Ghost_3
c07_Downstairs_Ghost_1_On No s04_Downstairs_Ghost_1
c08_Downstairs_Ghost_1_Off No !s04_Downstairs_Ghost_1
c09_Downstairs_Ghost_2_On No s05_Downstairs_Ghost_2
c10_Downstairs_Ghost_2_Off No !s05_Downstairs_Ghost_2
c11_Downstairs_Ghost_3_On No s06_Downstairs_Ghost_3
c12_Downstairs_Ghost_3_Off No !s06_Downstairs_Ghost_3
Actions

Actions for Condition: c01_Upstairs_Ghost_1_On

Device Actions:

Immediate
Device Action Arguments
Stairway Light SetLoadLevelTarget newLoadlevelTarget=50
Master Bath SetLoadLevelTarget newLoadlevelTarget=30
Bedroom 2 Light SetLoadLevelTarget newLoadlevelTarget=50
Delay 05:00
Device Action Arguments
Kid’s Room Light SetLoadLevelTarget newLoadlevelTarget=50

Actions for Condition: c02_Upstairs_Ghost_1_Off

Device Actions:

Immediate
Device Action Arguments
Bedroom 2 Light SetLoadLevelTarget newLoadlevelTarget=0
Delay 10:00
Device Action Arguments
Kid’s Room Light SetLoadLevelTarget newLoadlevelTarget=0
Delay 1:00:00
Device Action Arguments
Master Bath SetLoadLevelTarget newLoadlevelTarget=0

Actions for Condition: c03_Upstairs_Ghost_2_On

Device Actions:

Immediate
Device Action Arguments
Bedroom Sitting Area Light SetLoadLevelTarget newLoadlevelTarget=50
Delay 2:00:00
Device Action Arguments
Kid’s Shower Light SetTarget newTargetValue=1
Bedroom Sitting Area Light SetLoadLevelTarget newLoadlevelTarget=0
Delay 3:00:00
Device Action Arguments
Kid’s Shower Light SetTarget newTargetValue=0
Stairway Light SetLoadLevelTarget newLoadlevelTarget=100

Actions for Condition: c04_Upstairs_Ghost_2_Off

Device Actions:

Immediate
Device Action Arguments
Stairway Light SetLoadLevelTarget newLoadlevelTarget=0

Actions for Condition: c05_Upstairs_Ghost_3_On

Device Actions:

Immediate
Device Action Arguments
Media Room Ceiling Light/Fan SetTarget newTargetValue=1
Bedroom 3 Light SetTarget newTargetValue=1
Delay 1:30:00
Device Action Arguments
Kid’s Room Light SetLoadLevelTarget newLoadlevelTarget=50
Stairway Light SetLoadLevelTarget newLoadlevelTarget=50

Actions for Condition: c06_Upstairs_Ghost_3_Off

Device Actions:

Immediate
Device Action Arguments
Stairway Light SetLoadLevelTarget newLoadlevelTarget=0
Upstairs Lights SetLoadLevelTarget newLoadlevelTarget=0
Kid’s Bathroom Light SetLoadLevelTarget newLoadlevelTarget=0
Kid’s Room Light SetLoadLevelTarget newLoadlevelTarget=0
Kid’s Shower Light SetTarget newTargetValue=0
Delay 15:00
Device Action Arguments
Bedroom 2 Light SetLoadLevelTarget newLoadlevelTarget=0
Bedroom 3 Light SetTarget newTargetValue=0
Guest Bathroom Shower SetLoadLevelTarget newLoadlevelTarget=0
Guest Bathroom Vanity SetLoadLevelTarget newLoadlevelTarget=0
Delay 1:00:00
Device Action Arguments
Bedroom Light SetLoadLevelTarget newLoadlevelTarget=0
Bedroom Sitting Area Light SetLoadLevelTarget newLoadlevelTarget=0
Master Bath SetLoadLevelTarget newLoadlevelTarget=0
Master Bed Light SetTarget newTargetValue=0
Master Shower SetLoadLevelTarget newLoadlevelTarget=0
Master Vanity SetLoadLevelTarget newLoadlevelTarget=0

Actions for Condition: c07_Downstairs_Ghost_1_On

Device Actions:

Immediate
Device Action Arguments
Cabinet Lights SetTarget newTargetValue=1
Sitting Room Light SetTarget newTargetValue=1
Delay 10:00
Device Action Arguments
Garage Ceiling Lights SetTarget newTargetValue=1
Living Room Ceiling Lights SetLoadLevelTarget newLoadlevelTarget=40
Delay 20:00
Device Action Arguments
Garage Ceiling Lights SetTarget newTargetValue=0

Actions for Condition: c08_Downstairs_Ghost_1_Off

Device Actions:

Immediate
Device Action Arguments
Sitting Room Light SetTarget newTargetValue=0
Garage Ceiling Lights SetTarget newTargetValue=1
Delay 15:00
Device Action Arguments
Garage Ceiling Lights SetTarget newTargetValue=0

Actions for Condition: c09_Downstairs_Ghost_2_On

Device Actions:

Immediate
Device Action Arguments
Living Room Ceiling Lights SetLoadLevelTarget newLoadlevelTarget=50
Living Room Table SetTarget newTargetValue=1
Delay 2:00:00
Device Action Arguments
Garage Ceiling Lights SetTarget newTargetValue=1
Living Room Ceiling Lights SetLoadLevelTarget newLoadlevelTarget=0
Delay 5:00:00
Device Action Arguments
Kitchen Lights SetLoadLevelTarget newLoadlevelTarget=40
Delay 2:20:00
Device Action Arguments
Garage Ceiling Lights SetTarget newTargetValue=0
Living Room Table SetTarget newTargetValue=0

Actions for Condition: c10_Downstairs_Ghost_2_Off

Device Actions:

Immediate
Device Action Arguments
Dinette Light SetTarget newTargetValue=1
Delay 20:00
Device Action Arguments
Kitchen Lights SetLoadLevelTarget newLoadlevelTarget=0
Dinette Light SetTarget newTargetValue=0

Actions for Condition: c11_Downstairs_Ghost_3_On

Device Actions:

Immediate
Device Action Arguments
Kitchen Lights SetLoadLevelTarget newLoadlevelTarget=40
Dining Room Light SetLoadLevelTarget newLoadlevelTarget=40
Delay 1:00:00
Device Action Arguments
Patio Fans/Lights SetTarget newTargetValue=1
Interior Front Door Light SetLoadLevelTarget newLoadlevelTarget=50
Delay 30:00
Device Action Arguments
Dinette Light SetTarget newTargetValue=1
Dining Room Light SetLoadLevelTarget newLoadlevelTarget=0

Actions for Condition: c12_Downstairs_Ghost_3_Off

Device Actions:

Immediate
Device Action Arguments
Entry Sconces SetLoadLevelTarget newLoadlevelTarget=0
Entry Table SetTarget newTargetValue=0
Garage Ceiling Lights SetTarget newTargetValue=0
Sitting Room Light SetTarget newTargetValue=0
Cabinet Lights SetTarget newTargetValue=0
Dinette Fan SetLoadLevelTarget newLoadlevelTarget=0
Dinette Light SetTarget newTargetValue=0
Laundry Light SetTarget newTargetValue=0
Living Room Ceiling Lights SetLoadLevelTarget newLoadlevelTarget=0
Office Hall SetLoadLevelTarget newLoadlevelTarget=0
Office Light SetLoadLevelTarget newLoadlevelTarget=0
Dining Room Light SetLoadLevelTarget newLoadlevelTarget=0
Patio Fans/Lights SetTarget newTargetValue=0
Delay 30:00
Device Action Arguments
Interior Front Door Light SetLoadLevelTarget newLoadlevelTarget=0
Bar Pendants SetTarget newTargetValue=0
Island Pendants SetTarget newTargetValue=0
Kitchen Lights SetLoadLevelTarget newLoadlevelTarget=0
Living Room Table SetTarget newTargetValue=0[/code]

Very cool - I am very interested in replicating your work on my home and will dig in shortly…

One thing you might notice is that my schedules don’t overlap… 1, 2, and 3 in both upstairs & downstairs are three exclusive time periods throughout the day. I’ve seen the schedules run for one day now, and with the random delay there’s still a chance that two adjacent schedule periods will have a gap between them. I think that’s OK, based on the fact that at the end of each schedule, I think I’ve left a light or two on to carry into the next schedule period.

I might just move up the start of some of the schedules by the delay amount to account for the potential gap anyway.

EDIT: I added a midnight snack schedule, tightened up my random on delays, and changed all of the schedules to type Interval. I think that type will behave better with the random on delays.

[code]Schedules

Name On Type On Time On Days Random On Delay Off After Type Off Time Random Off Delay
s01_Upstairs_Ghost_1 Weekly 06:30:00 1,2,3,4,5 00:05:00 Interval 02:30:00 00:10:00
s02_Upstairs_Ghost_2 Weekly 09:00:00 1,2,3,4,5,6,7 00:10:00 Interval 08:00:00 00:30:00
s03_Upstairs_Ghost_3 Weekly 17:00:00 1,2,3,4,5,6,7 00:20:00 Interval 04:45:00 00:45:00
s04_Downstairs_Ghost_1 Weekly 07:00:00 1,2,3,4,5 00:05:00 Interval 04:00:00 00:30:00
s05_Downstairs_Ghost_2 Weekly 11:00:00 1,2,3,4,5,6,7 00:30:00 Interval 07:00:00 00:30:00
s06_Downstairs_Ghost_3 Weekly 18:00:00 1,2,3,4,5,6,7 00:15:00 Interval 02:00:00 00:10:00
s07_Midnight_Snack_Ghost Weekly 01:00:00 2,3,5 01:30:00 Interval 00:15:00 00:05:00

Conditions

Name Repeat Expression
c01_Upstairs_Ghost_1_On No s01_Upstairs_Ghost_1
c02_Upstairs_Ghost_1_Off No !s01_Upstairs_Ghost_1
c03_Upstairs_Ghost_2_On No s02_Upstairs_Ghost_2
c04_Upstairs_Ghost_2_Off No !s02_Upstairs_Ghost_2
c05_Upstairs_Ghost_3_On No s03_Upstairs_Ghost_3
c06_Upstairs_Ghost_3_Off No !s03_Upstairs_Ghost_3
c07_Downstairs_Ghost_1_On No s04_Downstairs_Ghost_1
c08_Downstairs_Ghost_1_Off No !s04_Downstairs_Ghost_1
c09_Downstairs_Ghost_2_On No s05_Downstairs_Ghost_2
c10_Downstairs_Ghost_2_Off No !s05_Downstairs_Ghost_2
c11_Downstairs_Ghost_3_On No s06_Downstairs_Ghost_3
c12_Downstairs_Ghost_3_Off No !s06_Downstairs_Ghost_3
c13_Midnight_Snack_Lights No s07_Midnight_Snack_Ghost

Actions

Actions for Condition: c01_Upstairs_Ghost_1_On

Device Actions:
Immediate
Device Action Arguments
Stairway Light SetLoadLevelTarget newLoadlevelTarget=50
Master Bath SetLoadLevelTarget newLoadlevelTarget=30
Bedroom 2 Light SetLoadLevelTarget newLoadlevelTarget=50
Delay 05:00
Device Action Arguments
Kid’s Room Light SetLoadLevelTarget newLoadlevelTarget=50

Actions for Condition: c02_Upstairs_Ghost_1_Off

Device Actions:
Immediate
Device Action Arguments
Bedroom 2 Light SetLoadLevelTarget newLoadlevelTarget=0
Delay 10:00
Device Action Arguments
Kid’s Room Light SetLoadLevelTarget newLoadlevelTarget=0
Delay 1:00:00
Device Action Arguments
Master Bath SetLoadLevelTarget newLoadlevelTarget=0

Actions for Condition: c03_Upstairs_Ghost_2_On

Device Actions:
Immediate
Device Action Arguments
Bedroom Sitting Area Light SetLoadLevelTarget newLoadlevelTarget=50
Delay 2:00:00
Device Action Arguments
Kid’s Shower Light SetTarget newTargetValue=1
Bedroom Sitting Area Light SetLoadLevelTarget newLoadlevelTarget=0
Delay 3:00:00
Device Action Arguments
Kid’s Shower Light SetTarget newTargetValue=0
Stairway Light SetLoadLevelTarget newLoadlevelTarget=100

Actions for Condition: c04_Upstairs_Ghost_2_Off

Device Actions:
Immediate
Device Action Arguments
Stairway Light SetLoadLevelTarget newLoadlevelTarget=0

Actions for Condition: c05_Upstairs_Ghost_3_On

Device Actions:
Immediate
Device Action Arguments
Media Room Ceiling Light/Fan SetTarget newTargetValue=1
Bedroom 3 Light SetTarget newTargetValue=1
Delay 1:30:00
Device Action Arguments
Kid’s Room Light SetLoadLevelTarget newLoadlevelTarget=50
Stairway Light SetLoadLevelTarget newLoadlevelTarget=50

Actions for Condition: c06_Upstairs_Ghost_3_Off

Device Actions:
Immediate
Device Action Arguments
Stairway Light SetLoadLevelTarget newLoadlevelTarget=0
Upstairs Lights SetLoadLevelTarget newLoadlevelTarget=0
Kid’s Bathroom Light SetLoadLevelTarget newLoadlevelTarget=0
Kid’s Room Light SetLoadLevelTarget newLoadlevelTarget=0
Kid’s Shower Light SetTarget newTargetValue=0
Delay 15:00
Device Action Arguments
Bedroom 2 Light SetLoadLevelTarget newLoadlevelTarget=0
Bedroom 3 Light SetTarget newTargetValue=0
Guest Bathroom Shower SetLoadLevelTarget newLoadlevelTarget=0
Guest Bathroom Vanity SetLoadLevelTarget newLoadlevelTarget=0
Delay 1:00:00
Device Action Arguments
Bedroom Light SetLoadLevelTarget newLoadlevelTarget=0
Bedroom Sitting Area Light SetLoadLevelTarget newLoadlevelTarget=0
Master Bath SetLoadLevelTarget newLoadlevelTarget=0
Master Bed Light SetTarget newTargetValue=0
Master Shower SetLoadLevelTarget newLoadlevelTarget=0
Master Vanity SetLoadLevelTarget newLoadlevelTarget=0

Actions for Condition: c07_Downstairs_Ghost_1_On

Device Actions:
Immediate
Device Action Arguments
Cabinet Lights SetTarget newTargetValue=1
Sitting Room Light SetTarget newTargetValue=1
Delay 10:00
Device Action Arguments
Garage Ceiling Lights SetTarget newTargetValue=1
Living Room Ceiling Lights SetLoadLevelTarget newLoadlevelTarget=40
Delay 20:00
Device Action Arguments
Garage Ceiling Lights SetTarget newTargetValue=0

Actions for Condition: c08_Downstairs_Ghost_1_Off

Device Actions:
Immediate
Device Action Arguments
Sitting Room Light SetTarget newTargetValue=0
Garage Ceiling Lights SetTarget newTargetValue=1
Delay 15:00
Device Action Arguments
Garage Ceiling Lights SetTarget newTargetValue=0

Actions for Condition: c09_Downstairs_Ghost_2_On

Device Actions:
Immediate
Device Action Arguments
Living Room Ceiling Lights SetLoadLevelTarget newLoadlevelTarget=50
Living Room Table SetTarget newTargetValue=1
Delay 2:00:00
Device Action Arguments
Garage Ceiling Lights SetTarget newTargetValue=1
Living Room Ceiling Lights SetLoadLevelTarget newLoadlevelTarget=0
Delay 5:00:00
Device Action Arguments
Kitchen Lights SetLoadLevelTarget newLoadlevelTarget=40
Delay 2:20:00
Device Action Arguments
Garage Ceiling Lights SetTarget newTargetValue=0
Living Room Table SetTarget newTargetValue=0

Actions for Condition: c10_Downstairs_Ghost_2_Off

Device Actions:
Immediate
Device Action Arguments
Dinette Light SetTarget newTargetValue=1
Delay 20:00
Device Action Arguments
Kitchen Lights SetLoadLevelTarget newLoadlevelTarget=0
Dinette Light SetTarget newTargetValue=0

Actions for Condition: c11_Downstairs_Ghost_3_On

Device Actions:
Immediate
Device Action Arguments
Kitchen Lights SetLoadLevelTarget newLoadlevelTarget=40
Dining Room Light SetLoadLevelTarget newLoadlevelTarget=40
Delay 1:00:00
Device Action Arguments
Patio Fans/Lights SetTarget newTargetValue=1
Interior Front Door Light SetLoadLevelTarget newLoadlevelTarget=50
Delay 30:00
Device Action Arguments
Dinette Light SetTarget newTargetValue=1
Dining Room Light SetLoadLevelTarget newLoadlevelTarget=0

Actions for Condition: c12_Downstairs_Ghost_3_Off

Device Actions:
Immediate
Device Action Arguments
Entry Sconces SetLoadLevelTarget newLoadlevelTarget=0
Entry Table SetTarget newTargetValue=0
Garage Ceiling Lights SetTarget newTargetValue=0
Sitting Room Light SetTarget newTargetValue=0
Cabinet Lights SetTarget newTargetValue=0
Dinette Fan SetLoadLevelTarget newLoadlevelTarget=0
Dinette Light SetTarget newTargetValue=0
Laundry Light SetTarget newTargetValue=0
Living Room Ceiling Lights SetLoadLevelTarget newLoadlevelTarget=0
Office Hall SetLoadLevelTarget newLoadlevelTarget=0
Office Light SetLoadLevelTarget newLoadlevelTarget=0
Dining Room Light SetLoadLevelTarget newLoadlevelTarget=0
Patio Fans/Lights SetTarget newTargetValue=0
Delay 30:00
Device Action Arguments
Interior Front Door Light SetLoadLevelTarget newLoadlevelTarget=0
Bar Pendants SetTarget newTargetValue=0
Island Pendants SetTarget newTargetValue=0
Kitchen Lights SetLoadLevelTarget newLoadlevelTarget=0
Living Room Table SetTarget newTargetValue=0

Actions for Condition: c13_Midnight_Snack_Lights

Device Actions:
Immediate
Device Action Arguments
Stairway Light SetLoadLevelTarget newLoadlevelTarget=30
Delay 08:00
Device Action Arguments
Dining Room Light SetLoadLevelTarget newLoadlevelTarget=0
Kitchen Lights SetLoadLevelTarget newLoadlevelTarget=0
Delay 01:00
Device Action Arguments
Dining Room Light SetLoadLevelTarget newLoadlevelTarget=30
Kitchen Lights SetLoadLevelTarget newLoadlevelTarget=30
Delay 09:00
Device Action Arguments
Stairway Light SetLoadLevelTarget newLoadlevelTarget=0[/code]