Why do we need to identify a Camera/Video Resources?
It is very important to recognize each resource uniquely and individually.
For a professional VMS, you have to provide a solid function to video playback, video recording, and endpoint management. So, if you don't have a good way to identify a specific video resource, you can't meet those basic requirements for general or professional usage.
Besides, in the VMS, lots of functions and API requests can be reused by 3rd party developers. It is essential to support developers to grab the specific information they need.
That is why we have to identify every camera/video resource with a unique ID.
How does the VMS identify Camera/Video Resources?
The VMS uses Physical ID as a primary identifier to track devices. It is the core unique identifier for a device, usually derived from its MAC address. The VMS uses this identifier to track hardware and name archive folders on disk.
There are two other identifiers existing in the VMS:
ID: A database key and REST API identifier. A given Physical ID always produces the same ID.
Logical ID: An optional short number that you assign manually for quick reference. The system does not use the Logical ID to identify hardware.
How is the Physical ID generated?
The VMS generates Physical IDs based on the type of resource and how you add it:
Discovered devices: The server checks ONVIF discovery scopes for a MAC address. If the server cannot find a MAC address, it falls back to the device's ONVIF endpoint GUID.
Manually added devices: The server queries the device directly for its network interface MAC address. If no MAC address is available, the server sets the Physical ID using the format
<hardwareId>_<serialNumber>.Multichannel devices: The server appends the channel number to the MAC address using the format
00-1A-07-1B-2C-3D_channel=2.RTSP streams: Because RTSP streams lack MAC addresses, the server sets the Physical ID to the MD5 hash of the stream URL.
Important: Because an RTSP stream's identity depends entirely on its URL, changing the host, port, path, or query parameter creates a new Physical ID. The VMS treats the updated stream as a new device, and past footage remains in the old archive folder. Always use a stable URL and a static IP address for RTSP sources.
Find a device's Physical ID
To find the Physical ID, send a GET request to the REST API:
GET https://<serverAddress>:7001/rest/v4/devices?_with=name,physicalIdReplace <serverAddress> with your server's IP address or hostname.
Comments
0 comments
Article is closed for comments.