Skip to content

Racom RPC

General rules:

  • Attribute values must never contain any of the "'\;$ characters.
  • Authentication/authorization is not part of this spec, it must be handled on another level.

Request

attribute description
method*
string
The name of the method to be called.
params
object
The value to be passed as parameter to the method.
target
string
IP address of remote device to whom device redirects a request. If target is not set, request is not redirected to remote device and it is consumed by original device.
🌄 id
string
Id used for pairing requests to response if this is not provided implicitly by the underlying protocol.
🌄 version string Specifies the versions of the protocol.

Example

{
  "method": "get_user_detail",
  "params": { "username":  "adam" },
  "target": "10.10.10.170",
  "language-code": "en"
}

Response

attribute description
result
object
The data returned by the invoked method - not exclusive with the error attribute
error
Error
Error caused by invoking the given method - not exclusive with the result and warnings attributes
warnings
[Warning]
Warnings caused by invoking the given method - not exclusive with the result and error attributes
device
Device
Miscellaneous information about the device
🌄 id
string
ID used for pairing requests to response if this is not provided implicitly by the underlying protocol
🌄 version string The protocol version

Device

attribute description
tstamp
unsigned int
The Unix timestamp of the current time of the device

Example

{
  "result": {
    "username": "adam",
    "age": 27,
    "name": "Adam"
  },
  "error": {
    "code": "rpc_server_error",
    "message_id": "hw_failure_detected"
  },
  "warnings": [
    {
      "code": "incomplete_data",
      "message_id": "incomplete_data_returned"
    }
  ],
  "device": { "tstamp": 1588757876 }
}