I was going through the callbacks of discovery_server and controller to see if we can get just the dev_id of the robots using pu. Unfortunately, I was not getting the desired results.
You could try this in your test environment:
Set discovery_server > raw configure > correlation > robot_device_id to false
Deactivate and then activate discovery_server
Disabling correlation on dev_id should let d_s to populate the robots in question to CM* tables
Reading niscache of all the robots by d_s typically would take 60 to 90 minutes in large environment
Run the below query -
SELECT dev_id, robot, COUNT(dev_id) "Duplicate count"
FROM cm_nimbus_robot
GROUP BY dev_id, robot
HAVING ( COUNT(dev_id) > 1);
This should get you dev_id duplicates. Once you perform the steps as per TechDoc on the problem robots, enable correlation on robot_device_id and then deactivate and then activate d_s. Eventually d_s would update dev_id field with the correct dev_id in cm_nimbus_robot table.
This is not really pretty but should help you finding the duplicates. Let me know if you have any questions, please.