Acutally the Code has already been written by another person. I’m the one who’s supposed to fix it…
After researching for a while my guess is that it is made out of the “End Device API Documentation” aswell as the “CSV File Reference” - Adding devices in bulk. My guess is, that it didn’t follow an instruction. When researching is saw some codes and issues that looked the same, like:
Maybe from here?