Change Color API

Changes the color temperature of the fixtures to a specified setting for the specified duration.

Request

POST https: //{em_ip_address_or_hostname}/ems/api/org/sensor/tunable-white/change-color/value/target colorvalue/time  

 <fixtures>
  <fixture>
   <id>63</id>
  </fixture>
  <fixture>
    <id>145</id>
  </fixture>
</fixtures> 

Parameters

Request
em_ip_address or hostname The Manage IP address or hostname
targetcolorvalue Color Temperature value indicating the requested color temperature in Kelvin degrees.
The valid range depends on the Fixture Manufacturer Table (FMT)  supplied by the manufacturer for the fixture.
time Duration in minutes
Response
Status If the request is successfully handled “Change color success” message is displayed. When sensor details are missing or inaccurate in the Post command, “Sensors list is empty while requesting API” message is displayed.

Sample Code 

Change the color temperature value to 3200 for 60 minutes for fixtures with ID ‘63’ and ‘145’. The response ‘Change color success’ indicates that the color change is applied to the Tunable White fixtures successfully. Note that the response is a group response for all fixtures. The response is reported as a success if the message is successfully sent to the sensors.

POST https://10.8.1.90/ems/api/org/sensor/tunable-white/change-color/value/3200/60

<fixtures>
  <fixture>
   <id>63</id>
  </fixture>
  <fixture>
    <id>145</id>
  </fixture>
</fixtures> 

Response Success:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <response>
              <status>0</status>
              <msg>change color success</msg>
   </response>

Scene Control API

When a switch group is created in Manage, a virtual switch is added to the floor which controls the light and color intensity of the selected fixtures. Each set of light and color intensity settings for fixtures is called a scene.

Using this API, set the light and color intensity of the scene for the fixtures in the switch group to achieve the desired effect. Use the Scene ID and Switch ID returned by the Get Scene Light Levels for a Switch API call to set the light levels for each scene.  

Request

POST https://{em_ip_address_or_hostname}/ems/api/org/switch/op/dim/switch/switchid/scene/sceneid/percentage/time

Parameters

Request
em_ip_address or hostname The Manage IP address or hostname
switchid Switch Identifier. The Switch ID returned in the Get Scene Light Levels for a Switch API
sceneid Scene Identifier. The Scene ID returned in the Get Scene Light Levels for a Switch API
percentage

Percentage of light level

0% - Light levels set to off

100% - Light levels set to full-on.

101 - Auto: Sets the light level based on the lighting profile behavior

102 – Sets the scene light level configured for the fixtures when a switch is created on the floor plan in Manage.

time Duration in minutes
Response
Status 0 - Success, 1 - Failure

Sample Code 

Using the Scene ID and Switch ID returned by the Get Scene Light Levels for a Switch API, set the color intensity for the Scene with ID ‘157’  belonging to the switch with ID ‘1’ to 100% Full on for 10 mins. The response ‘0’ indicates that the scene is applied to the switch successfully.

POST https://10.8.1.90/ems/api/org/switch/op/dim/switch/1/scene/157/100/10
 {
  "status": "0"
}