Reputation: 41
The MQTT-API from thingsboard describes:
Claiming devices
Please see the corresponding article to get more information about the Claiming devices feature.
In order to initiate claiming device, send PUBLISH message to the following topic:
v1/devices/me/claim
The supported data format is:
{"secretKey":"value", "durationMs":60000}
Please note that the above fields are optional. In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used (in the file /etc/thingsboard/conf/thingsboard.yml).
But here are some problems. Devices must be authenticated with a access-token. But the claim process is for unknown devices.
Is it necessary to import the device to thingsboard before I can start the claim process?
What is the real procedure?
Upvotes: 2
Views: 309
Reputation: 63
I think you are confusing claiming and provisioning.
Claiming it's when a customer becomes the owner of an already existing device in the tenant, in this state the device it's already provisioned and it's fully functional.
Provisioning it's the process of "authentication" of the device, we need it to tell apart an official device vs a random one created by a customer in the tenant.
So:
You can't claim an unknown device. The device must be already created and you must know it's name and/or access token.
To claim a device you need it to be provisioned.
You should create the device on Thingsboard, provision it and then the customer should do the claim if he wants it.
Even though you don't really need any of this to use it by your self.
Upvotes: 1
Reputation: 1
you should use function provisioning device before claim device. It will auto generate the access token for your device
Upvotes: 0