Vacation Lighting. Anyone have it running?

As per the title, has anyone got Vacation Lighting to work on HE.
I never had much success with it on ST so I wrote a piston to do the job.
I copied the Vacation Lighting code onto HE (not the piston) and it does not work for me.
Just wondering if anyone out there has it, or something similar, running on HE.
Thanks.

2 Likes

I like to see this as well. Anybody have a solution?

1 Like

None of these vacation lighting apps I've tried have been satisfactory. The idea that you would randomly turn lights on and off throughout your home on a daily bases is a bit silly anyway. I found that it only took me a few minutes to create on/off schedules based on our real daily habits. I haven't done it for Hubitat, but I had Stringify flows I used to use with Wink and ST.

The best system I ever saw was BeOn Home, where the system tracked your actual lighting habits and then could play them back when you're not home.

1 Like

My upstairs lights etc are automated anyway, home or not
My dogs do the rest!

Motion sensors for downstairs room lights that either we, or the dogs set off!

Andy

4 Likes

If you're using Lutron Caseta this feature is native in the Caseta App (I'm on IOS). I'd just set it up natively rather then in HE to be honest.

Not using Lutron.

Give this a try, I have not tested the presence stuff or days of the week, I just check for modes.

Used Vacation Lighting om ST. Worked well.
Hubitat port did not work with Mode Away and Sunset/Sunsrise. Wrong time - Stopping Vacation Lights in the log. Figured out it does work with a Start Time set to AM. Sunset would be PM of course so that makes sense.
Can't figure it out. Any thoughts will be appreciated.

1 Like

I have sunrise/sunset working in the code i posted above.

def sunriseAndSunset = getSunriseAndSunset()

if (!sunriseAndSunset.sunrise || !sunriseAndSunset.sunset) {
ifDebug("Please set location for the hub for rules to be processed.", "error")
return false
}

1 Like

Removed the code I had and re-installed from the link. Same issue.
Here'e the log starting at Sunset and starting 1 min after midnight.

2018-12-27 02:52:16.963 am debugreschedule 5 + 3 minutes

app:5582018-12-27 02:52:16.959 am debugturned on Hall Front Light

app:5582018-12-27 02:52:16.932 am debuginactive switches: 9 numlight: 1

app:5582018-12-27 02:52:16.913 am debugRunning

app:5582018-12-27 02:52:16.868 am debugtimeWindowStop = Thu Dec 27 07:16:00 EST 2018 adjusted: Thu Dec 27 07:14:00 EST 2018

app:5582018-12-27 02:50:16.806 am debugInstalled with settings: [frequency_minutes:5, 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:time, starting:2018-12-27T00:01:00.000-0500, endTimeType:sunrise, people:[A, D]]

app:5582018-12-27 02:42:31.691 am debugwrong time - Stopping Vacation Lights

app:5582018-12-27 02:42:31.686 am debugtimeWindowStop = Thu Dec 27 07:16:00 EST 2018 adjusted: Thu Dec 27 07:14:00 EST 2018

app:5582018-12-27 02:42:31.656 am debugtimeWindowStop = Thu Dec 27 07:16:00 EST 2018 adjusted: Thu Dec 27 07:14:00 EST 2018

app:5582018-12-27 02:42:31.651 am debugtimeWindowStop = Thu Dec 27 07:16:00 EST 2018 adjusted: Thu Dec 27 07:14:00 EST 2018

app:5582018-12-27 02:40:31.601 am debugInstalled with settings: [frequency_minutes:5, 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, endTimeType:sunrise, people:[A, D]]

I was trying to figure out why timeOk would be false with the start time set to PM (or to Sunset).
2018-12-26 03:31:43.537 pm debugtimeOk from line 512 = false

Same issue here, I'm still trying to figure out the reason..

EDIT: I think problem was ending time set to 11:55 instead of 23:55 (I'm using 24H configuration), I'll check this evening if it's fine.

Changed to the 24H configuration.
Same issue. No need to wait. Just edit and save and the code will run.

But how to check if it's working if start time is sunset (actually here in Italy it's around 2PM)?

That shouldn't matter. The issue is not (at least so I think) using sunset but rather having a PM start time.
You can enter a start time of 11:59 PM and then 00:01 AM, both ending at sunrise, and you will see the issue. Been looking at variables but no luck so far.

I am using a copy of the code I have posted on github.
I have it start at sunset and end at 10:30 PM
and run when in vacation mode.

It all works, I think I might see it generate wrong time sometimes - when it is outside of the running window

Seems to be working fine here with a similar configuration (start sunset and ending 23~55), I've tried with multiple AM/PM start and end dates.

The only thing noticed is that if you set sunrise or sunset as ending (but it's not my case),
they are shown in log as already past, maybe that`s the issue?

IE today is December 27, If I set sunrise as ending time it's shown December 27, 8:00 AM, instead (considering that it's already elapsed) should be December 28, 8:00 AM.

Set it up to run Sunset/Sunrise. Will let you know how that works out.

Sunset earlier today:
2018-12-27 17:38:00.329 debugwrong time - Stopping Vacation Lights

app:5602018-12-27 17:38:00.324 debugtimeWindowStop = Thu Dec 27 07:16:00 EST 2018 adjusted: Thu Dec 27 07:14:00 EST 2018

app:5602018-12-27 17:38:00.303 debugtimeWindowStop = Thu Dec 27 07:16:00 EST 2018 adjusted: Thu Dec 27 07:14:00 EST 2018

app:5602018-12-27 17:38:00.293 debugtimeWindowStop = Thu Dec 27 07:16:00 EST 2018 adjusted: Thu Dec 27 07:14:00 EST 2018

app:5602018-12-27 17:36:00.219 debugmodeChangeHandler com.hubitat.hub.domain.Event@2dc6271a

app:5602018-12-27 17:36:00.156 debugmodeChangeHandler com.hubitat.hub.domain.Event@40e1a6be

app:5602018-12-27 17:36:00.045 debugstartTimeCheck

app:5602018-12-27 14:51:24.441 debugwrong time - Stopping Vacation Lights

app:5602018-12-27 14:51:24.435 debugtimeWindowStop = Thu Dec 27 07:16:00 EST 2018 adjusted: Thu Dec 27 07:14:00 EST 2018

app:5602018-12-27 14:51:24.420 debugtimeWindowStop = Thu Dec 27 07:16:00 EST 2018 adjusted: Thu Dec 27 07:14:00 EST 2018

app:5602018-12-27 14:51:24.417 debugtimeWindowStop = Thu Dec 27 07:16:00 EST 2018 adjusted: Thu Dec 27 07:14:00 EST 2018

app:5602018-12-27 14:49:24.373 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, endTimeType:sunrise, people:[A, D]]

Noticed this here also:

I wonder if hubitat updates the sunset and sunrise variables different then ST did.
Sorry I don't know what to change to make it work across midnight.
Wondering if you can fake it by running 2 copies, a) sunset to 11:59pm, 12:01 to Sunrise

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