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.
Configuration
Section titled “Configuration”- 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.
Message processing
Section titled “Message processing”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:
| Key | Type | Description |
|---|---|---|
oneway | boolean | If true, no response is expected (fire-and-forget). Default: false. |
persistent | boolean | If true, the request is persisted. Default: false. |
requestUUID | string | Unique request identifier for tracking. Auto-generated if absent. |
originServiceId | string | Originating service for routing the response. |
expirationTime | long | Expiration timestamp (ms). Calculated from timeout if absent. |
retries | integer | Number of retry attempts. |
Optional fields in message data:
| Key | Type | Description |
|---|---|---|
requestId | integer | Request identifier for matching the response. Random if absent. |
additionalInfo | JSON | Extra metadata attached to the request. |
Message processing algorithm
Section titled “Message processing algorithm”- Validate that the originator is a
DEVICE. If not, route viaFailure. - Validate that message data contains
methodandparams. If either is missing, route viaFailure. - Collect optional parameters from message data and metadata and build the RPC request.
- Send the RPC to the device and acknowledge the original message immediately.
- On device response:
- Success: replace message data with the device response; route via
Success. - Failure: route via
Failurewith an error description.
- Success: replace message data with the device response; route via
Output connections
Section titled “Output connections”| Connection | Condition |
|---|---|
Success | Device responded successfully. Outgoing message data contains the device response. |
Failure | Originator is not a DEVICE, missing method or params, device timeout, or device returned an error. |
Examples
Section titled “Examples”Example 1 — Two-way RPC: set GPIO pin
Section titled “Example 1 — Two-way RPC: set GPIO pin”Originator: DEVICE.
{ "method": "setGpio", "params": { "pin": 7, "value": 1 }}{ "timeoutInSeconds": 30}Response from device (outgoing message data):
{ "success": true}Routes via Success.
Example 2 — One-way RPC: reboot device
Section titled “Example 2 — One-way RPC: reboot device”Metadata: { "oneway": "true" } | Data: { "method": "reboot", "params": {} } | Config: { "timeoutInSeconds": 60 }.
Outgoing message data: {} (no response expected). Routes via Success.
JSON schema
Section titled “JSON schema”{ "$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." } }}