In this step, you will try to achieve the results of Manage features via Bosch IoT Suite UI, by simulating the device sends it.
If you managed the attribute change, you have learned already the basics:
You need to authenticate like the device.
The Username is composed with the pattern <namespace>_<device-name>@<hub-tenant-ID>
The Password is as set by yourself at the provisioning time
The message needs to follow the Eclipse Ditto protocol, because of the managed connection between Bosch IoT Hub and Bosch IoT Things.
The topic is composed in a similar manner "<namespace>/<device-name>/things/twin/commands/modify" or "<namespace>/<device-name>/things/twin/commands/merge"
The path describes how the thing looks like. In this case, instead of "/attributes/<attribute-key>/" you will need to set "/features/<feature-ID>/properties"
The value holds all the payload, which can be nested, and needs to be a valid JSON object.
Let's assume your device already has the temperature feature and only wants to replace the value of "currentMeasured" to 30 degrees.
The pop-up offers basic authentication.
In this example, you will mimic the hello-world-device.
Therefore, please authenticate with:
the username auth-ID@Hub-tenant-ID and
as you have set them at the start, in the provisioning.
You can copy the Username from the Bosch IoT Suite console.
Navigate Things > hello world > Device > Credentials, from there you can copy the Username to the clipboard and use it in the Authorization pop-up at the HTTP API docs.
Close the popup.
Publish telemetry data
Navigate to POST /telemetry.
Click Try it out - to get access to the input fields.
Setting the QoS-Level (Quality of Service) for publishing telemetry messages is optional and can stay empty.
Setting the hono-ttd (time ‘til disconnect) is optional and can stay empty.
Set the Request body.
The type must be application/json.
The content must respect the thing's notation.
In our case, the request body looks like this:
For the logic on how your thing actually looks like: look up the JSON view in the Bosch IoT Suite Console.
For the JSON syntax: use https://jsonlint.com/ to check if your content is valid JSON.
The response code 202 shows success. The changes are forwarded via managed connection to the digital twin layer.
Check your work
The easiest way to see if setting a new temperature setting succeeded is to open the Features section in Bosch IoT Suite UI.
In case of failures see the tips given in the previous section Manage attributes via Hub HTTP API.