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 a scene is a static entity, and some operation is required to activate it, whether via phone apps, voice assistants, or a predefined schedule.

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

  • To learn more about this feature, please click here.
  • For information on using scenes in firmware, click here.
  • For details on 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, the client looks for common scene IDs across all nodes and displays them together.

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

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

JSON Payload (Toggle 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