Announcing the SharpTools Rule Engine! Automate your smart home and get your devices talking to each other.
Rule Engine is a powerful and intuitive automation tool to create activity flows to control your devices based on IF-THEN logic, device triggers, and timer triggers. It enables capabilities that where once relegated to the realm of programmers.
We are currently rolling out the Rule Engine as a private beta and are processing requests on a first-come first-served basis.
Note: As part of the rollout of the Rule Engine, we made a few tweaks to our authentication system so you may need to login again. If you currently have a dashboard page open, your existing authentication token should continue to work as expected, but if you do a full page refresh you will need to login again.
Here are some tips how you can use Rule Engine to automate your devices:
Triggers
Timer: trigger the rule based on the time of the day, and user can choose if this should be repeated daily
Device: trigger the rule by your device event, such as motion sensor-active, garage door-open, and etc.
Flow
IF_Condition: build smart flow using condition check. Conditions can be based on your specific deviceâs status(attribute value) or time, when the rule is triggered. And you can change the condition logic to continue when âallâ or âanyâ of the conditions are met.
Action: control your device by setting the device, command and arguments, such as âLiving room Light - onâ.
Delay: you can pause the flow execution by adding a delay activity. For example, you may want to delay the light sensor condition check for a few seconds after its status is changed, to get more accurate reading.
And here are some examples how for your reference. Hope you guys enjoy it.
Set timer as trigger to open my kitchen blinds daily.
All,
Just rolled out an update to Rule Engine per the user feedback received. Now itâs easier to trigger a rule based on a deviceâs status change, no matter what value it changed to. See below for the example that I set the rule to be triggered if the Garage Door is == or != âopenâ, and then adjust my AC and lights depending on my presence. So this is rule can be triggered anytime when garage doorâs status is changed.
I never got into webCoRE, I was overwhelmed with the interface, since Iâm not a programmer & I just now figured out how to setup Sharptools dash, which was easy!
So is this like a webCoRE/ifft alternative right? The screenshots look simple, so with help from you all here, I think Iâll mess around with this some.
Also, what are the benifits of using something like this vs just setting up automations using the native iOS Smartthings app?
@Adrian_C, glad you found SharpTools easy to use and liked it. And, yes Rule Engine is the automation tool like those you named, and we want it to be powerful, extensible but intuitive.
One of the differences for SharpTools.io is the multi-platform support, such as SmartThings, Pushbullet, Hubitat (coming very soon), and more to come, so you can control/automate devices/services from different platforms at one place that you cannot do in each native app.
Since getting my ST hub a few months ago, I been trying to work solely within the ST app & never used webCoRE/ifft, but Iâve run into several situations that made me have to create diff automations between SHM, Smart lighting, & main automaton settings just to create 1 thing! too complicated because there simply isnât an option to include all the variables in 1 Spot.
So this video is very helpful for me to be able to jump right in & create anything I want in one swoop, rather than jumping into 3 diff automation setting menus inside of ST app. Thx for this!
Nice start, âif - thenâ is easy, but could you also add an âelseâ? For example I want either of two motions to start a task, but how do I end if both are inactive?
@Dan_Fox You can specify actions in both THEN and ELSE paths. See the example below for your scenario. I added two motion senors as triggers, so either one will kick off the rule.
Then I use an IF_Condition to check the 1st motion sensorâs status, and take different actions. As you can see, I can also add a nested IF_Condition in the case of both them are in active status. Let me know if you need any help.
Triggers:
motion1 == active
motion1 != active
motion2 == active
motion2 != active
IF motion1 == active OR motion2 == active
THEN doMyCoolThing()
ELSE turnTheLightsOff()
So basically have triggers for anytime either of the the motion sensors change state (either to active or to not active).
Then the IF condition in the flow could be to make sure either sensor is active before doing your main action in the THEN. And if neither of the sensors were active, then both of them must be inactive, right? In that case, you could run your âendâ action there.
(Another approach would be to use multiple IF conditions in a row with different conditions if thatâs more intuitive to you or better meets your needs)
â
One thing to keep in mind is that all triggers are effectively ORâed together since they are always events.
IF conditions are used to check the state of one or more things. So even if something wasnât part of the event that triggered the rule, the rule will figure out what current state the item(s) are in so it can evaluate the IF condition.
By default, IF conditions are ANDâed together (eg. when ALL of the conditions are met), but you can change the IF condition to OR (eg. when ANY of the conditions are met).
It looks like the flow in your screenshot will run resumeProgram on the thermostat and change the mode to Away when either of you leave.
Think of triggers as events which kick off the evaluation of the âFlowâ in the rule. They are effectively ORâed together as only one event can happen at a moment in time.
So if you goal is to run resumeProgram on the thermostat and change the mode to Away when both of you are gone, youâll just need to add an IF condition that makes sure you are both away.
Triggers:
Daddy presence is 'not present'
Mommy presence is 'not present'
Flow:
IF
Mommy presence is 'not present'
AND Daddy presence is 'not present'
THEN
Thermostat to execute command 'resumeProgram'
Barrett to change Mode to 'Away'
PS. We have plans to change the language to make this a bit more apparent. (eg. âDaddy changes to not presentâ) And perhaps we should add a little -or- between each trigger so thatâs more obvious that as well.
There are cases where you want a different item to trigger the evaluation of the rule than you have in your conditions⌠or you donât want the condition to act as a trigger at all.
For example, every night at 9 PM, SharpTools.io checks to see if my front door is locked and my garage is closed. If not, it sends me an SMS. In that case, the trigger is time even though the condition is the security of the doors. If the condition was implied to be the trigger, then that rule would only run when the state of either of the doors change rather than at my specified time.
Trigger:
9 PM every night
Flow:
IF
Front door lock is 'unlocked'
THEN
Send SMS to Josh 'The front door is still unlocked'
IF
Garage Door is 'open'
THEN
Send SMS to Josh 'The garage door is still open'
Similarly, you might have a different device or location property (SHM / Mode) act as a trigger and a different item for the condition. For example, you might setup a rule where anytime the mode changes to âawayâ, the system checks if you are present in a condition and takes a different action based on that.
Trigger
Mode changes to Away'
Flow:
IF
Josh presence is 'present'
THEN
Delay 60 seconds
Set SHM to 'Armed'
ELSE
Set SHM to 'Armed'
I meant to ask or suggest⌠It would be nice if you could offer a way to share Rules. for example, I am going to steal This one.
Trigger:
9 PM every night
Flow:
IF
Front door lock is âunlockedâ
THEN
Send SMS to Josh âThe front door is still unlockedâ
IF
Garage Door is âopenâ
THEN
Send SMS to Josh âThe garage door is still openâ
It would be nice to be able to import it an replace the specifics to mine. You can do this in webcore. Just a thoughtâŚ
Thanks!
I am still high on being able to choose multiple items in a dropdown⌠It is a large reason I havent moved more over. I have the attention span of a gnat⌠lol
Tried coping your lock/garage one above.
says error creating timing schedule.
How do you get yours to say 9pm every night when mine says 2200 and repeat daily.
Hm. That is an unexpected result. Can you try opening up that rule again and resaving it? @James is looking into the server logs to see if anything seems out of the ordinary.
My apologies - I was just generalizing the rule structure. Youâre right that the proper text would be something like Trigger rule at 21:00 and repeat daily. The upcoming development release displays the time in your locale and will default to repeat âdailyâ now.
Hereâs what my actual rule in production looks like (I also have a Pushbullet message that goes out just below the SMS action which isnât pictured in the screenshot).