Add unique id to devices.