Automation Triggers
about
Automation Triggers allow users to configure conditional logic between IoT devices, such that when certain events occur on one device (e.g. motion detected, brightness drops), a set of actions are automatically triggered on one or more devices. This enables users to create smart automation routines tailored to their needs — e.g., "If motion is detected, turn on the hallway lights."
Use Case
- Provides a hands-free smart environment for users.
- Enables custom automations without writing code or scripting.
- Reduces energy consumption by activating devices based on contextual triggers.
- Encourages integration between multiple Rainmaker devices for seamless automation.
Affected Entities / Entities Involved
Entity | Description |
---|---|
End User | The person who creates and manages automation triggers. |
Node | An IoT device in the RainMaker ecosystem that generates events or receives actions. |
Event | A condition based on a parameter of a single node (e.g., Brightness > 70 ). |
Action | A command or payload sent to one or more nodes when an event condition is satisfied. |
Automation Trigger | A configuration that links one or more events to one or more actions. |
Usage Guide
API Usage (Client to Cloud Communication)
Base Route: /v1/user/node_automation
(Replace v1
with the applicable version)
Operation | Method | Endpoint | Description | Swagger Doc |
---|---|---|---|---|
Create Automation Trigger | POST | /user/node_automation | Create a new trigger | View |
Update Automation Trigger | PUT | /user/node_automation | Modify existing trigger | View |
Fetch Automation Trigger | GET | /user/node_automation | Retrieve trigger list | View |
Delete Automation Trigger | DELETE | /user/node_automation | Remove an existing trigger | View |
Example: Create Automation Trigger
POST /v1/user/node_automation
JSON Payload (Click to view)
{
"name": "automation_name",
"node_id": "node_id",
"event_type": "node_params",
"metadata": "metadata",
"events": [
{
"params": {
"Light": {
"Brightness": 100
}
},
"check": "=="
}
],
"event_operator": "and",
"actions": [
{
"node_id": "node_id",
"params": {
"Light": {
"Output": true
}
}
}
],
"retrigger": false
}
Assumptions
- The user has already onboarded Rainmaker devices (nodes).
- Events are only evaluated when the node reports a change in parameters.