Get Aggregate Sensor Energy Data by Floor for last One Hour

This API returns the aggregate energy consumption in watt-hour for all fixtures on the floor. When the specified time range in the request exceeds an hour, the API publishes aggregate data response every 15 minutes only for the first one-hour regardless of the time interval specified in the request. The response is always limited to four messages for the one-hour period. For example, if you request energy data for a two-hour period for up to ten sensors on the floor, the API returns the aggregate energy data for all sensors on the floor for the first one-hour publishing four response messages at a 15-minute interval.

Request

GET https://{em_ip_address_or_hostname}/ems/api/org/facility/v2/facilityEnergyStats/15min/floor/
{floorID}/{from_date}/{to_date}

Parameters

Request 
em_ip_address or hostname: The Manage IP address or hostname.
floorID: Floor identifier. Use the Get All Floors API to obtain the floor_id, or in EM, select Facility > Floor in the left panel, and click the Settings tab.
from_date: Start date to display energy consumption data. 
Format: (yyyyMMddHHmmss). year/month/day/hour/minutes/seconds.
to_date: End date to stop displaying energy consumption data. 
Format: (yyyyMMDDHHmmss). year/month/day/hour/minutes/seconds. 
Response 
id: Floor Identifier.
name: Floor name.
intervalStart: Time from when data is retrieved.
baseenergy: Displays the base energy of the fixtures. Base energy is when the fixture’s light is always maintained at full-on without making any changes to the light.
energy: The aggregate energy consumed by the fixtures on the floor.
saveEnergy: The aggregate energy saved by the fixtures on the floor.
occSavings: Energy savings for the fixtures on the floor determined by occupancy nearby the fixture.
ambientSavings: Ambient savings for the fixtures on the floor based on the ambient light level measured by the fixture.
manualSavings: Manual savings for the fixtures on the floor based on when the fixtures were manually controlled.

Sample Code

Using the Floor ID '1' returned by the Get All Floors API, request the aggregate energy consumption for fixtures on the floor for two hours from 5:30 am through 7:30 am on Feb. 12, 2019. The sample response shows details returned for fixtures on the floor for the first one-hour of the specified time interval.

GET https://192.80.3.2/ems/api/org/facility/v2/facilityEnergyStats/15min
/floor/1/20190312043500/20190314043500
[
  "facilityEnergyStatss": {
    "facilityEnergyStats": {
      "id": "1",
      "intervalStart":"2015-10-28T16:00:00+05:30",
      "name":         "7th   Floor",
      "baseEnergy":   "38.85",
      "energy":       "16.00",
      "savedEnergy":  "22.85",
      "occSavings":   "16.20",
      "ambientSavings":"0.00",
      "tuneupSavings": "6.65",
      "manualSavings":"0.00"
}
{
"id": "1",
      "intervalStart":"2015-10-28T16:00:00+05:45",
      "name":         "7th   Floor",
      "baseEnergy":   "38.85",
      "energy":       "16.00",
      "savedEnergy":  "22.85",
      "occSavings":   "16.20",
      "ambientSavings":"0.00",
      "tuneupSavings": "6.65",
      "manualSavings":"0.00"
}
{
"id": "1",
      "intervalStart":"2015-10-28T16:00:00+06:00",
      "name":         "7th   Floor",
      "baseEnergy":   "38.85",
      "energy":       "16.00",
      "savedEnergy":  "22.85",
      "occSavings":   "16.20",
      "ambientSavings":"0.00",
      "tuneupSavings": "6.65",
      "manualSavings":"0.00"
}
{
"id": "1",
      "intervalStart":"2015-10-28T16:00:00+06:15",
      "name":         "7th   Floor",
      "baseEnergy":   "38.85",
      "energy":       "16.00",
      "savedEnergy":  "22.85",
      "occSavings":   "16.20",
      "ambientSavings":"0.00",
      "tuneupSavings": "6.65",
      "manualSavings":"0.00"
}
}
]

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Article is closed for comments.