At SDC19, we previewed our new Rules Grammar and API that allows you to create simple and complex automations that can operate on the SmartThings cloud. In a future release of the API, local execution of rules on SmartThings hubs will be supported - making rules a great choice for those looking to create fast, stable and secure automations. We are excited to announce a few resources available for everyone to start testing:
We know you have will feedback and requests - we are working hard to add more features to the API (such as variables and expressions). Feel free to drop your ideas, questions, and comments here!
I clicked on the link using both Chrome and Safari and it came to the page to authorize my Samsung account and it does nothing. Is it not working? OK got in using the top link.
Does each âRuleâ count as an âAppâ? If the limit is 100 then how does this limit affect those people like me that have close to 300 devices? Say I only had 1 rule per device, then I would be screwed after the first 100 rules.
Rules are treated independently of installed apps, before the update the rules were available through the ST API as behaviors, but now you can browse, create and update them at the Rules API.
UPDATE
These are the Rate Limits for the Rules API to prevent runaway installs through the API. However, weâre evaluating the option of increasing such limit.
@iquix, if itâs installed/created following the Rules API Gramar, it will do. but as an external SmartApp, it should accomplish the SmartApp lifecycle syntax and then being created at the INSTALL lifecycle through the SmartThigs API.
Itâs just a neat way of delivering a live, working proof of concept that people can play with and also peek under the covers to see how itâs built.
The actual Rules API runs on the SmartThings platform. You can interface with the Rules API directly via the REST API. The âExample Rules Managerâ isnât intended as a production, end-user facing tool - more of a proof of concept for developers to poke around with and better understand how things work.
Glitch is a neat choice for the âExample Rules Managerâ as it has some nice features like being able to run Node.js server-side code and maintain secrets like are necessary for the OAuth portion. It also makes it really easy for people to fork and play with the underlying code.
@Automated_House Do you mean that at the moment of posting the JSON rule to the Rules API you donât receive a copy of the JSON rule with the id attached?
Behaviors are still working, so, at the moment you create a new rule, it will reflect at your behaviors list, it also works with the opposite process.
@erickv is a GET using the Rules Manager Testing App supposed to return all rules created via the Rules API, or only rules created with that specific testing app? Iâm trying to remove one I created with the POC webCoRE from SDC.
Whatâs the purpose of âExecute a ruleâ? After you have created a rule, isnât the rule already taking effect? Or do you have to have it executed before it will take effect? If yes, how do you suspend a rule after it is taking effect? If no, can you give an example of when âExecute a ruleâ is used?