How to distinguish multiple lenses in a dual-lens network camera when both return the same MAC
PlannedI'm working with a dual-lens network optic camera that exposes two video channels (which I can assign as channel 1 and 2). However, both channels report the same MAC address, which makes it difficult to uniquely identify or label each lens in my application.
My goal is to implement a naming convention like MAC-01 and MAC-02 to differentiate the lenses, but I need a reliable way to confirm that the device actually has multiple lenses or streams—especially when the MAC is shared.
Has anyone dealt with this kind of setup? Is there a standard way to detect or enumerate multiple lenses or streams from a single MAC-based device? Any pointers on how to architect this cleanly for plugin or API integration would be appreciated.
Following is the deice info of the axis loan camera with dual lens
here i am processing id as my unique sting to identify device and process other thinks
<removed output for readability> -
Hi Subramanian ,
You can distinguish each sensor with the unique ID in the VMS.
When you run the following API request and check the output:
GET https://localhost:7001/rest/v3/devices?_with=id,vendor,model,mac,name,urlYou'll see that, although the
macaddresses are identical, theidis always unique, and thatidis used todistinguishone sensor from another.[ { "id": "{24efadea-e5fe-0e69-8e4a-343bec205c25}", "mac": "B8-A4-4F-5F-B4-26", "model": "AXISP4707PLVE", "name": "AXISP4707PLVE-channel 1", "url": "http://195.60.68.14:12036?channel=1", "vendor": "Axis" }, { "id": "{1f3aed54-10e2-7e2b-e7d2-129afbf53292}", "mac": "B8-A4-4F-5F-B4-26", "model": "AXISP4707PLVE", "name": "AXISP4707PLVE-channel 2", "url": "http://195.60.68.14:12036?channel=2", "vendor": "Axis" } ]So if I want to change the name for sensor 1, I use the id for sensor one (
24efadea-e5fe-0e69-8e4a-343bec205c25) for my patch request:PATCH https://localhost:7001/rest/v3/devices/24efadea-e5fe-0e69-8e4a-343bec205c25With body:
{ "name": "<any_name_you_like>" }With kind regards,
0 -
how do i know it from the same camera. every camera will return the id if i have more then 100
and my mac is assigned directly from device agent object creation
void Engine::doObtainDeviceAgent(Result<IDeviceAgent*>* outResult, const IDeviceInfo* deviceInfo)
{
*outResult = new DeviceAgent(deviceInfo);
DeviceAgent* objDeviceAgent = (DeviceAgent*)outResult->value();
0
Please sign in to leave a comment.
Comments
2 comments