Skip to content
Stand with Ukraine flag

RPC Call Request

Use this node to send a Remote Procedure Call (RPC) from the server to a device and receive its response as the outgoing message — for example, reading a sensor value on demand, toggling a GPIO pin, or triggering a firmware check on a device that is currently connected.

  • Timeout in seconds — required. Maximum time to wait for the device response before failing. Default: 60. Used when no explicit expiration time is present in the message metadata.

The message data must contain two required fields:

  • method — the RPC method name to call on the device.
  • params — the parameters to pass to the method (any JSON value).

Optional fields can be provided in the message metadata:

KeyTypeDescription
onewaybooleanIf true, no response is expected (fire-and-forget). Default: false.
persistentbooleanIf true, the request is persisted. Default: false.
requestUUIDstringUnique request identifier for tracking. Auto-generated if absent.
originServiceIdstringOriginating service for routing the response.
expirationTimelongExpiration timestamp (ms). Calculated from timeout if absent.
retriesintegerNumber of retry attempts.

Optional fields in message data:

KeyTypeDescription
requestIdintegerRequest identifier for matching the response. Random if absent.
additionalInfoJSONExtra metadata attached to the request.
  1. Validate that the originator is a DEVICE. If not, route via Failure.
  2. Validate that message data contains method and params. If either is missing, route via Failure.
  3. Collect optional parameters from message data and metadata and build the RPC request.
  4. Send the RPC to the device and acknowledge the original message immediately.
  5. On device response:
    • Success: replace message data with the device response; route via Success.
    • Failure: route via Failure with an error description.
ConnectionCondition
SuccessDevice responded successfully. Outgoing message data contains the device response.
FailureOriginator is not a DEVICE, missing method or params, device timeout, or device returned an error.

Originator: DEVICE.

{
"method": "setGpio",
"params": {
"pin": 7,
"value": 1
}
}
{
"timeoutInSeconds": 30
}

Response from device (outgoing message data):

{
"success": true
}

Routes via Success.


Metadata: { "oneway": "true" } | Data: { "method": "reboot", "params": {} } | Config: { "timeoutInSeconds": 60 }.

Outgoing message data: {} (no response expected). Routes via Success.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "TbSendRpcRequestNodeConfiguration",
"type": "object",
"required": ["timeoutInSeconds"],
"additionalProperties": false,
"properties": {
"timeoutInSeconds": {
"type": "integer",
"description": "Maximum time to wait for device response in seconds."
}
}
}