Your new rule is calling a handler at midnight. If you look closer I would bet the job is actually scheduled for 12:00:10am. This job is supposed to schedule your sunset jobs for tomorrow. My problem was similar except it involved the beforeSunriseHandler. The beforeSunriseHandler was scheduling my sunrise job for the prior day so they never executed.
After midnight look at your scheduled jobs and see what they show. The midnight job should be gone and replaced with another job for the exact time of sunset-45 minutes. See if the date and time of that job is correct.
OK. I'll be up for a while so I will check both on apps and see what they show after midnight passes.
1 Like
Start with typing the @ symbol, and it will autosuggest names as you type. Type the username I gave above. If I want to tag you I type @jcanavera
If you want any of the rest of the Hubitat team, use the hamburger menu in the upper right corner of this forum, select About, and you should see the whole list of staff.
I just noticed you said you moved just moved your location. If the jobs are not correct you have to move your location after midnight - before sunrise otherwise it will just schedule the jobs at midnight again. I have been fighting this for the last few days too.
OK. I'll try that if the times aren't correct.
1 Like
I did that last night after midnight and it finally scheduled my job correctly and ran right today. Based on what I have seen, you are not going to see a job scheduled for sunset but you will see a job for the sunset-45.
I would also bet that if you went into your system events, right now you are probably not going to see an entry for when sunset occurred. Sunrise events and sunset events are logged in system events. At least they are on my hub.
Ok. I just checked the pending job in the app with Sunset -45. There is a job pending, but there is nothing in the time field. That pretty much shows why the lights on app isn't working. We have a job but it's missing an execution time. It has the do action handler.
The job for sunset has no scheduled job or pending time.
I'm going to try the location change and then access the Sunset -45 job after doing a done on it.
I just changed the location. Went back to the app for schedule -45 and did a done on it. Checked and the do action handler job now has a time of 7:22 pm on it. Hope this helps track the bug. The app for the turn on at Sunset has no jobs scheduled.
This is exactly what I see too. I don't think jobs for trigger times at exactly sunrise or sunset get scheduled. Also, any job that has a + (example: sunset+15) will get scheduled when sunset occurs. Based on what I have seen over the last 4 days, I think both jobs will run. Because you have a time for your job of sunset-45, the system now knows what time sunset is. Let me know if it works.
UPDATE:. I had a test rule that generated a push message this morning at sunrise-4, sunrise & sunrise+4. After midnight I only had a job for sunrise-4 listed but they all executed correctly.
1 Like
@oldcomputerwiz Lights at Sunset -45 came on tonight. It scheduled a job for tomorrow with a time to turn them on. It had this job scheduled for Friday night prior to midnight Thursday, unlike last night. As you said the system now knows when sunset -45 is. It did this with a do action command rather than how it handled things last night after midnight.
Apparently the issue of sunset/sunrise times with + or - adjustments is a bigger issue. I made some changes with the mode setting app and I'm finding that it is failing to adjust modes properly. Right now my mode setting for day is sunrise + 60 minutes for day. At this point the mode is showing night. I changed the modes for day and evening now to actual sunrise and sunset settings with no time adjustments. We will see if that works. I have night now set to 10 pm.
If your sunrise is messed up, you have to move your location between midnight and sunrise. That was the only way I could get sunrise fixed. You can have a working Sunset but a messed up sunrise, I did.
It's also possible that you have a different problem too but I do remember you moved your location prior to midnight.
@oldcomputerwiz Yep I did move it prior to midnight and upon saving the app it set a job within the app at 12:00:10. Once I got past midnight and I checked the app again a new job was scheduled for the proper sunset -45 time.
I also opened a trouble ticket on the problem just to make sure this was on their radar.
What about sunrise? I thought you are having sunrise issues. Did I misunderstand your post?
@oldcomputerwiz Yes. My post was confirming that I had been dealing previously with sunset issues. Now I'm having problems with setting modes using sunrise + - calculations. I opened a trouble ticket on the system having issues when trying to set time parameters using sunrise/sunset + - times.
For fun, try moving your location a few feet after midnight tonight. I'm betting that not only was your beforeSunsetHandler messed up but so is your beforeSunriseHandler. The only way I could fix the beforeSunriseHandler issue was to move my location a few feet between midnight and sunrise. Just something you could try while waiting for support to get back to you. Good luck. These sunrise/sunset issues are a pain because it's try something and wait.
You could check your system events and see if you have a sunrise event. You should see events for both sunrise and sunset. Here is what my sunrise event looks like.
I've events tied to Sunrise. I had planned to do some sunrise + time for changing the mode to daylight. But I changed my mind. Events set for sunrise work just fine. At this time however I just don't see the value in screwing around with + and - minutes tied to sunrise for me. All of my + - minute adjustments tied to sunset are working just fine.
I pass on more once I talk to tech support on the trouble ticket I opened.
1 Like
I'm having the same issues