跳到主要内容

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

EntityDescription
End UserThe person who creates and manages automation triggers.
NodeAn IoT device in the RainMaker ecosystem that generates events or receives actions.
EventA condition based on a parameter of a single node (e.g., Brightness > 70).
ActionA command or payload sent to one or more nodes when an event condition is satisfied.
Automation TriggerA 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)

OperationMethodEndpointDescriptionSwagger Doc
Create Automation TriggerPOST/user/node_automationCreate a new triggerView
Update Automation TriggerPUT/user/node_automationModify existing triggerView
Fetch Automation TriggerGET/user/node_automationRetrieve trigger listView
Delete Automation TriggerDELETE/user/node_automationRemove an existing triggerView

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.

On this page