SharpTools Rule Engine

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.

Request access to the Rule Engine at: SharpTools App

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.

And check it out.

2 Likes

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. :slight_smile:

  1. Set timer as trigger to open my kitchen blinds daily.

  2. Use device(motion sensor) as trigger, and execute action based on the time of the day using time condition check

  3. When the rule is triggered, delay the activity flow, and execute different series of actions depends on if someone’s at home

2 Likes

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.

Any other feedback? Leave a comment or send your request to support@sharptools.io, so we can build it. :slight_smile:

1 Like

We just rolled out several new features including Mode, Routine and SHM support in the Rule Engine. See the announcement for details.

Let us know what your thoughts are. :slight_smile:

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.

1 Like

Adrian - if you haven’t already seen it, the following video has a good overview of the SharpTools Rule Engine:

I originally put it together in response to some questions on Facebook, but it has some good info in it, so I put it on YouTube for others to see. :slight_smile:

2 Likes

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!

2 Likes

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.

I would probably set it up something like:

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).

ok. what am i missing?

I basically when daddy AND mommy is “not present”.

Maybe it should be placed as an if condition but dont i need a trigger? still learning the RE.
Thanks

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.

Updated. Thank you.

Why do we even need the trigger section. The IF section should act as a trigger because it contradicts the Trigger section.

Just confusing to me.

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'
1 Like

makes sense! thanks.

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!

It’s high on the hitlist along with simplifying the rule creation process (there are too many dropdowns currently)!

Glad your thinking about it.

I am still high on being able to choose multiple items in a dropdown… :slight_smile: It is a large reason I havent moved more over. I have the attention span of a gnat… lol

Product is looking awesome!

Tried coping your lock/garage one above. image
says error creating timing schedule.
How do you get yours to say 9pm every night when mine says 2200 and repeat daily.

Really feel like the newb!!

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. :slight_smile:

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).