I'm sure there is a way to do it via Particle CLI and Python, but what I found works well when commissioning devices is using a 2D barcode scanner to just scan the code on the Boron. That way, I didn't need to do any CLI commands in Python to get the Serial number of Device ID. The 2D barcode scanner makes for quick work! This is what I use: 2D QR Barcode
Here is an early version of a Python script I use to commission a device I reference in a post sometime back.
Basically this script will:
- Add a device to a product
- Claim the device to an admin account
- Add notes and change the device name
- Add it to my SQL backend
- Flash my user application firmware via Hex file
I was using this for cellular based devices so I never added the WiFi step. Are you initiating Particle CLI commands from the Python script to setup WiFi then? If so, you mind sharing a code snippet of that as I may want to add that to the Python script in the future.