What is a Command?

A Command represents an instruction to an Entity. It can be directly triggered (sent to the device or vehicle), or scheduled at a specific trigger time. Commands are key-value pairs, where the key identifies the setting and the value represents the new state for that setting.

Limited Availability Currently, the Commands API is only available for Entities of type EV, of certain manufacturers.

Example

The following Command triggers an EV to start charging:

{
    "ChargeState": "START"
}

Trigger a single Command

To trigger a Command, we’re using the Trigger a Command endpoint.

Parameters

entityId required

The ID of the Entity that you want to send the Command to.

ignoreCooldown optional

Used for bypassing the cooldown timer that is implemented to safeguard the Entity from receiving too many or conflicting commands. It is generally recommended to allow for the cooldown period and verify the Entity’s state through subsequent readings, which may take a while to reflect the execution of your latest command. Setting ignoreCooldown to true should be used cautiously and only when necessary.


Example

The following request triggers an EV to start charging at 10 AM (UTC) and stop charging at 12 PM (UTC).

curl --request POST \
     --url https://platform.realto.io/api/v1/entities/../readings \
     # Headers Omitted
     --data '
{
  "commands": {
    "Charging": "START"
  }
}
'

Scheduling multiple Commands

To schedule Commands, we’re using the Schedule Commands endpoint.

Parameters

entityId required

The ID of the Entity that you want to send the Command to.

ignoreCooldown optional

Used for bypassing the cooldown timer that is implemented to safeguard the Entity from receiving too many or conflicting commands. It is generally recommended to allow for the cooldown period and verify the Entity’s state through subsequent readings, which may take a while to reflect the execution of your latest command. Setting ignoreCooldown to true should be used cautiously and only when necessary.


Example

The following request triggers an EV to start charging at 10 AM (UTC) and stop charging at 12 PM (UTC).

curl --request POST \
     --url https://platform.realto.io/api/v1/entities/../readings \
     # Headers Omitted
     --data '
[
  {
    "commands": {
        "Charging": "START"
    },
    "triggerTime": "2024-01-01 10:00:00Z"
  },

  {
    "commands": {
        "Charging": "STOP"
    },
    "triggerTime": "2024-01-01 12:00:00Z"
  },
]
'

Access the full list of available parameters and endpoints through the API References.