Issue with Rule Using Sunrise/Sunset

All you should have to do to restart it is open it and hit Done. Then check the scheduled jobs.

Is this not the big that was supposed to be resolved recently where http calls weren’t timing out and were killing the scheduler? I notice the next run time in the last screenshot is blank but the status is Pending. That’s what I experienced with my Smart Lighting not working on some rules that turned out to be a custom app making http calls, bogging down the system and killing the scheduler.

Done.

Now it says it's scheduled to run tomorrow night.

Time will tell...

Thanks.

Interesting. It says that it ran last night as Prev Run Time. Will investigate what the heck PENDING means...

Most of my rules didn't run last night either. Woke up with all the lights still on. This was after upgrading to the latest version of.

Can't tell from what's been posted. Not sure that has anything to do with this issue. As far as I know @kelpayne's issue is related to sunrise/sunset offsets in Rule Machine.

I was just trying to point a similarity to the issue I had with scheduling in that the schedule showed it was pending an action but the Next Run Time was blank. It would blank 2 minutes after missing execution of a schedule.

Bruce - Is this still an ongoing issue? I have a simple RM v2.5 Rule that is scheduled to run at 'Sunset - 70minutes'...
image
When I look at the info page for it, there is nothing showing as scheduled.

After opening the Rule and clicking DONE, the scheduled event appears

I had some other RM Rules that used Offsets with Sunset/Sunrise that I was able to move to Simple Lighting, but this one has to deal with some Color Bulbs, which the Simple Lighting App does not handle currently.

Is a fix still in the works for RM Sunset/Sunrise with Offsets? It looks like .118 was supposed to fix this... I am running the most current firmware (.119) as of yesterday, but I am not sure whether or not this Rule fired last night because my wife had already turned these lights on via Alexa or a Pico. Based on the Device Events shown below, I don't think the Rule fired last night as it should have shown an ON Event at ~7:05pm.

Thanks,
Dan

There were/are two separate issues. The first one, now fixed, is that offsets just weren't working at all. The second issue, fixed in the next release due out, is that a before-sunset or before-sunrise offset won't work on the first day, but will work on subsequent days.

2 Likes

I figured yesterdays update fixed the rules with offset not running, so after updating to .119 I deleted my rule, and recreated it. The rule is used to close my blinds 30 min after sunset. They didn't run last night, and don't look like they are going to run tonight because there is nothing in the scheduler. I figured maybe it would take a day for RM to lookup sunset, and figure the job run time, but today is a new day and still no scheduled job showing up. I went back into it and clicked done again, but still nothing in the scheduled jobs section.

Probably will need live logging to get a record of this; the Device Events page won't record an event that is not a state change, though live logging will (strange but true; you can verify this by comparing the 'Events' page record vs. live logging of an on/off event from the UI. If the device is already on, 'Events' won't record the redundant turn on command. Noted this back in March; apparently it is intended behavior).

You are looking the wrong place!

The trigger is subscribed to the sunset event from the hub. It doesn't use a schedule until sunset, then it will set to run in 30 minutes. So check the app details after sunset but before 30 minutes after sunset, and you should see a scheduled job. I'd really like to know if that fails for some reason.

1 Like

Thanks for your reply and explanation. I will check back after sunset. I believe this is where I should see something after sunset, but before 30 minutes correct?

image

Correct.

This screenshot was taken at 8:55PM , so doesn't look like its scheduled to run.

image

I just found the bug! Argh... Next release, coming soon.

In the meantime you can work around this by using a rule instead of a trigger. Use time of day, with the first time being what will cause Actions for True, while the second time causes Actions for False.

2 Likes

Good job on finding the bug!! For now I will just get rid of the offset and have them close at sunset.

Thanks!

This bug is fixed in latest release, all sunrise and sunset offsets should work correctly: Hub Update 1.1.2

4 Likes

I can confirm, 40 min offset from sunset is working again! Thanks for your work on this. Actually this was a great update. This offset issue being fixed, TTS voice global settings, and the surprise Ecobee integration. I have two ecobee 3's in my home so this update was very appreciated! I have a Brazilian live in nanny for my kids, so the surprise Brazilian Portuguese TTS was a lot of fun to play with tonight! I wish I could change the global voice setting to the Brazilian Portuguese voice when my wife and my Life 360 presence are both showing as not home, then switching to English when we are home, but that is for another day! Great progress on the platform.

2 Likes

Urgh!!! Same here... the sun is shining outside (for the first time in months!), but all my lamps outside are burning happily... (I'm running hub ver 2.0.9.133)

image

It is 18:54, the sun is setting at 21:20. The first and last conditions cannot both be true...

EDIT: I noticed that my time was between sunset -20 minutes (21:20 - 20 = 21:00) and 21:00. So I thought maybe that's the problem, it's the same time. I then played with the offstes. >20min gives a false. <20min gives a positive (which isn't correct).

EDIT 2: I have deleted the rule. Everything, including the conditions. Reset the Hub. When I add condition "sunset - 20 min" it shows as TRUE. Sunset is not for two hours...

EDIT 3: I've figured it out. Hubitat doesn't like it when I add a condition "between (sunset - x min) and TIME" where TIME is actually before (sunset - x min). I know it sounds ridiculous, making rules like that, but seeing that the sun sets here at 16:00 during the winter and 22:00 in summertime, it would be nice to set these rules at once, so that it's not necessary to change rules with the seasons... (which is what I'm going to try next - add a condition that it must be between dates where its summer/winter :smiley:)

I still love my Hubitat!

image

LAST EDIT: (I'm sorry if I talk too much, this is for future reference for people with the same problem) I have solved it by adding the Illuminance variable.