One-way commands are sent from a connected business solution through the Bosch IoT Things and Bosch IoT Hub to a connected device. This type of command is neither confirmed nor answered by the device.
Create command subscriber
Download the server certificate for MQTT TLS encryption
curl -o iothub.crt https:
Start and subscribe to MQTT command topic with Mosquitto MQTT client
mosquitto_sub -d -h mqtt.bosch-iot-hub.com -p
-u <authId>@<tenantId> -P <your-password> --cafile iothub.crt -k
Make sure you replace all parameters correctly:
<authId> the ID of the credential that was created during device provisioning
<tenantId> the ID of your tenant
<your-password> the password that was registered with the credential.
Note on the password
Use the password as you have created it during the device provisioning (credential registration) in plain text.
Do not use it hashed or base64 encoded, when sending messages.
The data transfer is secured by TLS encryption.
The -k parameter is to overwrite the default keep alive period. Here we set the keep alive period to 30 seconds.
If no data flows over an open connection for longer than 30 seconds then the client will generate a PINGREQ to indicate the server that the device is still active.
The -t parameter is the name of the MQTT topic to subscribe to.
In this example the topic control/+/+/req/# is defined using the MQTT topic wildcard format, to subscribe to all possible commands.
The MQTT client is now subscribed to the Bosch IoT Hub and is ready to receive commands.
Update the feature of the thing
Authorize with a fresh Suite OAuth token.
Set the thingID that was created during device provisioning
Set the body
You have updated the feature of the digital twin.
This emits a twin event "twin modified" with a respective payload which is sent via Bosch IoT Hub as a command message to the device.
Receive a one-way command
You should see the command message printed out on the command line:
Client mosq/7EqsKGFb69CxB2liZu received PUBLISH (d0, q0, r0, m0,
, ... (
That shows that the device has received the command message.
In case you have subscribed the package in December 2018 to March 2019 please re-check manually following settings:
The connection which is created automatically should already set at target all 4 options.
In case your subscription does not show the target edit it respectively.
The policy for the DEVICE should already include read messages permission.
In case your policy does not show such an entry edit it respectively.