Skip to content

Commands

How device firmware receives cloud commands.

Topic

  • Subscribe to devices/{uid}/command

Payload format

Use JSON with cmd key.

Built-in reserved commands

These commands are built into IoTBackend core and reserved:

  • reboot
  • wifi_reset
  • ota_check

Treat these names as reserved command IDs in your command design.

Examples:

json
{"cmd":"reboot"}
json
{"cmd":"wifi_reset"}
json
{"cmd":"ota_check"}

Custom command examples

See Examples for end-to-end handler patterns and user event/telemetry acknowledgments.

What Dashboard status means

  • PUBLISHED: command was accepted by broker publish API.
  • INVALID PAYLOAD: payload was rejected before publish.
  • FAILED: publish failed (API/network/runtime error).

PUBLISHED confirms publish acceptance, not guaranteed command execution.

Best practices

  • Subscribe to command topic immediately after connect.
  • Validate cmd value before execution.
  • Report effects via telemetry/user events when possible.