Request payload for adding a command-response request.

  • nodeIds accepts 1–25 unique node ids.
  • cmdId must match a command ID registered on the firmware via esp_rmaker_cmd_register(). Sending an unregistered ID causes the device to return ESP_RMAKER_CMD_STATUS_NOT_FOUND (status 4). Valid range: 0–65535.
  • data may be a string or a JSON object.
  • timeoutSeconds may be omitted (backend default 30), set to -1 for no expiry until the node reports success/failure, or 1–2592000 otherwise.
  • isBase64: true marks data as base64-encoded binary content.
  • override: true replaces any pending request of the same cmdId for a node.
interface ESPCmdRespSendRequest {
    cmdId: number;
    data: string | Record<string, unknown>;
    isBase64?: boolean;
    nodeIds: string[];
    override?: boolean;
    timeoutSeconds?: number;
}

Properties

cmdId: number
data: string | Record<string, unknown>
isBase64?: boolean
nodeIds: string[]
override?: boolean
timeoutSeconds?: number