Get Sensor Details by Floor

Returns sensor details for all sensors on the floor for a given period at every five-minute interval. For example, if the duration is from 10:00 am to 10:10 am, data is sent at every five-minute interval. The API retrieves data for a maximum period of one hour. 

The Fixture 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/sensor/v2/stats/floor/{floorId}/{from_date}/{to_date}

Parameters

Request 
em_ip_address or hostname Enlighted Manage (EM) IP address or hostname
floor_id Floor identifier. Use the Floor ID returned in the Get All Floors API, or in Manage, select Facility > Floor > in the left panel, and click the Settings tab to obtain the Floor ID.
from_date

Start date to display energy consumption data  
Format: (yyyyMMddHHmm) year/month/day/hour/minutes

to_date End date to stop displaying energy consumption data
Format: (yyyyMMDDHHmm) year/month/day/hour/minutes
Response 
Id** Fixture identifier (**used as the primary identifier in other API calls)
power The average load of the fixture in watts during the last five-minute interval
temperature Temperature in Fahrenheit
lightLevel Ambient light level reading at the sensor (lux)
avgDimLevel Average fixture dim level represents light level where there is sufficient light for the occupants. If the sensor is not connected to any lighting fixture, the API call returns a value of -1.
lastCommunicationtime
Time of last sensor communication (YYYY-MM-DD 24HH-MM)
captureTime Five-minute time duration represented as (yyyy-MM-dd HH:mm) year-month-day-hour-minutes

Sample Code

Request sensor details for all sensors on the first floor with Floor ID ‘1’ from 10 am through 11:30 am on Feb. 12, 2019. Data will be sent at every five-minute interval, which will be 10:05 am and 10:10 am, and so on. The Fixture ID returned for each sensor is used as the primary identifier in other API calls.

Get https://192.80.3.2/ems/api/org/sensor/v2/stats/floor/1/201902120100/201902120200

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/xml
Content-Length: 7582
Date: Sat, 21 Jul 2015 17:06:51 GMT
{
 "sensor": [
    {
      "id": "28", **Fixture ID**
"power": "27.98",
"temperature": "78",
"lightLevel": "773",
"avgDimLevel": "85",
"lastCommunicationTime": "2019-02-12 10:12",
"captureTime": "2019-02-12 10:05"
},
{
"id": "29", **Fixture ID**
"power": "12.62",
"temperature": "74",
"lightLevel": "593",
"avgDimLevel": "85",
"lastCommunicationTime": "2019-02-12 10:12",

"captureTime": "2019-02-12 10:10"
},
]
"sensor": [
{
"id": "1327",
"power": "27.98",
"temperature": "74",
"lightLevel": "99",
"avgDimLevel": "85",
"lastCommunicationTime": "2019-02-12 10:12",

"captureTime": "2019-02-12 10:15"

},
{
"id": "1377",
"power": "12.62",
"temperature": "70",
"lightLevel": "462",
"avgDimLevel": "75",
"lastCommunicationTime": "2019-02-12 10:12",
"captureTime": "2019-02-12 10:20"

}
]
}
 

 

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

Comments

Article is closed for comments.