POST
/
v1.0.0
/
hvacs
/
{hvacId}
/
commands
/
schedule
curl --request POST \
  --url https://api.energy-hub.io/v1.0.0/hvacs/{hvacId}/commands/schedule \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "schedules": [
    {
      "mode": "HEAT",
      "start": {
        "time": "00:00",
        "day": "MONDAY"
      },
      "temperature": 21.1,
      "end": {
        "time": "00:00",
        "day": "MONDAY"
      }
    }
  ]
}'
{
  "createdAt": "2023-11-07T05:31:56Z",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "state": "PENDING",
  "type": "SET_TEMPERATURE",
  "userId": "896f9d5a-b618-48a2-98ae-957059bf1bc9",
  "deviceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

X-API-KEY
string
header
required

API key used for authorization and authentication.

Path Parameters

hvacId
string
required

Hvac ID

Body

application/json

New schedule to set. UTC expected.

schedules
object[]
required

The list of schedule events.

Response

200
application/json
Successful operation
createdAt
string
required

The timestamp when command is created.

id
string
required

The ID of the command.

state
enum<string>
required

The state of the command.

  • PENDING - Command is waiting to be executed.
  • FAILED - Execution of command has failed.
  • EXECUTED - Command has been executed successfully.
Available options:
PENDING,
EXECUTED,
FAILED
type
enum<string>
required

The name of the command type to execute.

Available options:
SET_TEMPERATURE,
SET_MODE,
SET_SCHEDULE
userId
string
required

The ID of the user.

deviceId
string
required

The ID of the vehicle.