Vacations Lighting Director - No longer triggers

I’m not sure if Eric Schott is still around, but my vacation lighting director apps won’t trigger by themselves anymore. The only way they will activate is if I manually open the app and then cleanly exit the app during the defined active period.

Does anyone have the skills to fix this app? I’ve had a look and can’t find anything obvious.

I know there is another app out there with similar functionality, however last time I tried it, I found it was overly complicated for what I wanted.

Do you see any scheduled jobs?

I do now, but tbh I forgot to check that before I made some changes this morning. I made them single mode dependent to see if they didn’t like having 2 modes selected.

I’ll see if those jobs actually run tonight.

I managed to generate a couple of errors trying to use sunset and sunrise, but that could be me trying to do something illogical...

I’m using Sunset too, and it just wasn’t turning on. It’s a really simple UI, so I can’t see how we could screw it up.

Btw, the version I’m running was installed via HPM.

Down around line 515 try changing it so that it looks like:

private timeWindowStart(usehhmm=false) {
	def result = null
	if (startTimeType == "sunrise") {
		result = location.sunrise//.currentState("sunriseTime")?.dateValue
		if (result && startTimeOffset) {
			result = new Date(result.time + Math.round(startTimeOffset * 60000))
		}
	}
	else if (startTimeType == "sunset") {
		result = location.sunset//.currentState("sunsetTime")?.dateValue
		if (result && startTimeOffset) {
			result = new Date(result.time + Math.round(startTimeOffset * 60000))
		}

I’m removing the .currentState… for sunset and sunrise

1 Like

Cheers, I'll give that a try.

Hmmm, are you using the version on HPM?

https://raw.githubusercontent.com/lgkahn/hubitat/master/vacatlighting.groovy

Mine doesnt have anything resembling that around 515.

PS, I just noticed this version is hosted by @kahn-hubitat :man_facepalming:

I pulled the other one. Let me look at that one.

1 Like

Sorry about that, I didn't check the import field, just the notes in the code. :man_facepalming:

i am using my version in two places and both turned on fine tonight... what are your settings.

1 Like

Howdy, I have had 2 modes selected until today, other than that, I did have a day version that finished at the same time the night one started.

I thought that might be an issue, so I’ve set the day routine to end 5 mins early.

Tbh, I think having 2 modes selected is more likely the issue.

PS, I do have 3 instances of the app, installed.

probabaly the multiple versions are not an issue. but 2 modes with one going off and the other on if trigger at the same time definately could casuse a race condition where the one turns on and the other turns off right after. actually both should turn it on.. so that shouldnt be an issue.. never tested mine with more than one mode selected however.

1 Like

To test, I’ve changed them to only run in vacation mode and the day one to finish 5 mins before the night apps are due to run.

Not even the day app was running which has nothing before it, so I suspect it was the dual modes being selected.

if thats the case i can test when i get back home to the main hub in jan.. dont really want to start mucking with it when i am away... weird this is one of the first things i ported to hubitat from smartthings when i jumped ship.. it has been unchanged for that long.

1 Like

All good good mate, I’m on vacation too and I can just start them manually if I need too.

1 Like

Ok, it looks like the issue was selecting more than one mode. My lights all seem to be behaving tonight.

1 Like

Ah crap, I spoke too soon. My day automation worked, but today the night automations didn’t. The jobs are there tho.

@kahn-hubitat is there any chance that the two night apps are clashing with each other if the start time is the same?

I dont see how. Each app is totaly independent. .maybe need sime debugging to see why it is
not starting up. But if the event is there and your hub is missong events i would look elsewhere why this is occuring. If the event is still there past the time that is a hub issue as even if it fires and errors out it should disapoear.

So there are 2 possibilities

1 it fires and errors out... app issue
2. It never fires ... hub issue

Strange. I’m on a C8 (pre-matter firmware) and the schedules do appear. I’ve added a 15 minute delay to upstairs starting.