Product subscriptions without claiming

Hey All!

Particle has improved the event system so that devices in a product can receive events without being claimed. This means claiming devices in a product is no longer needed! Device claiming has often caused issues with scaling, specifically for users who move from individual development to manufacturing.

This change means that devices in a product that subscribe to webhook responses will receive them, regardless if they are claimed to a user, a customer or not claimed at all. You’ll also see responses to product webhooks in the product event log of the Console. Additionally, you can now publish an event to an entire fleet (or portion of fleet if that’s what you want).

If your fleet has a mixture of claimed and unclaimed devices then you will see an increase in data operations when your unclaimed devices start receiving webhook responses. In the past, unclaimed devices would not receive webhook responses.

Devices are only impacted if they are not claimed but are in a product AND have device subscriptions AND have events that will hit those subscriptions.

With this change, it is no longer necessary to claim Particle devices to a user after importing them to a product in order to access the full functionality of the Particle platform.

Let me know if you have any questions!

7 Likes

Hi,
I’m a bit confused by this statement

if they are not claimed but are in a product

How can a device not be claimed but are part of a product, as the recent System Firmware changes have deprecated PRODUCT_ID being embedded in the application firmware. And that to get device to be in a product group you have to claim it via the product page?

You must upload the list of Device IDs (or serial numbers) to your product ahead of time. This adds the device to the product but does not affect claiming. This has always been the case with regards to claiming.

If you order in tray or reel quantities from the Particle wholesale store this is really easy because you’ll be emailed a list that you can upload the the console. There is no need to wait; billing will not start until the device comes online the first time.

Claiming a device sets the device owner. This is done using the CLI particle device add or the API directly. There isn’t a way to claim a device in the product in the console, though you can unclaim a device from the product device list. Claiming was previously necessary if device needed to subscribe to events on-device. With the recent change, claiming is no longer necessary in almost all cases, which saves a step when onboarding devices.

The one case were you do need to claim a device is if you re using device owner webhooks. However the solution is to use product webhooks instead of device owner webhooks, and if you use product webhooks you do not need to claim.

1 Like

A bit of history:

Claiming associates a device with a user account. Before products existed, this was necessary for developer devices to add them to your account and prevent other users from accessing it.

When products were created, this created a parallel scheme of product membership, so a device can be administered as part of a fleet. We didn’t remove device claiming from products, and this created a weird and annoying extra step.

Cellular users mostly switched to claiming devices to a single account, which is the least painful way to do it.

A few years ago, we added the ability to claim a device to a team member while it was offline. Prior to that, the device had to be online and breathing cyan, which was even more annoying.

When the Tracker came out, we partially fixed unclaimed product devices. This allowed unclaimed product devices to be secure, and use functions and variables, but not subscribe to events on-device. This also added the wildcard product ID. With this, you no longer needed to embed the PRODUCT_ID into the firmware, which was necessary because we wanted all Tracker Edge devices using the default firmware to use identical firmware binaries.

With Device OS 4.0 and later (including 5.0), we made wildcard product firmware a requirement, removed the PRODUCT_ID macro. This required that all devices be added to a product first. It also eliminated quarantine and auto-add devices, which are no longer relevant without PRODUCT_ID. This also means you can move a devices from one product to another entirely from the cloud, not changing the device firmware.

The March 2023 change fixed the last main problem with unclaimed product devices. You can now subscribe to events from an unclaimed product device. You might want to receive a webhook response, for example. This now works properly.

At this point, we recommend all products use 4.x, except for the P2/Photon 2, which need 5.x. In addition to removing PRODUCT_ID these versions also eliminate the setup done bit on Gen 3 devices (Argon, Boron, B Series SoM, Tracker SoM) which eliminates another annoying requirement during device onboarding.

You should upload the list of devices into your product in advance.

You should take advantage of unclaimed product devices except for firmware developers. They can mark the device as development and claim the device to their own account, so they can flash directly from Particle Workbench and the Web IDE.

2 Likes