To prevent multiple devices to use the same ID, use IMEI-based or serial-based device identification.
1. Register a device by specifying its device number and IMEI in the "Devices" tab (or register a list of multiple devices by using the "Import devices" plugin)
2. Create a QR code for a device. When creating a QR code, remove the device ID, and select "IMEI" in the "Device number assignent" field.
This will prevent multiple devices to use the same device ID, because the IMEI is unique for each device.
For those devices which do not have IMEI, you can use a serial number.