Vacation Lighting. Anyone have it running?

Running two copies should work. But, that's too easy.

I added 24h to the stop time and that gets the correct date:
2 2018-12-28 04:17:09.755 debugtimeWindowStop = Sat Dec 29 07:14:00 EST 2018 adjusted: Sat Dec 29 07:14:00 EST 2018

app:5602018-12-28 04:17:09.754 debugtimeWindowStop = Sat Dec 29 07:16:00 EST 2018 adjusted: Sat Dec 29 07:14:00 EST 2018

app:5602018-12-28 04:17:09.749 debugtimeWindowStart = Fri Dec 28 17:37:00 EST 2018

app:5602018-12-28 04:17:09.747 debugdaysOk = true

app:5602018-12-28 04:17:09.746 debugmodeOk = true

app:5602018-12-28 04:15:09.642 debugInstalled with settings: [frequency_minutes:17, number_of_active_lights:1, switches:[Living Dimmer, Dining Light, Hall Front Light, Bed Front Dimmer, Bed Side Dimmer, Master Bed Dimmer, Master Bath Light, Kitchen Dimmer, Bathroom Light], newMode:[Away], startTimeType:sunset, starting:2018-12-28T00:01:00.000-0500, endTimeType:sunrise, endTimeOffset:1440, people:[A, D]]

Tried starting 24h earlier: works fine.

Worked fine with a 1440 min delay:

app:5602018-12-28 17:39:00.284 debugreschedule 17 + 9 minutes

app:5602018-12-28 17:39:00.281 debugturned on Bed Side Dimmer

app:5602018-12-28 17:39:00.260 debuginactive switches: 9 numlight: 1

app:5602018-12-28 17:39:00.247 debugRunning

app:5602018-12-28 17:39:00.237 debughomeIsEmpty: true

app:5602018-12-28 17:39:00.218 debugtimeOk = true

app:5602018-12-28 17:39:00.196 debugtimeWindowStop = Sat Dec 29 07:16:00 EST 2018 adjusted: Sat Dec 29 07:14:00 EST 2018

app:5602018-12-28 17:39:00.193 debugtimeWindowStart = Fri Dec 28 17:37:00 EST 2018

app:5602018-12-28 17:39:00.191 debugdaysOk = true

app:5602018-12-28 17:39:00.189 debugmodeOk = true

app:5602018-12-28 17:37:00.050 debugstartTimeCheck

I will post some updates to vacation lighting director.

Some of the issues reported in times are related to differences in HE vs. Smartthings.

In Smartthings, the sunrise/sunset times adjust for scheduling into the future, where as in HE they do not, so code has to be added for this (new updates coming).

Another issue is the timeOfDayIsBetween, ST handles the above time adjustments, where HE does not.

Again the new code will fix this. Timehandling is incompatible in these functions between the platforms.

2 Likes

Thank you much.
Will test the new code when available.

Here is the beta version

importUrl: https://raw.githubusercontent.com/imnotbob/vacation-lighting-director/beta/smartapps/imnotbob/vacation-lighting-director.src/vacation-lighting-director.groovy

This is also available in HPM

Note this is branch beta

5 Likes

New code works great. Here is the log. I rebooted the hub at 3:44 am.
Both start and stop times say Saturday. It was Saturday when I installed the code.
The previous code would log wrong time and not start.

app:7152019-01-19 03:56:44.516 debugreschedule 20 + 2 minutes

app:7152019-01-19 03:56:44.514 debugturned on [Aeon LED Bulb]

app:7152019-01-19 03:56:44.388 debugturned on Living Dimmer

app:7152019-01-19 03:56:44.304 debuginactive switches: 10 numlight: 1

app:7152019-01-19 03:56:44.288 debugturned off Dining Light

app:7152019-01-19 03:56:44.064 debugRunning

app:7152019-01-19 03:56:44.012 debugtimeOk = true

app:7152019-01-19 03:56:43.953 debugtimeWindowStop = Sat Jan 19 07:18:00 EST 2019 Sat Jan 19 07:18:00 EST 2019

app:7152019-01-19 03:56:43.926 debugtimeWindowStart = Sat Jan 19 17:39:00 EST 2019 Sat Jan 19 17:39:00 EST 2019

app:7152019-01-19 03:44:11.678 debughad to reschedule 448, 1200

app:7152019-01-19 03:44:11.618 debugtimeOk = true

app:7152019-01-19 03:44:11.545 debugtimeWindowStop = Sat Jan 19 07:18:00 EST 2019 Sat Jan 19 07:18:00 EST 2019

app:7152019-01-19 03:44:11.505 debugtimeWindowStart = Sat Jan 19 17:39:00 EST 2019 Sat Jan 19 17:39:00 EST 2019

app:7152019-01-19 03:44:11.167 debugtimeOk = true

app:7152019-01-19 03:44:11.061 debugtimeWindowStop = Sat Jan 19 07:18:00 EST 2019 Sat Jan 19 07:18:00 EST 2019

app:7152019-01-19 03:44:11.014 debugtimeWindowStart = Sat Jan 19 17:39:00 EST 2019 Sat Jan 19 17:39:00 EST 2019

app:7152019-01-19 03:42:10.518 debugmodeChangeHandler com.hubitat.hub.domain.Event@541e9621

app:7152019-01-19 03:36:44.029 debugreschedule 20 + 3 minutes

app:7152019-01-19 03:36:44.028 debugturned on [Aeon LED Bulb]

app:7152019-01-19 03:36:43.993 debugturned on Dining Light

app:7152019-01-19 03:36:43.972 debuginactive switches: 10 numlight: 1

app:7152019-01-19 03:36:43.963 debugRunning

app:7152019-01-19 03:36:43.943 debugtimeOk = true

app:7152019-01-19 03:36:43.909 debugtimeWindowStop = Sat Jan 19 07:18:00 EST 2019 Sat Jan 19 07:18:00 EST 2019

app:7152019-01-19 03:36:43.889 debugtimeWindowStart = Sat Jan 19 17:39:00 EST 2019 Sat Jan 19 17:39:00 EST 2019

app:7152019-01-19 03:34:43.795 debugInstalled with settings: [frequency_minutes:20, number_of_active_lights:1, switches:[Living Dimmer, Dining Light, Hall Front Light, Bed Front Dimmer, Bed Side Dimmer, Garage Light, Master Bed Dimmer, Master Bath Light, Kitchen Dimmer, Bathroom Light], newMode:[Away], on_during_active_lights:[Aeon LED Bulb], startTimeType:sunset, endTimeType:sunrise, startTimeOffset:-15, people:[A, D]]

app:7152019-01-19 03:34:43.747 debugtimeWindowStop = Sat Jan 19 07:18:00 EST 2019 Sat Jan 19 07:18:00 EST 2019

app:7152019-01-19 03:34:43.712 debugtimeWindowStart = Sat Jan 19 17:39:00 EST 2019 Sat Jan 19 17:39:00 EST 2019

And here is the log from this morning. Worked perfect. The dates are correct.

app:7152019-01-19 07:48:41.434 debugmodeChangeHandler com.hubitat.hub.domain.Event@3b4971a4

app:7152019-01-19 07:48:41.383 debugmodeChangeHandler com.hubitat.hub.domain.Event@1bb93979

app:7152019-01-19 07:47:41.484 debugmodeChangeHandler com.hubitat.hub.domain.Event@dfba841

app:7152019-01-19 07:47:41.479 debugmodeChangeHandler com.hubitat.hub.domain.Event@5dca76b

app:7152019-01-19 07:47:41.408 debugmodeChangeHandler com.hubitat.hub.domain.Event@5a323a0e

app:7152019-01-19 07:47:41.208 debugmodeChangeHandler com.hubitat.hub.domain.Event@66333b71

app:7152019-01-19 07:47:41.007 debugmodeChangeHandler com.hubitat.hub.domain.Event@378e97be

app:7152019-01-19 07:35:42.224 debugtimeWindowStop = Sun Jan 20 07:18:00 EST 2019 Sun Jan 20 07:18:00 EST 2019

app:7152019-01-19 07:35:42.195 debugtimeWindowStart = Sat Jan 19 17:39:00 EST 2019 Sat Jan 19 17:39:00 EST 2019

app:7152019-01-19 07:35:42.150 debugSomeone is home - Stopping Schedule Vacation Lights

app:7152019-01-19 07:33:42.071 debugmodeChangeHandler com.hubitat.hub.domain.Event@259d368a

app:7152019-01-19 07:33:42.028 debugmodeChangeHandler com.hubitat.hub.domain.Event@6d132053

app:7152019-01-19 07:33:42.020 debugmodeChangeHandler com.hubitat.hub.domain.Event@7d99d8e

app:7152019-01-19 07:33:41.982 debugmodeChangeHandler com.hubitat.hub.domain.Event@537fcf68

app:7152019-01-19 07:33:41.950 debugmodeChangeHandler com.hubitat.hub.domain.Event@7b56e054

app:7152019-01-19 07:33:41.897 debugmodeChangeHandler com.hubitat.hub.domain.Event@1f2a9cc5

app:7152019-01-19 07:33:41.372 debugmodeChangeHandler com.hubitat.hub.domain.Event@28b6e328

app:7152019-01-19 07:33:41.165 debugmodeChangeHandler com.hubitat.hub.domain.Event@27ed269b

app:7152019-01-19 07:18:00.740 debugtimeOk = false

app:7152019-01-19 07:18:00.704 debugtimeWindowStop = Sun Jan 20 07:18:00 EST 2019 Sun Jan 20 07:18:00 EST 2019

app:7152019-01-19 07:18:00.687 debugtimeWindowStart = Sat Jan 19 17:39:00 EST 2019 Sat Jan 19 17:39:00 EST 2019

app:7152019-01-19 07:18:00.660 debugtimeOk = false

app:7152019-01-19 07:18:00.632 debugtimeWindowStop = Sun Jan 20 07:18:00 EST 2019 Sun Jan 20 07:18:00 EST 2019

app:7152019-01-19 07:18:00.620 debugtimeWindowStart = Sat Jan 19 17:39:00 EST 2019 Sat Jan 19 17:39:00 EST 2019

app:7152019-01-19 07:18:00.605 debugtimeOk = false

app:7152019-01-19 07:18:00.580 debugtimeWindowStop = Sun Jan 20 07:18:00 EST 2019 Sun Jan 20 07:18:00 EST 2019

app:7152019-01-19 07:18:00.565 debugtimeWindowStart = Sat Jan 19 17:39:00 EST 2019 Sat Jan 19 17:39:00 EST 2019

app:7152019-01-19 07:18:00.544 debugendTimeCheck

app:7152019-01-19 07:18:00.496 debugtimeWindowStop = Sun Jan 20 07:18:00 EST 2019 Sun Jan 20 07:18:00 EST 2019

app:7152019-01-19 07:18:00.467 debugtimeWindowStart = Sat Jan 19 17:39:00 EST 2019 Sat Jan 19 17:39:00 EST 2019

app:7152019-01-19 07:18:00.420 debugwrong time - Stopping Vacation Lights

app:7152019-01-19 07:18:00.416 debugtimeOk = false

app:7152019-01-19 07:18:00.376 debugtimeWindowStop = Sun Jan 20 07:18:00 EST 2019 Sun Jan 20 07:18:00 EST 2019

app:7152019-01-19 07:18:00.353 debugtimeWindowStart = Sat Jan 19 17:39:00 EST 2019 Sat Jan 19 17:39:00 EST 2019

app:7152019-01-19 07:18:00.312 debugtimeOk = false

app:7152019-01-19 07:18:00.247 debugtimeWindowStop = Sun Jan 20 07:18:00 EST 2019 Sun Jan 20 07:18:00 EST 2019

app:7152019-01-19 07:18:00.206 debugmodeChangeHandler com.hubitat.hub.domain.Event@6dae1b14

app:7152019-01-19 07:18:00.197 debugtimeWindowStart = Sat Jan 19 17:39:00 EST 2019 Sat Jan 19 17:39:00 EST 2019

app:7152019-01-19 07:18:00.167 debugmodeChangeHandler com.hubitat.hub.domain.Event@13deaea0

app:7152019-01-19 07:18:00.157 debugtimeOk = false

app:7152019-01-19 07:18:00.102 debugtimeWindowStop = Sun Jan 20 07:18:00 EST 2019 Sun Jan 20 07:18:00 EST 2019

app:7152019-01-19 07:18:00.081 debugtimeWindowStart = Sat Jan 19 17:39:00 EST 2019 Sat Jan 19 17:39:00 EST 2019

app:7152019-01-19 07:18:00.056 debugendTimeCheck

app:7152019-01-19 07:10:47.224 debugtimeWindowStop = Sat Jan 19 07:18:00 EST 2019 Sat Jan 19 07:18:00 EST 2019

app:7152019-01-19 07:10:47.198 debugtimeWindowStart = Sat Jan 19 17:39:00 EST 2019 Sat Jan 19 17:39:00 EST 2019

app:7152019-01-19 07:10:47.158 debugAll OFF

app:7152019-01-19 07:10:47.023 debugwrong time - Stopping Vacation Lights

app:7152019-01-19 07:10:47.021 debugtimeOk = false

app:7152019-01-19 07:10:46.989 debugtimeWindowStop = Sat Jan 19 07:18:00 EST 2019 Sat Jan 19 07:18:00 EST 2019

app:7152019-01-19 07:10:46.978 debugtimeWindowStart = Sat Jan 19 17:39:00 EST 2019 Sat Jan 19 17:39:00 EST 2019

app:7152019-01-19 07:10:46.953 debugtimeOk = false

app:7152019-01-19 07:10:46.930 debugtimeWindowStop = Sat Jan 19 07:18:00 EST 2019 Sat Jan 19 07:18:00 EST 2019

app:7152019-01-19 07:10:46.918 debugtimeWindowStart = Sat Jan 19 17:39:00 EST 2019 Sat Jan 19 17:39:00 EST 2019

app:7152019-01-19 07:10:46.906 debugtimeOk = false

app:7152019-01-19 07:10:46.882 debugtimeWindowStop = Sat Jan 19 07:18:00 EST 2019 Sat Jan 19 07:18:00 EST 2019

app:7152019-01-19 07:10:46.869 debugtimeWindowStart = Sat Jan 19 17:39:00 EST 2019 Sat Jan 19 17:39:00 EST 2019

app:7152019-01-19 06:50:46.788 debugreschedule 10 + 10 minutes

app:7152019-01-19 06:50:46.788 debugturned on [Aeon LED Bulb]

app:7152019-01-19 06:50:46.765 debugturned on Bed Front Dimmer

app:7152019-01-19 06:50:46.752 debuginactive switches: 9 numlight: 1

app:7152019-01-19 06:50:46.749 debugturned off Master Bath Light

app:7152019-01-19 06:50:46.730 debugRunning

app:7152019-01-19 06:50:46.708 debugtimeOk = true

1 Like

Hi.. Is this the latest version? Does it only fire when all users are out of the geofence?
Do i need to set anything or,does it just turn on random devices at random times between sunset and a specific time?

When you install there are settings you apply in the HE console

  • what lights to use
  • when to turn on/off
  • what it is using to decide to run or not (could be presence, or a mode setting, etc).

So install, and apply setting you wish after installing.

1 Like

Howdy, I just found this on Hubitat Package Manager and installed it for away and vacation coverage. It Looks great!

I noticed there’s an option for how long lights are to remain on, is this a Max on time and the actual duration is randomised within that range?

Btw, it’d be great if the end time could be a randomised definable off range eg

11:30pm = off time
Off Range = 1 hour (make user definable)

So then VLD would randomly switch off between 11:00pm and 12 midnight

This would make the simulated bed Time more realistic.

I use it and it works for my needs. I see you have Package Manager installed. Bryan (@bptworld) wrote a nice simulator you might be interested in. -Joel

1 Like

Hi @nh.schottfam is there any chance you can add a seperate group of switches that can turn on & off switches (in my case virtual ones) to turn a (or more) speakers on & off. Could also turn your TV on & off.
Adding this would better simulate being home, although there would need to be 2 seperate times setup as naturally lights don't need to go on during daytime, & the speakers or TV would.

You can run a separate instance for this if needed:

see:

I haven't worked it out, so I've just done it with RM. I have 4 different rules, over alternating days, AM & PM was pretty easy to do

There is an updated version out today.

It further optimizes operations on HE, and has instructions if you want to install multiple versions.

It also can turn logging off after 2 hrs.

It is available in HPM. Vacation Lighting Director.

1 Like

Thanks for this app, saved me hours of headaches....
A couple of questions, can I change it to leave the lights on between the selected times? I don't want them to cycle.
can I get a notification when it runs?

thanks again.

So you want it to leave a light on when VLD is off?

VLD can log, but it does not have push notifications...it seems this is more debugging that normal operating state?

No, I want the lights to stay on between the times I selected, for example Sunset to midnight.
If I am out of the house, I would like to receive a notification like Rule Machine does when the rule is triggered. is that too complicated to add?

thanks,

Sam

I think it is easiest for you to create a virtual switch, and have VLD turn it on for the duration of the run (it does this now) and it turns it off when done.

This will give you start and stop of VLD.

If you are using VLD from HPM it has the feature

Download the Hubitat app