Get Sensor Energy Data by Floor

The API returns energy consumption in watt-hour for all fixtures on the floor. For example, if there are ten fixtures on the floor, the API provides details for each fixture.

Request

GET https://{em_ip_address_or_hostname}/ems/api/org/sensor/v2/sensorEnergyStats/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 Floor ID returned in the Get All Floors API, 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: Sensor Identifier.
name: Floor name.
baseenergy: Displays the base energy of the fixture. Base energy is when the fixture’s light level is always maintained at full-on without making any changes to the light level.
energy: Energy consumed by the fixture on the floor.
savedEnergy: Energy saved by the fixture on the floor.
occSavings: Energy savings for the fixture on the floor determined by occupancy nearby the fixture.
ambientSavings: Ambient savings for the fixture on the floor based on the ambient light level measured by the fixture.
tuneupSavings: Shows savings due to profiles set up for fixtures.
manualSavings: Manual savings for the fixture on the floor based on when the fixture was controlled manually.
dimLevel: Shows the dim level output of the fixtures (0-100%).
0% - Light level is set to off.
100% - Light level is set to full-on.

Sample Code

Using the Floor ID '1' returned by the Get All Floors API, request energy consumption for all fixtures on the floor from 4:30 am through 5:30 am on Feb. 12, 2019. The sample response includes energy consumption in watt-hour for two fixtures on the floor.

GET https://192.80.3.2/ems/api/org/sensor/v2/sensorEnergyStats/15min/floor
/1/20190312043500 /20190314043500

{
  "sensorEnergyStatss": {
    "sensorEnergyStats": {
      "intervalStart":   "2019-02-12T04:35:00+05:30",
      "sensor": [
        {
          "id":     "4",
          "name":   "Sensor00c05f",
          "baseEnergy":   "21.6",
          "energy":       "0.00",
          "savedEnergy":  "21.60",
          "occSavings":   "16.20",
          "ambientSavings":"0.00",
          "tuneupSavings":"5.40",
          "manualSavings":"0.00",
          "dimLevel":     "0.0"
        },
       {
          "id":     "5",
          "name":   "Sensor00caa9",
          "baseEnergy":   "21.6",
          "energy":       "12.57",
          "savedEnergy":  "9.03",
          "occSavings":   "0.00",
          "ambientSavings":"0.00",
          "tuneupSavings":"9.03",
          "manualSavings":"0.00",
          "dimLevel":     "60.0"
        },
        …
      ]
    }
  }
}

 

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: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"
}
}

 

Get Aggregate Sensor Energy Data by Floor

 This API is supported for Manage 4.4 release and above.

This API returns the total energy consumption in watt-hour for all fixtures on the floor. The energy consumption data can be retrieved for up to forty-five (45) days. The energy data returned is pre-aggregated in fifteen (15) minute intervals (96 records per day) to make it easier for you to adhere to most measurement and verification (M&V) reporting standards.

Request

GET https://{em_ip_address_or_hostname}/ems/api/org/facility/v2/facilityEnergyStatsOfFloor/15min/floor/{floorID}/{from_date}/{to_date}?page={page}

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. 
page The requested page number. Each page displays 96 records corresponding to 24 hours of energy consumption data. For example, when a user requests 30 days of energy consumption data, the 15th page will have the energy consumption details for the 15th day of the requested period.
Response 
id  Floor Identifier.
name  Floor name.
intervalStart  Time from when data is retrieved (YYYY-MM-DDTHHLMM:SS{+/-GMT})
baseEnergy  Displays the baseline energy consumption in watt-hour of the fixtures. The difference between 'baseEnergy' and 'energy' is 'savedEnergy'. Base energy is the amount of energy the fixtures will consume if their dimLevel was 100% for the entire period; 'energy' will never be greater than 'baseEnergy'.
energy  The energy consumed by all fixtures in watt-hour on the floor for the period.
savedEnergy 

The energy saved by the fixtures in watt-hour on the floor for the period.

savedEnergy = baseEnergy - energy
savedEnergy = occSavings + ambientSavings + manual Savings

occSavings  Fixture energy savings from baseline when lights are switched off due to vacancy.
ambientSavings  Fixture energy savings from baseline when lights are dimmed due to available ambient daylight.
manualSavings  Fixture energy savings from baseline when lights are 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 from 5:30am on Feb. 12, 2019 to 5:30am on Feb. 19, 2019. The sample response shows details returned for fixtures on the floor for the specified time period for page 2 (Feb. 13, 5:30am to Feb. 14, 5:30am).

GET https://192.80.3.2/ems/api/org/facility/v2/facilityEnergyStatsoffloor/15min/floor/1/20190212053000/20190219053000?page=2
{
"facilityEnergyStats": [
{
      "id": "1",
     "intervalStart":"2019-02-13T05:30: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":"2019-02-13T05:45: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":"2019-02-13T06: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":"2019-02-13T06:15: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":"2019-02-13T06:30: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"
},
{
...
}
]
}

 

 

 

Get Gateway Details by Floor

The API returns details for all gateways on the floor. For example, if there are four gateways on the floor, the API provides details for each gateway.

Request

GET https://{em_ip_address_or_hostname}/ems/api/org/floor/v1/{floorID}/gateways

 

Parameters

Request 
em_ip_address or hostname: The Manage IP address or hostname.
floorID: 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.
Response
id: Gateway Identifier.
name: Gateway name.
xaxis: Scaled reference of the distance measured in the horizontal dimension from the lower-left corner of the uploaded floor plan.
yaxis: Scaled reference of the distance measured in the vertical dimension from the lower-left corner of the uploaded floor plan.
lastComm: Time of last sensor communication (YYYY-MM-DD 24HH-MM:SS.sssZ).
commStatus: Communication status of the gateway - 'okay' or 'out.'

 

Sample Code

Using the Floor ID '1' returned by the Get All Floors API, request gateway details for all gateways on the floor.

GET https://192.80.3.2/ems/api/org/floor/v1/1/gateways

{
"gateway": [
{
   "id": "2",
   "name": "GWf9c730",
   "xaxis": "3285",
   "xaxis": "3848",
   "lastComm": "2020-10-19T05:33:04.852Z",
   "commStatus": "okay"
     },
{
   "id": "3",
   "name": "GWf9efa7",
  "xaxis": "2952",
  "xaxis": "4449",
  "lastComm": "2020-10-19T04:32:02.202Z",
   "commStatus": "okay"
     },

{
  "id": "4",
  "name": "GWf9c726",
"xaxis": "2351",
"xaxis": "3715",
"lastComm": "2020-10-19T05:33:04.854Z",
  "commStatus": "okay"
    },
{
"id": "5",
"name": "GWf9c737",
"xaxis": "2902",
"xaxis": "2397",
"lastComm": "2020-10-19T04:44:04.853Z",
"commStatus": "out"
   }
]
}