Please add info about zones.
Now:
When person go into any zone, then there is entity which has status saying Person detected.
Better version:
Add info in which Zone the Person was detected.
Why?
Different zones should trigger different effects, but right now it is impossible. 1 camera can have range to cover a few zones. Person in zone X should trigger alert, but in zone Y turn on light etc.
We have 3 type of zones / lines:
- smart zones
- motion zones
- crossing lines
The best to add this feature to all of them, but you can start from smart zones.
How it should be done in entities?
- For example camera.zone-id.person detected or not.
- But NOT camera.person.zone-id, because Person 1 can be in zone X and Person 2 in zone Y which will make conflict for value and we will lose information about other zones.
Side info:
Not a long time ago UniFi added new API. I didn’t try. I don’t know if it is useful.
It is in protect/settings/control-plane/integrations
in UniFi Protect.
The UniFi API was created to enable developers to monitor and manage UniFi deployments programmatically. It provides robust tools to access and control your UniFi devices’ data, allowing you to retrieve detailed information, monitor performance, and manage your infrastructure efficiently.
UniFi API Allows you to access application data from the local network. For high-level monitoring of multi-site deployments, please see our
Site Manager API
.
Authentication
An API Key is a unique identifier used to authenticate API requests. These keys are crucial for ensuring secure access. Each key is tied to the UI account that created it, allowing for secure and personalized API interactions.
Obtaining an API Key
Open your Site in UniFi Site Manager at unifi.ui.com.
Click on Control Plane -> Admins & Users.
Select your Admin.
Click Create API Key.
Add a name for your API Key.
Copy the key and store it securely, as it will only be displayed once.
Click Done to ensure the key is hashed and securely stored.
Use the API Key.
Use the API Key
Incorporate the API key into the X-API-Key header. Follow the Example, replacing YOUR_API_KEY with your actual API key.
Example
curl -k -X GET 'https://IP/proxy/network/integrations/v1/sites' \
-H 'X-API-KEY: YOUR_API_KEY' \
-H 'Accept: application/json'
In URLs below there is full API documentation. You need to use IP of UniFi device:
https://IP/unifi-api/protect
https://IP/unifi-api/network