The sensors capture and stream occupancy data to Manage. The Get Area Occupancy API returns the current occupancy status of the area. The occupancy status is provided only when the sensors are enabled as zone sensors to report occupancy data. Refer to the article Enable Zonal Sensors.
For the sensors to start reporting occupancy data to Manage, you will need licenses based on the number of sensors and areas configured in the system. You will need the IoT sensor license and Real-time Area Occupancy API license (API-RTO-AREA) to get occupancy for an area.
After you have purchased and uploaded the API License file in Manage, enable the sensors in the area as zone sensors before using the API to report area occupancy status.
|em_ip_address or hostname||Manage’s IP address or hostname|
|area_id||Area Identifier. Use the Get all Areas API, or in Manage, select Facility > Floor > Area in the left panel, and click the Settings tab to get the Area ID.|
|occupancyState||0 – Area unoccupied
1 – Area occupied
-1 – Sensors are not reporting occupancy
-2 – Zone sensor license is not available. Sensors monitoring the occupancy status of the zone are disabled.
-3 – Unknown area
Let's assume that the floor has two areas: The Hardware area with ID ‘9’ and the Software area with ID ‘27’. To find out the area occupancy in the Hardware area, specify Area ID ‘9’ in the API command. The API call returned the occupancy state '0' for the Hardware area. The occupancy state '0' represents the area is unoccupied.