What does OPC use for Unique ID with system.device.addDevice

We are working on laying out our system and how we want the database to handle devices using the `system.device.addDevice, but I am curious what does OPC use as the unique ID, I am assuming it is the deviceName Field? Trying to keep that unique ID used across datasets.

Internally there is an ID field but the device name column also has a unique constraint on it.

If we are looking to build a device list showing things like IP’s then eventually connect more information to these devices would it make more sense to link to that ID you are referencing or not worth it because both are forced to be unique?

I guess this is an opinion on best practices.

I’m not really sure what you’re doing but that ID isn’t available to you.

system.device.addDevice should fail if you try to add a device with a name that’s already in use. There’s nothing else you really need to worry about.

Well then I guess that second question is mute, thank you Kevin. Working on building skids on the fly which will be building modbus devices based on the configured settings needed.

Okay, just make sure the names are unique and you should be fine :+1:

1 Like