This article will discuss the different types of camera identifiers utilized by Nx Server and how to obtain them. These include: physical ID (~ MAC address); camera ID (system designated UUID); and Logical ID (a simplified version of camera ID). Camera identifiers are important for performing tasks involving the cameras in a system e.g. API requests and for creating any integration that utilizes the cameras in the system.
What are Physical ID, Camera ID, and Logical ID?
The Physical ID of a camera is usually equal to its MAC address. It can be used for utilizing live or recorded video from a camera(s) in your Nx system, but not preferred. Video archive (located in storage) is also organized by a camera’s physical ID.
The Camera ID is a UUID that the system assigns to each camera, usually in the format similar to f93369eb-e530-27b7-78ba-16978cbd3061. Camera ID is preferred when performing API calls. It is also used for “devices” such as virtual camera instances.
The Logical ID simplifies device identification when integrating with third-party systems, and is necessary in environments with input devices that are not capable of entering the full camera ID. Logical ID also simplifies the process of replacing one camera with another, without changing identifiers in the integration. The Logical ID can be used in API calls (including getting RTSP streams, etc) to address cameras.
How to Obtain Physical/Camera ID?
Using Client
Since version 3.0, camera ID and physical ID can be found in Nx Desktop.
- Right click on a camera and select Camera Settings
- In the General tab, select the More Info arrow located beneath Vendor and Model. You will find the camera and physical ID there.
Note: MAC address is also the physical ID
Using API Request
- In a browser, type the following HTTP request:http://<server_ip>:<server_port>/ec2/getCamerasEx?extraFormatting
server_ip = the IP address or URL of the Nx Server you are requesting this information from
server_port = the port your System is using (typically 7001)
For example, if you were placing an API call to our Nx Demo System, the call would be: http://demo.networkoptix.com:7001/ec2/getCamerasEx?extraFormatting
Note: when making an API call, you can use any server in the system - You should now see something similar to the following screenshot:
- Search the page (CTRL + F) and enter the name of the camera you are searching for, using the camera name in your System e.g. "Kitchen". Also, the camera IP address can be used for the search.
Locating Physical ID
Located above the camera name, you will notice a parameter called "physicalId". This attribute value is physicalId and will be the folder name for "recording" and the "smart motion index". In this case, your physicalId is 00-1C-A6-01-6E-6E.
Locating Camera ID
Located above the camera name, you will notice a parameter called "id". This attribute value is cameraId and should be put to different API calls(ptz, hls, rtsp, etc.). Value should be used without quotation marks with/without parenthesis. I.e., in this case you paste {0b73e6d1-a5d3-2868-41c7-b52994f4107d} to your api call as a parameter. Note: Camera name in the screenshot below is “Cube”.
How to Setup Logical ID?
Assigning a Logical ID
- Open the context menu for a camera and go to Camera Settings -> Expert.
- Enter a number in the Logical ID field.
If you are integrating with a system that is already using 1 to 3 digit identifiers, use the Generate button to discover and display the smallest number that is not already in use.
Removing a Logical ID
Press the Reset button. This sets the Logical ID to zero, which the API equates to having no Logical ID.
Questions
If you have any questions related to this topic or you want to share your experience with other community members or our team, please visit and engage in our support community or reach out to your local reseller.
Comments
1 comment
It would be great if you added a static identifier handeled by NX so that we can set up API calls that still will work even if the physical camera is replaced.
When a camera is replaced this "NX channel identifier" should be moved to the new camera. This way all recordings and api calls can follow the "Channel" and not the physical camera.
Article is closed for comments.