Commands
Commands allow backend services to request device-side actions. In Infuse-IoT Cloud, command workflows are represented by RPC messages.
Use RPC when a backend integration needs to trigger device behavior, request a reading, update runtime behavior, or invoke another command supported by the device firmware.
Commands In The Console
Open Infuse IoT > Commands to dispatch a manual RPC. You can use:
| Mode | Use |
|---|---|
| Guided | Enter device ID, command name or command ID, optional timeout values, string params, and optional encoded params. |
| Raw JSON | Provide the command request body directly. |
You can also open a device, select RPCs, and dispatch a command with the device ID prefilled.
The console validates that:
- device ID is a 16-character hex string,
- either command name or command ID is provided,
- command ID is at most
65535, - timeout values are non-negative integers,
- send wait timeout is at most
86400000milliseconds.
After dispatch, open the RPC detail page to inspect status, request params, response payload, downlink message details, and target device context.
RPC Flow
- Confirm the target device exists with
GET /device/deviceId/{deviceId}. - Check state or last route if your command requires the device to have communicated recently.
- Build the RPC request using the active RPC definitions for the device firmware.
- Send the RPC with
POST /rpc. - Store the returned RPC message ID.
- Poll or read the message with
GET /rpc/{id}to inspect delivery and response state.
Wait Timeout And Route Reuse
POST /rpc accepts a sendWaitTimeoutMs value. If it is 0 or omitted, Infuse-IoT Cloud sends the RPC immediately using the device's last known route. If it is set to a positive value, Infuse-IoT Cloud can wait for the device to send a packet before attempting the downlink.
Choose the timeout based on your device's power and connectivity model:
| Device model | Recommended behavior |
|---|---|
| Always connected | Send immediately or use a short wait. |
| Low-power periodic wake | Use a wait timeout aligned with the expected wake interval. |
| Intermittent or field devices | Read last route and state before queuing operationally important commands. |
Definition-Driven Commands
RPC definitions describe the commands, structs, and enums used to encode and decode RPC payloads. Keep backend command builders aligned with the device firmware version and the definitions registered in Infuse-IoT Cloud.
Use Definitions to understand the RPC definition registry.
Useful Endpoints
| Task | Endpoint |
|---|---|
| List RPC messages | GET /rpc |
| Send an RPC | POST /rpc |
| Read one RPC message | GET /rpc/{id} |
| Get latest RPC definitions | GET /defs/rpc |
| Get RPC definitions by version | GET /defs/rpc/{version} |
| Add RPC definition version | POST /defs/rpc |
For exact request and response schemas, see the Infuse-IoT Cloud API reference.