Messages sent by Bosch IoT Rollouts
Note: The DMF protocol uses the term “thing” for a device or in Bosch IoT Rollouts speech “provisioning target”. The terms can be considered as synonyms.
Messages sent by Rollouts (Rollouts -> Client)
All messages from Bosch IoT Rollouts are sent to the sp_direct_queue or to the exchange specified by the reply_to property.
CANCEL_DOWNLOAD
Message to cancel an update task.
| Header | Description | Type | Mandatory |
|---|---|---|---|
| type | Type of the message | Fixed string “Event” | true |
| thingId | The ID of the registered provisioning target | String | true |
| topic | Topic name identifying the event | Fixed string “CANCEL_DOWNLOAD” | true |
| tenant | The tenant this provisioning target belongs to | String | false |
| Message Properties | Description | Type | Mandatory |
|---|---|---|---|
| content_type | The content type of the payload | String | true |
Payload template:
{
"actionId": long
}Example Headers and Payload:
| Header | MessageProperties |
|---|---|
| type=EVENT tenant=tenant123 thingId=abc topic=CANCEL_DOWNLOAD | content_type=application/json |
{
"actionId":137
}After sending this message, an action status event with either actionStatus=CANCELED or actionStatus=CANCEL_REJECTED has to be returned.
Example header and payload when cancellation is successful:
| Header | MessageProperties |
|---|---|
| type=EVENT tenant=tenant123 topic=UPDATE_ACTION_STATUS | content_type=application/json |
{
"actionId":137,
"softwareModuleId":17,
"actionStatus":"CANCELED",
"message":["The update was canceled."],
"timestamp: 1704070800000
}Example header and payload when cancellation is rejected:
| Header | MessageProperties |
|---|---|
| type=EVENT tenant=tenant123 topic=UPDATE_ACTION_STATUS | content_type=application/json |
{
"actionId":137,
"softwareModuleId":17,
"actionStatus":"CANCEL_REJECTED",
"message":["The cancellation was not possible since the target sent an unexpected response."],
"timestamp": 1704070800000
}DOWNLOAD_AND_INSTALL or DOWNLOAD
Message sent by Bosch IoT Rollouts to initialize an update or download task. Note: in case of a Action state machine > Maintenance Window configured but not yet active the message will have the topic DOWNLOAD instead of DOWNLOAD_AND_INSTALL.
| Header | Description | Type | Mandatory |
|---|---|---|---|
| type | Type of the message | Fixed string “EVENT” | true |
| thingId | The ID of the registered provisioning target | String | true |
| topic | Topic name identifying the event | Fixed string “DOWNLOAD_AND_INSTALL” or “DOWNLOAD” | true |
| tenant | The tenant this provisioning target belongs to | String | false |
| Message Properties | Description | Type | Mandatory |
|---|---|---|---|
| content_type | The content type of the payload | String | true |
Payload Template (the Java representation is DmfDownloadAndUpdateRequest):
Click here to expand...
{
"actionId": long,
"targetSecurityToken": "String",
"softwareModules":[
{
"moduleId": long,
"moduleType":"String",
"moduleVersion":"String",
"artifacts":[
{
"filename":"String",
"urls":{
"COAP":"String",
"HTTP":"String",
"HTTPS":"String"
},
"hashes":{
"md5":"String",
"sha1":"String"
},
"size":long
}],
"metadata":[
{
"key":"String",
"value":"String"
}
]
}]
}Example header and payload:
| Header | MessageProperties |
|---|---|
| type=EVENT tenant=tenant123 thingId=abc topic=DOWNLOAD_AND_INSTALL | content_type=application/json |
Click here to expand...
{
"actionId":137,
"targetSecurityToken":"bH7XXAprK1ChnLfKSdtlsp7NOlPnZAYY",
"softwareModules":[
{
"moduleId":7,
"moduleType":"firmware",
"moduleVersion":"7.7.7",
"artifacts":[
{
"filename":"artifact.zip",
"urls":{
"COAP":"coap://download-from-url.com",
"HTTP":"http://download-from-url.com",
"HTTPS":"https://download-from-url.com"
},
"hashes":{
"md5":"md5hash",
"sha1":"sha1hash"
},
"size":512
}],
"metadata":[
{
"key":"installationType",
"value":"5784K#"
}
]
}]
}MULTI_ACTION
If multi.assignments.enabled is enabled, this message is sent instead of DOWNLOAD_AND_INSTALL, DOWNLOAD, or CANCEL_DOWNLOAD by Bosch IoT Rollouts to initialize update, download, or cancel task(s).
| Header | Description | Type | Mandatory |
|---|---|---|---|
| type | Type of the message | Fixed string “EVENT” | true |
| thingId | The ID of the registered provisioning target | String | true |
| topic | Topic name identifying the event | Fixed string “MULTI_ACTION” | true |
| tenant | The tenant this provisioning target belongs to | String | false |
| Message Properties | Description | Type | Mandatory |
|---|---|---|---|
| content_type | The content type of the payload | String | true |
Payload Template (the Java representation is DmfMultiActionRequest):
Click here to expand...
[{
"topic": "String",
"weight": long,
"action": {
"actionId": long,
"targetSecurityToken": "String",
"softwareModules":[
{
"moduleId": long,
"moduleType":"String",
"moduleVersion":"String",
"artifacts":[
{
"filename":"String",
"urls":{
"COAP":"String",
"HTTP":"String",
"HTTPS":"String"
},
"hashes":{
"md5":"String",
"sha1":"String"
},
"size":long
}],
"metadata":[
{
"key":"String",
"value":"String"
}
]
}]
}
},
{
"topic": "String",
"weight": long,
"action": {
"actionId": long,
"targetSecurityToken": "String",
"softwareModules":[
{
"moduleId": long,
"moduleType":"String",
"moduleVersion":"String",
"artifacts":[
{
"filename":"String",
"urls":{
"COAP":"String",
"HTTP":"String",
"HTTPS":"String"
},
"hashes":{
"md5":"String",
"sha1":"String"
},
"size":long
}],
"metadata":[
{
"key":"String",
"value":"String"
}
]
}]
}
}]Example header and payload:
| Header | MessageProperties |
|---|---|
| type=EVENT tenant=tenant123 thingId=abc topic=MULTI_ACTION | content_type=application/json |
Click here to expand...
[{
"topic": "DOWNLOAD_AND_INSTALL",
"weight": 500,
"action": {
"actionId":137,
"targetSecurityToken":"bH7XXAprK1ChnLfKSdtlsp7NOlPnZAYY",
"softwareModules":[
{
"moduleId":7,
"moduleType":"firmware",
"moduleVersion":"7.7.7",
"artifacts":[
{
"filename":"artifact.zip",
"urls":{
"COAP":"coap://download-from-url.com",
"HTTP":"http://download-from-url.com",
"HTTPS":"https://download-from-url.com"
},
"hashes":{
"md5":"md5hash",
"sha1":"sha1hash"
},
"size":512
}],
"metadata":[
{
"key":"installationType",
"value":"5784K#"
}
]
}]
}
},
{
"topic": "DOWNLOAD",
"weight": 300,
"action": {
"actionId":138,
"targetSecurityToken":"bH7XXAprK1ChnLfKSdtlsp7NOlPnZAYY",
"softwareModules":[
{
"moduleId":4,
"moduleType":"firmware",
"moduleVersion":"7.7.9",
"artifacts":[
{
"filename":"artifact.zip",
"urls":{
"COAP":"coap://download-from-url.com",
"HTTP":"http://download-from-url.com",
"HTTPS":"https://download-from-url.com"
},
"hashes":{
"md5":"md5hash",
"sha1":"sha1hash"
},
"size":512
}],
"metadata":[
{
"key":"installationType",
"value":"5784K#"
}
]
}]
}
}]THING_DELETED
Message sent by Bosch IoT Rollouts when a target has been deleted.
| Header | Description | Type | Mandatory |
|---|---|---|---|
| type | Type of the message | Fixed string “THING_DELETED” | true |
| thingId | The ID of the registered provisioning target | String | true |
| tenant | The tenant this provisioning target belongs to | String | true |
Example header:
| Header | MessageProperties |
|---|---|
| type=THING_DELETED tenant=tenant123 thingId=abc |
REQUEST_ATTRIBUTES_UPDATE
Message sent by Bosch IoT Rollouts when a re-transmission of target attributes is requested.
| Header | Description | Type | Mandatory |
|---|---|---|---|
| type | Type of the message | Fixed string “EVENT” | true |
| thingId | The ID of the registered provisioning target | String | true |
| topic | Topic name identifying the event | Fixed string “REQUEST_ATTRIBUTES_UPDATE” | true |
| tenant | The tenant this provisioning target belongs to | String | true |
Example headers:
| Header | MessageProperties |
|---|---|
| type=EVENT tenant=tenant123 thingId=abc topic=REQUEST_ATTRIBUTES_UPDATE |
PING_RESPONSE
To the Messages sent to Bosch IoT Rollouts > PING message, Bosch IoT Rollouts will respond with a PING_RESPONSE type message that has the same correlationId as the original PING message:
| Header | Description | Type | Mandatory |
|---|---|---|---|
| type | Type of the message | Fixed string “PING_RESPONSE” | true |
| tenant | The tenant the PING belongs to | String | false |
| Message Properties | Description | Type | Mandatory |
|---|---|---|---|
| correlationId | CorrelationId of the original PING request | String | true |
| content_type | The content type of the payload | String | true |
The PING_RESPONSE also contains a timestamp (i.e. the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC) as plain text. It is not guaranteed that this timestamp is completely accurate.
| Header | MessageProperties |
|---|---|
| type=PING_RESPONSE tenant=tenant123 | content_type=text/plain |
Disclaimer: It is up to the (potentially clustered) client to relate the PING message to the corresponding PING_RESPONSE (which might be taken by another cluster node from the queue).
CONFIRM
Message sent by Bosch IoT Rollouts to initialize a user confirmation task.
NOTE
Applicable only if the user consent flow feature has been enabled prior to the start of the action.
| Header | Description | Type | Mandatory |
|---|---|---|---|
| type | Type of the message | Fixed string “EVENT” | true |
| thingId | The ID of the registered provisioning target | String | true |
| topic | Topic name identifying the event | Fixed string “CONFIRM” | true |
| tenant | The tenant this target belongs to | String | true |
| Message properties | Description | Type | Mandatory |
|---|---|---|---|
| content_type | The content type of the payload | String | true |
Click here to expand...
{
"actionId": long,
"targetSecurityToken": "String",
"softwareModules":[
{
"moduleId": long,
"moduleType":"String",
"moduleVersion":"String",
"artifacts":[
{
"filename":"String",
"urls":{
"COAP":"String",
"HTTP":"String",
"HTTPS":"String"
},
"hashes":{
"md5":"String",
"sha1":"String"
},
"size":long
}],
"metadata":[
{
"key":"String",
"value":"String"
}
]
}]
}