Skip to content

MQTT Commanding Feature – Samples for subscribing to an MQTT topic

Commanding Feature Async API defines topics and message structures to subscribe MQTT commands to be executed by the agents and publish the command execution status.

For more information, refer Commanding Feature Async API specifications.

Subscribing Commands

This operation is used to receive the command to be executed by the agent.

Region Operation
Europe 1 tc/{tenantId}/{clientId}/i/cmd_v3/c
Europe 2 devices/{clientId}/messages/devicebound/cmd_v3=c

Payload example:

{
  "id": "99609765fed2452c8e126814c283a27f",
  "data": {
    "jobId": "21349765fe45652c8e126814c283a114",
    "createdAt": "string",
    "payload": {
      "property1": "string",
      "property2": "string"
    }
  }
}

Publishing Command Execution Status

This operation is used to publish the command execution status and progress.

Region Operation
Europe 1 tc/{tenantId}/{clientId}/o/cmd_v3/u
Europe 2 devices/{clientId}/messages/events/cmd_v3=u

Payload example:

{
  "id": "11609765fed2452c8e126814c283a289",
  "requestId": "99609765fed2452c8e126814c283a27f",
  "data": {
    "timestamp": "2011-08-12T20:17:46.384Z",
    "jobId": "21349765fe45652c8e126814c283a114",
    "status": "EXECUTING",
    "response": {
      "property1": "string",
      "property2": "string"
    }
  }
}

Any questions left?

Ask the community


Except where otherwise noted, content on this site is licensed under the MindSphere Development License Agreement.


Last update: December 22, 2021