I have tried multiple times to claim photons based on the ID I pulled off of them and I keep getting the following error.
particle device add #######################
Failed to claim device, server said { ok: false, errors: [ ‘device does not exist’ ] }
I was wondering how I can add/claim these devices without doing it one by one with the app. I have all the ID’s of all the Photons I want to claim and I want to do a bulk claim rather then one off’s through the app.
I got the ID’s by plugging them into the computer and then connecting to it via a screen session on mac ‘screen /dev/tty.usbmodem1421 9600’ then I hit ‘i’ which gives me the identity of the photon. It is a 24 digit hex number. For some reason I can claim it through the app just fine and see the ID in the particle dashboard afterwards and it exactly matches what I had recorded. However when I try to manually claim via the CLI it always gives me the ‘device not found’ error.
lawless:~ dlawless$ particle device add 3e002a000447343232363230
Claiming device 3e002a000447343232363230
Failed to claim device, server said { ok: false, errors: [ ‘device does not exist’ ] }
lawless:~ dlawless$ particle device add 180035000447343337373737
Claiming device 180035000447343337373737
Failed to claim device, server said { ok: false, errors: [ ‘device does not exist’ ] }
lawless:~ dlawless$ particle device add 320039000647343138333038
Claiming device 320039000647343138333038
Failed to claim device, server said { ok: false, errors: [ ‘device does not exist’ ] }
Here are a few ID’s I have tried, you may be able to see the errors on the backend. Just to note, after adding the Photon through the app and then attempting to run the exact command above with the ID of the Photon that was already added it gave me a success message, so I know the CLI is working properly.
The device must have connected to the cloud before you can claim it, and must be online at the time of claiming. If you collect all the IDs and then try to claim later, they won’t be online, and this won’t work.
This is going to be unbelievably tedious for us. There is no way to do it based on the IDs? I will have to go back through each and every one of these and claim them through the app? Our process of pre configuring these devices is to set the ssid to relate to our company. That means the process to claim each one of these would be to reset that ssid, connect to a WiFi, claim with the app, unconfigure the WiFi? There’s got to be a way to claim these with just the IDs. Please let me know if there is anything that can be done even as a one off. I will make sure not to make this mistake again.