Sunrise and Sunset in Rules

The first release of 2019 includes new Sunrise and Sunset triggers and conditions in the SharpTools.io Rule Engine as well as a number of other enhancements!

Sunrise and Sunset Triggers

The triggers section of a rule now includes two new time triggers, Sunset and Sunrise, which both provide the ability to specify an offset before or after the actual sunrise or sunset event.

Multiple Timer Triggers

This release also includes support for multiple time triggers in a single rule. This makes it easier than ever to create rules that run at multiple different times in a day. When paired with If Conditions, a single rule can handle a variety of scenarios throughout the day.

Sunset and Sunrise Conditions

Similarly, when selecting a Time condition which uses the before or after operator, you’ll have the option of selecting Sunrise or Sunset in the left-hand side of the time-picker:

Time UI Improvements and Other Changes

Time UI Enhancements

As part of this release, you may also notice that the interface for setting up Time based triggers or conditions in rules has been simplified, making it easier than ever to setup time based actions in your rules.

Geolocation Requirement

In order to make sunset/sunrise possible and enable the new streamlined UI, you’ll find that it is now required to set a geolocation on your desired location. This location simply needs to be in the rough geographic area as it’s used to calculate the sunrise and sunset times throughout the year and also used to determine your timezone. As such, it should be sufficient to approximate your location to your city or metropolitan area for most people.

If you don’t already have a geolocation set, you will be prompted to do so when setting up a time based rule. Alternatively, you can modify the geolocation by tapping the ... next to your desired location/hub in your user page.

Legacy Browser Improvements

This release (and the previous release) also include improved support for legacy browsers including Android 4.4 and Internet Explorer (11). We continue to recommend the use of a modern browser like Google Chrome, but reach out to support if something isn’t working as expected on an older browser.

5 Likes

Dude, this is super simple, but totes rad. I was taking my eyeballs out with my fingers trying to figure out how to draw out the sunrise time from Smartthings and update a variable I use to turn of lights.

I tried to learn coding, but I’m pretty sure that part of my brain is covered in the lead that was in those “window crisps” I enjoyed as a yoot. They trick you by naming it Groovy, which sounds to me like something that some a lot of the ‘Devil’s Lettuce’. I just gave up and started asking people to code for me in exchange for a high five. Still getting the word out for those golden opportunities!!!

2 Likes

We pushed an update to the Sunset and Sunrise triggers to correct a bug that would cause some rules which used “x minutes before [sunrise/sunset]” to trigger in a recurring fashion until the actual base sunrise/sunset time. Thanks for the reports!

Hey Josh,

I’m having the time SMS texted to me. Is the number that I recieve it from the last few days (XXX-XXX-X799) going to remain static, or should I avoid using it in the tasker variables?

It may change at some point in the future. That’s currently the main number that we use for SMS messages, but we may add additional numbers to the pool in the future.

@josh This is awesome! I might have already asked/requested this… sorry if redundant.
Do you think you will be adding the ability to fade a light on over a period of time with this new addition?

For example, I have a WebCore piston that flips the lights on 50 min prior to Sunset and fades them from 10%-100% over the next 90 minutes.

1 Like

@Tommy, yup, I am looking into this fade over time feature now. :wink:

2 Likes

Dude, fade feature. That won’t be necessarily tied to the sunset/sunrise functions, will it? I’d love to use fade up instead of an alarm to wake up, but I sure as heck have no intentions of waking up anywhere near sunrise! In fact, I’m now likely to be just going to bed at that point!!!

2 Likes

Lol, it won’t be tied with sunset/sunrise. It will just be an additional command option, likely to be called fade level, in device’s action block for the device supporting level adjustment. So you can still use whatever trigger, like device event, timer, sunset/sunrise, to trigger the rule.

Awesome, thanks James. BTW, that was supposed to say “rad feature”, not “fade feature”.

Unfortunately my phone and I really loathe each other, and despite having everything I know to have spell check functionality turned OFF, it insists on breaking Prime Directive Number 1: Computer never ever ever changes something I have typed. Stupid Computer can tell me if it thinks it’s spelled wrong, byt neer cange anything.

My previous phone, a Samsung Galaxy S7 Edge (dumbest screen investing ever), never would understand that, or any other of the rules I insist on for these things. I really hate that phone, but MAN could that thing take a beating. I’m serious, it didn’t go a day over the final 6 months I used it without doing something stupid to light off the ole’ ‘Ginger-Rage’ I’m afflicted with, which meant it got it’s screen bashed into my steering wheel repeatedly until I felt better, and then would get another chance to stop sucking. Yeah, the screen was thrashed, but that SOB remained completely functional, just enough to spite me. I had planned on destroying it once and for all with a hammer and a blowtorch kn., once I got a new phone, but honestly, I had developed a tremendous amount of respect for the thing, out of pure awe that it survived. So instead I wiped it and have it being used as one of my Alfred Cameras, which is pretty cool.

My totes bff says it’s love/hate with all computers, but I think me and the new phone (Galaxy S8 Active) both see it more as “tolerate to our own ends/hate” relationship. Nit having that useless edge screen has prevented the beatings on this phone … So far.

When the whole “oops, we made AI a single set of '1 & 0’s too smart” and the Terminator Judgment Day thing happens, I’ll be first in line, locked and loaded, ready to shoot the evil robots and computers, and phones, it’ll be like therapy!!! Just blasting every phone and CPU case I see!! Man… Gives me shivers!!!

@Tommy & @Pete_L We just rolled out the fade level (dim over duration) feature to Rule Engine this morning. Check out this post for more details and any feedback is appreciated. :slight_smile:

1 Like

@James
This is awesome. I am testing out my first run right now. Your slowly getting me off of webCoRE :slight_smile: will advise if I run into any issues.

A thought for future is having visibility (logs per engine) (I remember josh suggesting it’s in the roadmap) and when something will execute or has executed. It is really nice in webCoRE that I see when something will execute and logs for what triggered it or that it did/didn’t work.

Thanks for the awesome work!

2 Likes

@Tommy Thanks for the feedback, and glad you liked Rule Engine. Yes, logging is indeed in my todo list, and it can be great for checking rule execution history and rule troubleshoot as you mentioned. Your feedback definitely helps us prioritize the features though. I need to spend some time on the design, since the rule can be triggered by user action in Dashboard now, and maybe by another rule in the future, so the design needs to be extensible. :slight_smile:

1 Like

Btw. Working fantastic. I’ll move 2 more over from webCoRE this weekend most likely. Keep it up guys!

2 Likes

Did you consider adding Noon and Midnight? Especially, noon will be helpful in my case, I would like to shade few windows that are getting sun few minutes after noon.

1 Like

Hi @mhertis, do you suggest to have Noon and Midnight for better readability?
since Noon and Midnight is not relative time, you can do so with the existing Timer trigger. See below for the example of 15 minutes after noon (12:15PM), and change from PM to AM would be the midnight.


image

I was not clear enough; I had Solar Noon/Midnight in mind :wink:

1 Like

Thanks for the clarification, and I have taken the notes for this request. I think if we do Solar Noon/Midnight, we will have to show the options of Noon and Midnight as well so people won’t get confused. Let’s see if we can get some more interests/feedback here, thanks for suggesting. :wink:

1 Like

4 posts were split to a new topic: Sunset/Sunrise Offset in IF Condition