The API returns the virtual switch details and scene information. A virtual switch is added to the floor plan in the Enlighted Manage (EM) when a Switch Group is created. A virtual switch controls the light levels of selected fixtures. 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
GET https://{em_ip_address_or_hostname}/ems/api/org/switch/v1/getSwitchScenes/{floor_id}/{switch_name}
Parameters
Request | ||
em_ip_address or hostname | The EM’s IP address or hostname. | |
floor_id | Floor identifier. Returned in Get All Floors API, or in EM, select Facility > Floor > in the left panel, and click the Settings tab to obtain the floor_id. | |
switch_name | Switch name. Returned in Get Switch Groups API, or in EM, select Facility > Floor in the left panel, click Floor Plan tab, and hover the cursor over the switch icon to see the switch name. | |
Response | ||
id | Switch Identifier to which the scene belongs. | |
name | Switch name. | |
scenes |
List of scenes. A maximum of six scenes can be created for a switch. For each scene, the following parameters are displayed.
|
Sample Code
Using the switch name (SwitchGrp2) returned in the Get Switch Groups and Floor ID returned in Get All Floors, request the Manage to provide the virtual switch and scene details. For example, if the switch, SwitchGrp2, is configured for two scenes All on, All off, the following virtual switch details are returned as shown below. The scene identifiers (for example, 157, 158) returned for the scenes are used as the primary identifiers in other API calls.
Get https://192.80.3.2/ems/api/org/switch/v1/getSwitchScenes/1/SwitchGrp2 |
Comments
Article is closed for comments.