Apply Scene

Applies a scene to a group of fixtures controlled by the switch. Each set of light level settings for fixtures is called a scene. For example, in a conference room, typical scenes would include using a projector when the lights should be off (all off) or during a meeting when the lights should be on (all on).

Request

POST https://{em_ip_address_or_hostname}/ems/api/org/switch/v1/op/applyScene/{switch_id}/{scene_id} 

Parameters

Request 
em_ip_address or hostname The Enlighted Manage (EM) IP address or host name
switch_id Switch identifier (returned in Get Switch Scenes API)
scene_id Scene identifier (returned in Get Switch Scenes API)

Response 

id Scene identifier
status

0 – Success; Other than ‘0’: Failure

Failure codes:

1 – Switch not available
2 – Switch group not available
3 – Fixtures and plugloads not available in the switch group
4 – List of associated fixtures and plugloads in the switch group     
      empty
-1 – Failure condition

Sample Code

Apply the scene 'All off' with the Scene ID ‘158’  to the Switch which has ID '7'. You can use the Get Switch Scenes API to get the Scene ID and Switch ID. The response ‘0’ indicates that the 'All off' scene was applied to the switch successfully.

POST https://192.80.3.2/ems/api/org/switch/v1/op/applyScene/1/158

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json
Content-Length: 7582
Date: Sat, 21 Jul 2015 17:06:51 GMT
{
  "status": "0"
}
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Article is closed for comments.