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.
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.
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
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.
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.
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