New tutorial with everything you ever wanted to know about device claiming and related topics!
again great tutorial.
One thing that I didn’t know and could not understand is this wildcard on the product_id:
With Device OS 2.0 and later, it is also possible to use a wildcard product ID: PRODUCT_ID(PLATFORM_ID); This is handy if you have multiple products running the same firmware. However, it requires that you add all Device IDs to the product ahead of time,
what would the wildcard be in this case? PLATFORM_ID?
Yes. The wildcard product ID is when the product ID is equal to the platform ID, such as Photon = 6 or Electron/E Series = 10. That’s the constant
It might make more sense if you know why it was added:
The Tracker must be a in a product, even if it’s a product of one device. And every Tracker out of the box has the Tracker Edge firmware, which implements most of the tracker functionality. And since so much of the Tracker functionality is cloud-configured, it’s quite possible that some off-the-shelf users of the Tracker One might not even need to flash their own custom firmware. They can just use the off-the-shelf Tracker Edge.
You’ve probably now seen why the wildcard is necessary: Before, since the product ID had to be hardcoded into the user firmware, everyone’s Tracker Edge binary would be different, so it would be impossible to use the same binary across all products. By allowing a wildcard, now the binaries can be identical, no matter which product ID they’re added to.
in the Do I need to claim my devices? section, it is stated:
For devices in a product, you can use unclaimed product devices if:
- The device firmware does not subscribe to events (including webhook responses)
- You do not need to use the Wi-Fi device setup SDK for the Photon/P1
What is this Wi-Fi device setup SDK exactly?
The Photon Setup SDK is for iOS or Android to make your own mobile app that is able to setup Wi-Fi for a Photon or P1, along with claiming the device, to a developer account, simple auth customer, or two-legged shadow customer.
It does not work with the Argon.