Commands handling

An authenticated Realino-compliant control device can execute authorized requests to get command data from the Realer platform. This command data would be locally used by the control device to execute actions in the physical world.

Note: The command data that a control device gets refers to the state of actuators as set by users in the control panel on Realer.

Getting control commands from Realer

cURL

              curl "https://www.therealer.com/control_devices/1/commands.realino" \
                -H 'Authorization: Token b11db7f6c816568eb3b156df3aeaa5'
            
GET /control_devices/{control_device_id}/commands.realino

Retrieve control command data from Realer.

Request headers
Authorization
(required)

The authorization token to access resources on behalf of the control device. You get this at the time of authentication.

Type: String

Example: Token b11db7f6c816568eb3b156df3aeaa5

Request parameters
control_device_id
(required)

ID of control device that needs to access data. You get this at the time of authentication.

Type: Integer

Example: 12345

Responses
Code Description
200

OK (Success)

Example value (application/json)


                      {
                        "commands": [
                          {
                            "id": 1,
                            "value": 0.0,
                            "value_type": "binary",
                            "kind": "relay",
                            "pin_port": "6"
                          },
                          {
                            "id": 2,
                            "value": 18.5,
                            "value_type": "customary",
                            "kind": "relay",
                            "pin_port": "9"
                          }
                        ]
                      }
                    
400

Bad Request (Client Error)

Example value (application/json)


                        {
                          "error": "The initialization of control device actuators was not successful for the following reasons: the device was not found."
                        }
                      
403

Forbidden (Client Error)

Example value (application/json)


                        {
                          "error": "You can not view the control device for the following reasons: the control device access token does not match."
                        }
                      

Example value (application/json)


                        {
                          "error": "You can not view the control device for the following reasons: the control device access token has expired."
                        }
                      

Example value (application/json)


                        {
                          "error": "You can not view the control device for the following reasons: the maximum number of accesses to the entity in a period has been reached (one access every 5 seconds is the maximum amount allowed)."
                        }
                      
In order to use Realer you should enable JavaScript in your browser.