Is there a way to setup and claim multiple electrons at once?


#1

I’m trying to setup and claim about 100 Electrons. Is there a way to do this faster going individually through each unit via setup.particle.io?

TIA,
Ralph


#2

That’s possible if you are on a product plan: https://docs.particle.io/guide/tools-and-features/console/#adding-devices


#3

If I’m looking at the right place, I still need to plug in every electron, use “particle identify” to get the device ID, and then put those in a csv to import into a product. Is that correct?


#4

If you bought a bulk purchase through Particle, it should be available to you.

@KyleG might have a better idea.


#5

Let me ping someone that should be able to help, @tylercpeacock.


#6

I know getting automated access to a list of device IDs from a bulk purchase is something that’s been requested before and something we’re looking to provide but I don’t think we have that just yet. So unfortunately at this time I don’t really have a better option to provide.


#7

Is this still the case?

I notice that there is a “Add devices to product” button at the top of my product.

Will this “Add devices to product” process simply pre-approve these devices so that they automatically get added to my product when they connect?

Will this “Add devices to product” process ALSO claim these devices to my Particle account?

I need both to happen for this to be useful.

Thanks

EDIT:

@KyleG @kennethlimcp

Okay, so I just bulk-added a bunch of Electrons to my product using the “Add Multiple Devices” button on the product device list page. I can confirm that this DOES NOT CLAIM THE DEVICES to my account (only adds them to the product).

So, basically the bulk add feature is useless for my product since I already have my product setup to approve any device. :unamused:

The reason I was hoping to use a workflow that allows me to claim multiple devices to my account is because I am trying to implement a workaround for subscribing to events created/triggered within a product.

I have documented the problem in this thread:

Currently, there is no specifier for Particle.subscribe() (that I know of) that allows me to subscribe to events at the product scope. The only specifier I know of is MY_DEVICES, which only filters events created by/sent to devices claimed to my account.

As detailed in the post I linked to, I think the solution should be to have a THIS_PRODUCT scope that can be specified when calling Particle.subscribe()


#8

I would love to provide an answer but product features are not familiar ground for me. sorry!


#9

@rickkas7


#10

Add devices to a product does not claim the devices, as you have discovered. It only pre-approves the devices so when they connect to the cloud the first time, they’ll immediately be added to your product.

When your purchase devices from the Particle wholesale store in tray or reel quantities, you’ll be emailed a file containing the devices IDs in the order, which makes the adding process easier.

There is no way to bulk claim devices from the console, but it’s a pretty easy script to write as you can easily claim devices using the API or curl, especially if you have the list of device IDs from your order. Note that the devices need to be online to claim them, so you’ll need to activate the SIMs and get them to breathing cyan before you can claim them.

Currently product events are basically one-way, to allow a device to publish events to the product. The reverse mapping doesn’t exist, which is why there is no THIS_PRODUCT for subscribe. It’s a good idea, just not something that exists right now.


#11

It seems to me that this is still an issue for large scale deployments. I would think that Particle would make this an option from the console when you a) add devices to a Product, or b)approve devices into a Product. Bulk activation of SIMS and Devices is relatively painless, but this additional step seems unnecessary and prone to error. In a ‘sleepy’ deployment where the firmware has the devices off for much of the time, catching them at the moment they happen to be online and breathing cyan just to claim them is painful.


#12

The problem is that claiming a device requires a handshake between the device and the cloud to authenticate, so it must be online.

For Wi-Fi products, it’s common to have the end-user claim them at the time of Wi-Fi configuration, so this is not an issue.

For cellular products, many product creators claim all of the devices to a single account controlled by the company. This is typically done during setup and configuration of the devices.

That being said, a way to use product devices without claiming is something that’s being investigated, as it would eliminate a step that’s a pain for large deployments. I don’t have a time frame for that feature, however.


#13

Thanks. That’s helpful. It seems like it should be possible to to set up a script that watches for the device to come online, check if it has been claimed, and if not then do it. I can’t do this in Losant because events are not pushed unless the device is ‘owned’.