AllThingsTalk Platform comes with a powerful, integrated rules engine. A rules engine lets you automate work by defining actions that need to be taken in response to a set of triggers. For example, you could make it turn the lights on when you open the door, dispense cat food at predefined times, or notify you if your package is handled improperly in transport.
To define rules, no code writing experience is needed. AllThingsTalk Rules Designer is a drag and drop environment that you can use to define logic of any complexity.
Since we will be using the same set of devices in examples, let’s spend a moment to get familiar with the ground devices.
With that out of the way, let’s turn the attention to the ground menu. Near the bottom, you will find RULES
. Click on it to access the Rules screen that contains all the rules created in the ground.
Like Devices, Pinboards, Gateways & Members, Rules are contained within a ground. This lets you use naturally separate rules belonging to different project, but also share and collaborate with other members. Read more about grounds
You will be greeted with a familiar resource creation screen. Go ahead and click on ‘NEW RULE’.
Pictured above is the AllThingsTalk Rule Designer, the drag and drop environment for creating rules. On the left, you will see the list of your devices and rule components, both of them representing pieces of functionality you can patch together to create complex behavior.
Rule components are split by their type into triggers and actions. Some of them, like devices can work as both. Triggers and actions can be recognized by icons on the right that also match the icons in TRIGGERS
and ACTIONS
drop areas.
Furthermore, once you start dragging a component, drop areas compatible with the component will light up.
All of rule creation comes down to connecting triggers to actions.