Infuse IoT

Commands

Send RPC commands to devices and inspect delivery state.

Commands allow backend services to request device-side actions. In Infuse IoT, 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.

RPC Flow

  1. Confirm the target device exists with GET /device/deviceId/{deviceId}.
  2. Check state or last route if your command requires the device to have communicated recently.
  3. Build the RPC request using the active RPC definitions for the device firmware.
  4. Send the RPC with POST /rpc.
  5. Store the returned RPC message ID.
  6. 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 sends the RPC immediately using the device's last known route. If it is set to a positive value, Infuse IoT 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 modelRecommended behavior
Always connectedSend immediately or use a short wait.
Low-power periodic wakeUse a wait timeout aligned with the expected wake interval.
Intermittent or field devicesRead 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.

Use Definitions to understand the RPC definition registry.

Useful Endpoints

TaskEndpoint
List RPC messagesGET /rpc
Send an RPCPOST /rpc
Read one RPC messageGET /rpc/{id}
Get latest RPC definitionsGET /defs/rpc
Get RPC definitions by versionGET /defs/rpc/{version}
Add RPC definition versionPOST /defs/rpc

For exact request and response schemas, see the Infuse IoT API reference.