The Get Area Occupancy for a Floor returns the current occupancy status of all areas on a floor. The occupancy status is provided only when the area sensors are enabled as zone sensors to report occupancy data.
You will need the IoT sensor license and additional Real-time Area Occupancy (API-RTO-AREA) license to get occupancy for a floor or area. Read Request License to purchase licenses as needed.
Request
GET https://{em_ip_address_or_hostname}/ems/api/org/facility/v1/getOccupancyStateOfFloorAreas/
{floor_id}
Parameters
Request |
|
em_ip_address or hostname | Manage’s 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. |
Response | |
Id | Area identifier |
name | Area name as described in Manage |
description | Area description as described in Manage. The field will be empty if there is no description entered in Manage. |
zonesensorenable |
The area has been activated as a zone sensor area. The area starts reporting consolidated occupancy status. Note that the zone sensor license must be purchased and available for the sensors to report occupancy information. Otherwise, occupancy data is not reported by the sensors. true – Sensors in the area are enabled as zone sensors. |
occupancyState |
0 – Area unoccupied |
Note: For this API, you will always get an additional area. Its ID field will ALWAYS be "0". Its name will always be "Unassigned". The value of occupancyState will be "1" if ANY sensor on that floor is NOT in an area, but its current state is "occupied". If all such sensors are "vacant", then this value will be "0".
Sample Code
Send a request to return the occupancy state for all areas on Floor 1. For example, Floor 1 in the Main building has two areas: Hardware and Software. The details of the areas and their corresponding Area IDs and occupancy state for all areas on Floor 1 are returned.
Get https://{192.80.3.2}/ems/api/org/facility/v1/getOccupancyStateOfFloorAreas/1 |
Recommended articles:
Comments
Article is closed for comments.