- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Entrance numbers at Meraki API for Analytics
Hi,
I'm pulling some data from Meraki API from cameras located in my office. I'm interested in aggregating the data from Analytics endpoints and displaying them in similar way to this dashboard:
I'm pulling the data from this endpoint:
https://developer.cisco.com/meraki/api-v1/get-device-camera-analytics-zone-history/
I try to aggregate "entrances" field value from objects that are contained in response but it does not seems to match with the data I got in my Meraki Analytics dashboard.
Example (part of response for one zone of one camera because whole response is too big):
In this case I have queried the endpoint for 6 hours of data with resolution of 60 seconds (default) for "person" object type. I have noticed that beside entrance numbers being totally mismatched with the data I see on my dashboard (1st screenshot), the resolution is not maintained since I got results second by second with 60 seconds windows overlapping. Also it seems like entrance value increments with every second and at some point it was reset to 0 (visible on 2nd screenshot).
Am I missing something here? How exactly resolution works and averageCount is calculated? Do I properly interpret entrances value?
Best regards,
Mateusz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mateusz!
The History API call should return the counts aggregated per minute for the zone ID for Corridor that you would have had defined in the call.
This averageCount should map to the occupancy of the zone over that time period (raw detections of objects per frame over the 60 second interval) and entrances should map to only crossings in to the defined zone for that time period also.
For "Zones", the Analytics tab references that "a person is counted when crossing a defined line or remaining in a zone", the combining of which may be why you see the discrepancy between the two formats.
However, we are in the process of deprecating the "Zones" functionality and transitioning to "Areas", which has additional functionality for line crossings counted as "In" and "Out" dependent on direction of travel over the threshold, as well as specific area occupancy and crossing parameters such as entered, exited, appeared, and expired.
Whilst the API does have support for historical data and even live data polling with a short delay, we could suggest using MQTT messages for the purpose of data aggregation. As it is streamed continuously to the broker, it removes the possibility of any timestamp overlap in sequential API requests.
Please let me know if you have any additional questions on this!