Get Plugload Details
The API returns the plugload details.
Request
GET https:// {em_ip_address_or_hostname}/ems/api/org/plugload/v1/details/{plugload_id}
Parameters
Request | |
em_ip_address or hostname: | The Enlighted Manage (EM) IP address or hostname. |
plugload_id: | Plugload identifier. Use the Plugload ID returned in the Get All Plugloads by Floor, or in EM, select Facility > Floor in the left panel, Floor Plan tab, and double-click the plugload icon on the floor plan to obtain the Plugload ID. |
Response | |
id: | Plugload identifier. |
name: | Plugload name. For example, plugloadxxxxxx. |
xaxis: | Scaled measurement of distance in the horizontal dimension from the lower-left corner of the uploaded floor plan. |
yaxis: | Scaled measurement of distance in the vertical dimension from the lower-left corner of the uploaded floor plan. |
location: | Location of the plugload in the building. |
floorId: | Floor identifier. |
campusid: | Campus identifier. |
buildingid: | Building identifier. |
macaddress: |
Plugload MAC address. NOTE: The Manage system removes leading zeros when storing and returning MAC/SNAP addresses, resulting in truncation. For example, "00:c0:17" becomes "0:c0:17" in our system. |
version: | Plugload version number. |
voltage: | Plugload voltage. |
active: | true – Plugload working. false – Plugload not working. |
Ignore the remaining parameters displayed |
Sample Code
Using the Plugload ID ‘361’ returned by the Get All Plugloads by Floor API, request EM for plugload details. The response includes the plugload details for the plugload.
Get https://192.80.3.2/ems/api/org/plugload/v1/details/46 |
Get All Plugloads by Floor
The API returns plugload location for all plugloads on a floor. The data is returned as X, Y coordinates of the measured and scaled down distance from the lower-left corner of the uploaded floor plan.
The Plugload ID that is returned is used as the primary identifier in other API calls.
Request
GET https://{em_ip_address_or_hostname}/ems/api/org/plugload/v1/location/list/floor/{floor_id}/1
Parameters
Request | |
em_ip_address or hostname: | The Manage IP address or hostname. |
floor_id: | Floor identifier. Use the Floor ID returned in the Get All Floors API , or in EM, select Facility > Floor > in the left panel, and click the Settings tab to obtain the Floor ID. |
Response | |
ID** | Plugload identifier (**used as the primary identifier in other API calls). |
name: | Plugload name. For example, plugloadxxxxxx. |
xaxis: | Scaled measurement of distance in the horizontal dimension from the lower-left corner of the uploaded floor plan. |
yaxis: | Scaled measurement of distance in the vertical dimension from the lower-left corner of the uploaded floor plan. |
macaddress: |
Plugload MAC address. NOTE: The Manage system removes leading zeros when storing and returning MAC/SNAP addresses, resulting in truncation. For example, "00:c0:17" becomes "0:c0:17" in our system. |
groupid: | Profile group identifier. The ID of the profile associated with the plugload. |
Ignore the remaining parameters displayed |
Sample Code
Use the Floor ID '1' returned by the Get All Floors API to return the x- and y-axis of the scaled-down distance from the lower-left corner of the floor plan for all plugloads on Floor 1.
Get https://192.80.3.2/ems/api/org/plugload/v1/location/list/floor/1/1 |
Get All Plugloads by Area
The API returns plugload location for all plugloads in an area. The data is returned as X, Y coordinates of the measured and scaled-down distance from the lower-left corner of the uploaded floor plan.
Request
GET https://{em_ip_address_or_hostname}/ems/api/org/plugload/v1/location/list/area/{area_id}/1
Parameters
Request | |
em_ip_address or hostname: | The Manage IP address or hostname. |
area_id: | Area identifier. Use the Area ID returned in the Get all Areas API , or in EM, select Facility > Floor > Area in the left panel, and click the Settings tab to get the Area ID. |
Response | |
id: | Plugload identifier. |
name: | Plugload name. Default plugload name is in the format plugloadxxxxxx. |
xaxis: | Scaled measurement of distance in the horizontal dimension from the lower-left corner of the uploaded floor plan. |
yaxis: | Scaled measurement of distance in the vertical dimension from the lower-left corner of the uploaded floor plan. |
macaddress: |
Plugload MAC address. NOTE: The Manage system removes leading zeros when storing and returning MAC/SNAP addresses, resulting in truncation. For example, "00:c0:17" becomes "0:c0:17" in our system. |
groupid: | Profile group identifier. The ID of the profile associated with the plugload. |
Ignore the remaining parameters displayed |
Sample Code
For example, the Get all Areas API returned two areas: Hardware area with ID ‘9’ and Software area with ID ‘27’. Request the EM for the x- and y- coordinates of the scaled-down distance of the floor plan for all plugloads in the area with area ID ‘9’.
Get https://192.80.3.2/ems/api/org/plugload/v1/location/list/area/9/1 |
Get Plug Load Controller Energy Consumption
The API returns managed and unmanaged energy consumed in watt-hour for the last 15 minutes by the Plug Load Controller (PLC).
For example, if the request has been sent between 10:05:00 and 10:19:59 am, energy data is sent for the period from 9:45 to 10:00 am. Likewise, if the request is between 10:20:00 and 10:34:59, data is sent for the period from 10:00 to 10:15 am. The data is aggregated from the PLC at 5-minute intervals and is rounded to the nearest last 15-minute interval set.
Request
GET https://{em_ip_address_or_hostname}/ems/api/org/plugload/v1/energy/{plugload_id}
Parameters
Request | |
em_ip_address or hostname: | The Manage IP address or hostname. |
plugload_id: | Plug Load identifier. Use the PLC ID returned in the Get All Plug Loads by Floor API, or in Enlighted Manage, select Facility > Floor in the left panel, Floor Plan tab, and double-click the Plug Load icon on the floor plan to obtain the Plug Load ID. |
Response | |
managed energy: | Reports managed energy consumption in watt-hour by the PLC. |
unmanaged energy: | Reports unmanaged energy consumption in watt-hour by the PLC. |
Sample Code
Send a request to the EM using the Plug Load ID ‘361’ returned by the Get All Plug Loads by Floor API to return the energy consumed in watt-hour for the last 15 minutes by the PLC.
Get https://192.80.3.2/ems/api/org/plugload/v1/energy/46 |
Get Plugload Energy Consumption by Area
Returns the aggregate managed and unmanaged energy consumed in watt-hour by all plugloads in the area for the last 15 minutes.
For example, if the request has been sent between 10:05:00 and 10:19:59 am, energy data is sent for the period from 9:45 to 10:00 am. Likewise, if the request is between 10:20:00 and 10:34:59, data is sent for the period from 10:00 to 10:15 am. The data is aggregated from all plugloads at 5-minute intervals and is rounded to the nearest last 15-minute interval set.
Request
GET https://{em_ip_address_or_hostname}/ems/api/org/plugload/v1/energy/area/{area_id}
Parameters
Request | |
em_ip_address or hostname: | The Manage IP address or hostname |
area_id: | Area Identifier. Use the Area ID returned in the Get all Areas API, or in EM, select Facility > Floor > Area in the left panel, and click the Settings tab to get the Area ID. |
Response | |
managed energy: | Reports aggregate managed energy consumption in watt-hour by all the plugloads in the area |
unmanaged energy: | Reports aggregate unmanaged energy consumption in watt-hour by all the plugloads in the area |
Sample Code
Send a request to the EM using Area ID '9' returned by the Get all Areas API to return the energy consumed in watt-hour for the last 15 minutes by all plugloads in the area.
Get https://192.80.3.2/ems/api/org/plugload/v1/energy/area/9 |
Set Plugload Status
Sets the managed plugload status to ON or OFF.
Request
POST https://{em_ip_address_or_hostname}/ems/api/org/area/v1/setPlugloadStatus/{plugload_id}/{Status}
Parameters
Request | |
em_ip_address or hostname: | The Manage IP address or hostname. |
plugload_id: | Plugload identifier. Use the Plugload ID returned in the Get All Plugloads by Floor API, or in Manage, double-click the plugload icon in the floor plan to obtain the Plugload ID. |
status: | Set to ‘0’ to turn off or ‘1’ to turn on the plugload |
Response | |
status: |
0 – Plugload turned off 1 – Plugload turned on |
Sample Code
Using the Plugload ID '361' returned by Get All Plugloads by Floor, set the plugload to ON. The response is successful which means the plugload is turned on.
Post https://192.80.3.2/ems/api/org/area/v1/setPlugloadStatus/361/0 |