Device catalog

After OAuth client credentials authentication, a control device can retrieve its command and sensor catalog through the HTTPS iot/v1 catalog endpoints by providing the returned Bearer access token.

Command data describes the actuator state configured through the control panel. Sensor data describes the expected sensor inputs that the device can report through feed-data ingestion.

Commands

cURL
curl "https://api.therealer.com/iot/v1/devices/12345/commands" \
  -H 'Authorization: Bearer b11db7f6c816568eb3b156df3aeaa5'
GET /iot/v1/devices/{device_id}/commands

Retrieve all commands registered for the authenticated control device.

Request headers
Authorization
(required)

The Bearer access token obtained from the OAuth token endpoint.

Type: String

Example: Bearer b11db7f6c816568eb3b156df3aeaa5

Path parameters
device_id
(required)

ID (id) of the authenticated control device.

Type: Integer

Example: 12345

Responses

200 OK

JSON
{
  "code": 2000,
  "commands": [
    {
      "id": 1,
      "value": "0.0",
      "value_type": "NumericRange",
      "kind": "relay",
      "pin_port": "6"
    }
  ]
}
GET /iot/v1/devices/{device_id}/commands/{id}

Retrieve one command. The response keeps the same array-based commands payload shape as the collection endpoint.

Sensors

cURL
curl "https://api.therealer.com/iot/v1/devices/12345/sensors" \
  -H 'Authorization: Bearer b11db7f6c816568eb3b156df3aeaa5'
GET /iot/v1/devices/{device_id}/sensors

Retrieve all sensors registered for the authenticated control device.

Request headers
Authorization
(required)

The Bearer access token obtained from the OAuth token endpoint.

Type: String

Example: Bearer b11db7f6c816568eb3b156df3aeaa5

Path parameters
device_id
(required)

ID (id) of the authenticated control device.

Type: Integer

Example: 12345

Responses

200 OK

JSON
{
  "code": 2000,
  "sensors": [
    {
      "id": 1,
      "kind": "thermistor",
      "qc": "celsius_temperature",
      "mu": "degree_celsius:0",
      "pin_port": "5"
    }
  ]
}
GET /iot/v1/devices/{device_id}/sensors/{id}

Retrieve one sensor. The response keeps the same array-based sensors payload shape as the collection endpoint.

Firmware rules

  • Read catalog data after authentication and after reconnecting from a long offline interval.
  • Use command values as desired state from Realer, not proof that the physical actuator already changed.
  • Report physical command outcomes and sensor readings through feed-data ingestion.
  • If a stored command or sensor cannot be represented by the current device contract, the item keeps its id and exposes error instead of normal fields.