I’ve also successfully tested the iPhone app to register my first device, this all works fine.
I’m now trying to register a device via the MQTTbox Windows app.
I struggled with the client connection settings initially until I found a reference to the user ‘management/devicebootstrap’ in this forum.
With this particular user the application does successfully connect. however when I try to register a device, the feedback on the s/e subscription says :
“50,100,Error on device creation, message: Error on device creation, message: User ‘devicebootstrap’ has insufficient privileges”
So, I have a few areas where your help would be greatly appreciated:
How do I create a user with sufficient privileges to register/add devices via MQTT ?
The MQTTbox client connection settings applicable in my use case, as the ‘Hello MQTT’ example is not clear.
Workflow for adding devices via MQTT, i.e. can this work like the iPhone app or do you need to add the device first via the cumulocity IoT device management ?
Example command to register a device into my cumulocity database.
When you take a new device into use, you enter this unique ID into Device registration in the Device Management application in Cumulocity IoT, and start the device.
The device will use this ID as part of the MQTT ClientId and static user credentials that can be enquired from support.
The device subscribes to the topic s/dcr.
The device starts publishing continuous empty messages on the topic s/ucr to notify the server that it is ready to retrieve credentials.
Next, you must accept the connection from the device in the Device Registration page.
When the device sends the next empty message it should receive credentials in the format 70,<tenantID>,<username>,<password>
Also of course you can create a new user in “Administration” assign the “devices” role to it and authenticate with that user.
The user should always contain the TenantID (can be found when clicking on your user within Cumulocity) and the username separated with a “/”. Example: t213123/deviceUser
The MQTT Client ID must be unique like an Serial Number or MAC Address.
As soon you send any MQTT message the device will be created within the tenant it is registered.
Firstly, thank you for replying to my post, much appreciated!
I had reviewed the device integration documents and the ‘hello mqtt’ guides but I still have the problems outlined in my original post.
The really important thing is what values do I enter into the MQTTBox application fields for a connection with an account that I have created ? (I did at least learn to day how to add the ‘devices’ role to an account today).
So within Cumulocity I created a user called ‘support’ with many associated roles including ‘devices’.
Under the user icon within the web app I see:
Where, in my case, the web app shows my tenant id as my company name which is what I entered when creating the trial account.
There is no identifier within the Cumulocity web app in the format ‘t number’, not that i could find anyway!
The other important issue I found was that I was trying to connect from MQTTbox with a 'user 'that was created from the Administration section of this URL :