Skip to content

Claiming / provisioning a devices without an deviceID #296

@ojna

Description

@ojna

Looking at the official particle api docs you can see that the endpoint POST /v1/devices should be able to both claim a device with id or provision a new device if it's left out and supplied with a product id.

This applies to eg Raspberry Pi. I've been messing around with the code in the dev branch and everything works fine with the Particle Agent for RPI if the endpoints creates an ID and then responds with:

{ "ok": true, "device_id": "new-device-id" }

Once its stored in the database if works fine with the rest of the cli and so on. But i guess we need to make sure the generated id don't collide with other ids later on.

Are there any roadmap to adressing this, or is anyone working on it? Either case i will fix this and with some coordination with this project i can send a pull request with it later on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions