How to get hardware id (HWID) with a plugin SDK?
AnsweredHello,
Is there a way to get HWID within a plugin, without HTTP API?
I know that I can receive HWID with an API call but I need server login/password for this, so it's better to receive it via C or C++ call.
-
I need a HWID (it's GET/ec2/getHardwareIdsOfServers in the HTTP API)
I want to use this id in pair with our licence key, so we will know that some particular licence is used on some particular hardware.I was thinking about server id (and I see that sometimes HWID is based on a server id) but I not sure about NX failover setup case where you combine multiple servers together.
-
Hendrik,
First of all, it is impossible to implement a server attributes getting function using the given SDK.
Server-level attributes are isolated and it is intentional.Second thing, in Nx licensing case there's no such thing as per-device specific channel assignment. It's a system level. You can never know which exactly license key was used to enable recording at a particular device.
Lastly, HWID is a pretty populated list with several levels(1 to 5). HWID of lower levels might be identical for different servers which is expected. Thus it's not the best attribute to identify the server.
I would recommend you use the following methods:
- GET ec2/getMediaServers - returns a list of the Media Servers in the System. Every server in this list(i.e. in the system) has a unique "id" parameter.
- GET ec2/getCamerasEx - returns a list of the Cameras/Devices in the System. Every camera in this list has attributes:
- "parentId" - the id of the server it "belongs to" at the moment. I.e. the id of the server node you see it under in the GUI
- "preferredServerId" - id of the server it used to belong to before jumping to another one due to failover. If there was no jumping due to failover(i.e. the default situation) both parameters will have the same value.
Please sign in to leave a comment.
Comments
6 comments