Introduction
Quickstart
Make a key, read your device and change one zone's temperature.
This takes about five minutes. You need an Orion account with a device on it.
-
Make an API key
Sign in and open API keys. Create a key and give it a name you will recognise, such as
home-script.The full key starts with
os_and is shown only once. Copy it now. If you lose it, revoke it and make a new one. -
Save the key in your shell
Keep the key out of your code. Export it as an environment variable:
ShellThe examples below read it from
ORION_API_KEY. -
List your devices
Ask for the devices on your account.
The answer, trimmed:
JSONKeep the
idof the device. It is thedevice_idin every other device request. Theserial_numberis for display only; requests do not take it. -
Read the device's live state
Put the device id in the path.
The answer, trimmed:
JSONzones[].tempis the target you set.status.zones[].tempis the temperature measured in the bed. -
Set one zone's temperature
Set
zone_ato 20 °C. The change takes effect right away.The answer lists every zone of the device after the change:
JSON
Next steps
- Learn which side is
zone_ain Devices and zones. - Change every night instead of right now: Schedules.
- Handle failures: Errors and Rate limits.
- See every operation in the API reference.