Sunset Does Not Turn on Device With Basic Rule

I've created the basic rule below to turn a Zwave plug on at sunset for 60 minutes, wait 60 and then turn on again for 40. I'm running C-7 2.3.5.125, this rule works fine if I set a specific start time, it just does not work with Sunset as a trigger.
I'm still not very fluent with troubleshooting Hubitat but looking thru various logs and events I can find no hint of errors or attempted execution/trigger happening at sunset.

I've seen other posts say to look at the App Status page and I see 'No event subscriptions are set.' here for this basic rule.

image

After reading some more posts here I read that events triggered pre/post sunset/sunrise seem to work a bit different than those that act at sunset/sunrise. I changed my rule to trigger 5 minutes after sunset and looked at the app status page and did not see a scheduled event as I suspected I would. I then set the rule back to trigger on Sunset and see this subscription event.


I also see a scheduled job for 5 minutes after sunset. Obviously something odd going on here as this is what I would have expected to see when I set the trigger to run 5 minutes after sunset. Here is the current rule with the event subscription set as above.

I next changed the event to trigger at a specific time and look at the app status and see no event subscription and a scheduled event for the expected time. I then reset the trigger on the app to be at sunset and go to the app status page and it is back to the 5 minutes after sunset settings.


There seems to be a bug in the system since the last update... I am having a issue with a legacy sunset rule as well... Maybe it is just a one day glitch, I will report back tomorrow.

@support_team I just noticed this issue after the .131 update. My old original simple automation rule to turn on my landscape lights at 5 minutes after sunset did not fire and is not showing as scheduled for tomorrow either. As this is a original simple automation rule I have a second rule that turns my landscape lights off at 11:30pm and is working and scheduled as always.. So after rebooting etc.. I created a new Simple automation 1.2 rule and left the time offset blank and had no turn off time set. Bam, This did not show as a scheduled event either... After some playing I discovered that any blank or positive time offset will break this rule; however if I enter a negative time as the sunset offset all works as expected. Hope my explanation was clear enough..

1 Like

@support_team : please check the bug I mention in my last sentence….

Please use Basic Rule instead.

@support_team still heard nothing on this issue

I have done so, I just wanted to report my findings.

Wow, still not heard from anyone on this issue

Yes, strange indeed, I was expecting a fix or at least a bug mention in the latest update...

Just a thought. Not sure if it will work.

Setup a time variable that you update every day with the time of sunset. Call it ShellySunset. There’s a time/date app that will allow you to do that with a rule.

Then set up four separate simple rules instead of using a wait / delay tied to sunset.

Turn on device at sunset normally. (Only one tied to normal sunset time selection.
Turn off device at shellysunset+ 60 minutes
Turn on device at shellysunset + 120 minutes
Turn off device at shellysunset + 160 minutes

Shouldn’t have to do this but might work. Hope it helps.

Maybe I'm missing it - was the cause of (and fix for) this issue determined?

I have a few Basic Rules (1.0) running on C8 (2.3.5.152) with 'sunset' used as a trigger event. These rules have been running fine for a few months (I'm a new Hubitat user) and all have triggered fine until tonight.

During investigation, I found that sunset/sunrise event rules were showing no scheduled jobs. Same was true when I converted one to a Simple Automation.

Then I found that if I use 'before sunset/sunrise', each rule showed a scheduled job. With no offset or + (after) offset, then no scheduled jobs were shown.
These symptoms sound similar to this thread, hence I'm piggy-backing on to it.

Thanks in advance!

And I bet if you switch the before/after rule back to on sunset the before/after scheduled job was still there. I never got any response from Hubitat here as you can see. I did post on Facebook that no one responded here and over a weekend someone said they would followup on Monday.

I never heard from Hubitat again, I will say mine works now and I did nothing to resolve it. I wonder if someone from Hubitat remotely connected and did something. They obviously have some kind of a bug here.

You win that bet. :moneybag: (got your MM tik for tonight?)
I switched from sunset-1min to sunset+1min and the scheduled job remained (for -1min).
I'll check if there's a job scheduled for tomorrow after this one fires tonight.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.