Skip to main content

Scenes Usage Guide (Phone Apps)

about

In the context of IoT in general and ESP RainMaker in particular, a "scene" refers to a group of parameters set to specific values, where one or more devices may span across multiple nodes.

Note that the scene is a static entity, and some operation is required to activate a scene, be it via phone apps, voice assistants, or a predefined schedule.

In line with the rest of the ESP RainMaker features, scenes are implemented completely on the node side in the form of a "service". The cloud backend just acts as a gateway between the node and the clients, like phone apps.

  • To know more about this feature, please click here.
  • On the usage of scenes on firmware, click here.
  • On what to note for Scenes with voice assistant integrations, click here.

Usage Guide

Scenes Across Nodes

  • As described above, scene information is maintained by nodes, instead of the cloud backend. However, it is a common requirement to have multiple nodes as part of a single scene.
  • For such scenes, the client uses the same scene ID across multiple nodes.
  • During querying, it looks for common scene IDs across all the nodes and shows them together.

A sample payload for creating a scene across multiple nodes is as shown below:

POST on {{base_url}}/v1/user/nodes/params with payload:

JSON Payload (Click to view)
[{
"node_id": "<nodeid_1>",
"payload": {
"Scenes": {
"Scenes": [{
"name": "Night1",
"operation": "add",
"id": "1112",
"action": {
"Light": {
"Power": true,
"Hue": 280
}
}
}]
}
}
}, {
"node_id": "<nodeid_2>",
"payload": {
"Scenes": {
"Scenes": [{
"name": "Night1",
"operation": "add",
"id": "1112",
"action": {
"Switch": {
"Power": true
}
}
}]
}
}
}]

On this page