Skip to content

Command & Control

iRis Cloud RPC (Remote Procedure Call) enables command exchange from the platform to devices through server-side RPC. The platform sends instructions to a device and can optionally wait for the device's response.

The platform sends a command to a device — turn a relay on, change a setpoint, trigger a reboot. Commands can be sent from a dashboard widget or directly via REST API.

One-WayTwo-Way
Device replyNot expectedRequired within timeout
Use caseFire-and-forget commands (turn on LED)Commands that need confirmation or a result
REST response200 OK when iRis Cloud sent the command to the device — no visibility into whether the device processed it or succeededDevice’s reply payload

Lightweight RPC is short-lived and memory-resident. If the device is offline when the command is sent, the command is lost. Good for real-time control of always-connected devices.

Persistent RPC is stored in the database with a configurable TTL. If the device is offline, the command waits until the device reconnects. Good for devices with intermittent connectivity or power-saving modes.

FieldRequiredDescription
methodYesCommand name, e.g. setTemperature
paramsYesJSON parameters. Use {} if none.
timeoutNoMilliseconds to wait for delivery (default: 10 000, min: 5 000)
expirationTimeNoEpoch ms timestamp — overrides timeout
persistentNotrue to store in DB and survive device offline (default: false)
retriesNoRetry attempts for persistent RPC on timeout
additionalInfoNoMetadata attached to persistent RPC records

Persistent commands move through a state machine. Each transition updates the persistent RPC status so you can track command progress.

StateMeaning
QUEUEDSaved; awaiting delivery
SENTPlatform sent to device
DELIVEREDDevice acknowledged (terminal for one-way)
SUCCESSFULDevice replied (terminal for two-way)
TIMEOUTDelivery timed out; retrying if retries remain
EXPIREDTTL elapsed before delivery
FAILEDAll retries exhausted

Control widgets such as command buttons, switches, and value controls send server-side RPC commands using the same REST API under the hood. You configure the method name and parameters directly in the widget settings — no code required.

Environment VariableDefaultDescription
ACTORS_RPC_MAX_RETRIES5Max delivery retries for persistent RPC
ACTORS_RPC_SUBMIT_STRATEGY_TYPEBURSTRPC submit strategy: BURST, SEQUENTIAL_ON_ACK_FROM_DEVICE, or SEQUENTIAL_ON_RESPONSE_FROM_DEVICE
MQTT_TIMEOUT10000MQTT delivery timeout (ms)
COAP_TIMEOUT10000CoAP delivery timeout (ms)
LWM2M_TIMEOUT120000LwM2M delivery timeout (ms)
SQL_TTL_RPC_ENABLEDtrueEnable automatic cleanup of expired persistent RPCs
SQL_RPC_TTL_CHECKING_INTERVAL7200000How often expired RPCs are cleaned up (ms)