Simple lighting app

Should look something like this is your Location settings

and you should see the correct local time just above the "Update Time from Browser Time" button when you click it in the Settings.

If all these are correct and there still isn't the right time showing in your rule, reboot the hub. If still not correct, you should contact support@hubitat.com and @bobbyD will get it sorted out for you.

I believe the 2:05am jobs are run every day to schedule your Sunrise and Sunset event triggers. Since sunrise and sunset change daily, the new trigger times have to be calculated every day.

@bravenel can probably clarify the best.

Yes, this is correct. However, I am in the process of getting rid of these 2:05 am scheduling tasks, and replacing them with "the correct way" of doing it. The hub throws location events for sunrise, sunset, sunriseTime and sunsetTime. Things to be scheduled at or after sunrise or sunset are very straight-forward, and just use those location events. Things to be scheduled before sunrise or sunset are trickier, and use the sunriseTime and sunsetTime events, plus some math, to schedule such events.

This change is already in place in Rule Machine, and Mode Manager. Coming to Simple Lighting soon.

2 Likes

Makes sense now. The SS / SR events are actually working on time. I’ve only been up and running a few days but they are now verified to work. I was just confused by the 2:05 event showing up.

Thanks

That's one reason it's going away. Plus, it probably didn't work on the day you first installed it, at least not for sunset -- since it hadn't run at 2:05 am that day.

This has been changed in the new release: Hub Update 1.1.3

Now, instead of scheduling a job to schedule things at 2:05 AM each day, it uses the location events to trigger the correct timing for sunrise/sunset events, and offsets before or after sunrise/sunset.

Probably not an issue for new users, but for existing, I noted a pre-RM 2.5 rule still shows that 2:05am schedule time. Will this go away tomorrow at 2:05am or is it an artifact that simply going to remain for older rules?

This is not a RM 2.5 rule, just to be clear for others reading this post.

Old rules have the old scheduling code. New rules have the new scheduling code. Funny how that works.

It's one of the reasons we did the 2.5 shift upgrade, to not blow out of the water existing rules.

2 Likes

So we can remove old simple lighting rules and create new and they will use the new coding?

No need to remove old. All you have to do is open it and hit Done. Then you can see the scheduled jobs and subscriptions on the app detail page.

All of my sunrise based rules failed to run this morning after the upgrade last night. The upgrade didn’t automatically “fix” existing sunrise/set rules but old scheduler code didn’t work either, though that might have been intentional. In case anyone else has simple Lighting rules based on sunrise/set, solution is this:

I think you may have to open them and click done to get it to update and then they should work

Yes done that and all good. I was calling out the fact that this upgrade breaks existing simple lighting rules based on sunrise/set and action (steps you mention) is required after the upgrade. This wasn't called out in the release notes nor automatically fixed during the upgrade. I wanted to make sure that folks reading this thread with similar experiences are aware they are required to "fix" their existing rules.

2 Likes

Oh sorry, I must not have scrolled enough on my phone before I replied. Missed that you were pointing out the solution. :blush:

1 Like

This is entirely unintentional. I will update the release notes to reflect this issue.

3 Likes

I have this really simple lighting rule where a door contact sensor to a closet turns a light on or off. All running fine and dandy, but the other day my GF was running back and forth ending up forgetting to close the door, and the light stayed on resulting in a never ending low-WAF tirade about "home automation this-and-that".

So I thought I'd fix it by simply add a timeout after given amount of time. The way I interpret the option "After this number of minutes" is: "after you close the door, delay turning off the light by X minutes", is that correct?

If so, this is perfect for a hallway light controlled by an entrance door, but not suitable for my scenario: "if the door is left open, wait X minutes, then turn the light of regardless if the contact sensor is open".

Am I using the wrong app/approach?

I suggest you use a rule in Rule Machine instead:

Conditions: Closet Door Sensor open
Rule: Closet Door Sensor open
Actions for true: Set Closet Lights to 99, turn Closet Lights off after X minutes
Actions for false: turn off Closet Lights

This will turn them on when the door is open, and turn them off when the door is closed. It will also turn them off if the door is left open after X minutes.

3 Likes

RM: something about the logic that seems a tad backwards to me - perfect time to get my feet wet. Your explanations kind of makes sense :wink:

thinking out loud the static rule "Closet door sensor open" always kicks off timer when, in fact, the door sensor is open. If false (closed) turn the light off. Ya, makes sense. Thanks! :slight_smile:

I like it. Never thought of doing this. I had a Simple Lighting and an RM rule to achieve the same.
I just keep on learning. :smile:

@mario.fuchs, @bobbles - I just took a stab at this.
Does this rule look right to you all?

My goal is to follow @bravenel's suggestion and have my closet light turn on when the door open, and off when closed. if left open, I want the light to turn off after 6 mins.

Curious if you had success with this or not.

Thank you!