Sensorclouds
Commands

Command Lifecycle

Command statuses, the message your device receives, and how to acknowledge it

Statuses

PENDING ──▶ SENT ──▶ ACKNOWLEDGED
                 ├──▶ FAILED
                 └──▶ TIMEOUT   (no reply within 5 minutes)
StatusMeaning
PENDINGCreated, not yet delivered to the broker
SENTPublished to the device's /cmd topic
ACKNOWLEDGEDThe device replied with success
FAILEDThe device replied with an error, or couldn't be reached
TIMEOUTNo reply within 5 minutes

The command lifecycle: PENDING, then SENT, then one of ACKNOWLEDGED, FAILED, or TIMEOUT

What the device receives

On tenant/{tenantId}/app/{applicationId}/device/{deviceToken}/cmd:

{
  "commandId": "6f1c2e9a-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
  "command": "reboot",
  "parameters": { "delay": 5 },
  "timestamp": "2026-09-18T07:30:00.000Z"
}

How the device acknowledges

Publish to tenant/{tenantId}/app/{applicationId}/device/{deviceToken}/ack:

Success

{ "commandId": "6f1c2e9a-3b4d-4e5f-8a9b-0c1d2e3f4a5b", "status": "ok", "message": "Rebooting in 5 s" }

Failure

{ "commandId": "6f1c2e9a-3b4d-4e5f-8a9b-0c1d2e3f4a5b", "status": "error", "error": "Unknown command" }
RuleDetail
Echo commandId exactlyWithout it, the ACK is ignored
Success value"status": "ok", or "success": true
Anything elseRecorded as FAILED
message / errorShown in the command history
Extra keysKept with the response, which is useful for returning values

"status": "success" is treated as a failure. Use "ok".

Example: returning data

A status command can return values in the acknowledgment:

{ "commandId": "…", "status": "ok", "battery": 3.92, "rssi": -67, "uptime": 86400 }

The whole response is visible when you expand the command in the history.

Acknowledge after carrying out the command, but before a reboot or anything else that drops the connection.

Command history

The Command History table on the Messaging tab lists the commands sent to the device: Command, Status, Sent At, Acknowledged At, and a Response summary (Success, Failed, or Timeout).

Click a row to expand it:

DetailDescription
Parameters SentWhat was sent
Device ResponseThe device's full acknowledgment
Error MessageThe failure reason, if any
Command IDFor matching with device logs

Clear View empties the table on your screen only. The history itself isn't deleted.

On dashboards, the Command history button shows recent toggle commands.

Completed commands are kept for 7 days.

Troubleshooting

SymptomCauseFix
TIMEOUTNo ACK arrived within 5 minutesCheck that the device subscribes to /cmd, publishes to /ack, and echoes the commandId exactly
FAILED with no error messageThe ACK had neither "status": "ok" nor "success": trueFix the success value in the firmware
The ACK seems ignoredThe commandId is missing or changed, or the ACK went to another device's topicEcho the commandId unchanged, on this device's own /ack topic
The device acts on the same command twiceQoS 1 can deliver a message more than onceRemember the last commandId and skip repeats

Next Steps

On this page