Remove Devices from Product

@ScruffR @rickkas7

Apologies if this has been asked before.

What is the best way to remove devices from a product using Particle CLI or the Particle API?

I need to create a script to remove many devices from a product and unclaim them afterwards.

You know the protocol: ask documented questions, get documented answers :wink:

https://docs.particle.io/reference/device-cloud/api/#remove-device-from-product

https://docs.particle.io/reference/SDKs/javascript/#removedevice-1

3 Likes

One more thing: When you remove a device ID from a product, you should also replace the device firmware with non-product Firmware (like Tinker) and allow it to connect to the cloud. If you don’t do this, sometimes the removed devices will end up in the Denied Devices section rather than disappear completely.

1 Like

I’m trying to remove some devices from a product and used the method above but I get back error messages when I try to remove them and they end up in the Denied Devices section of the product. I can’t reclaim and change firmware because the devices died. What’s my best solution for this problem?

I doubt that - see below

You'd need to make sure the devices don't come online trying to run your product firmware once you removed them from the list. If they do they will always end up in the blacklist.

One way to do that would be

  • power down the device
  • remove device
  • power on the device in DFU Mode (!)
  • run particle flash --usb tinker -v

After that it shouldn't end up in "Denied Devices"

1 Like

I can assure you the devices I’m trying to remove are dead, they got toasted by a bad connection on our end and thrown away. Is there something that can be done to remove them now?