Devices

Devices and zones

How a device, its zones and the people on it appear in the API.

A device is one Orion bed. Each device has zones: sides whose temperature is set on its own. This page explains how they are named, how temperatures work, and who may change what.

Devices

List devices

List devices is the starting point. It returns every device you can access:

GET /v1/devices
{
	"devices": [
		{
			"id": "3f6c2a9e-8b1d-4c57-9a0e-2d4b7f1c6e85",
			"serial_number": "SN0012345",
			"name": "Bedroom",
			"zones": [
				{ "id": "zone_a", "user": { "id": "9b2e4f10-5a7c-4d3b-8e61-0c9d2a4b7f33" } },
				{ "id": "zone_b", "user": { "id": "c41d8e27-3f6a-4b90-a2d5-7e18f0b6c954" } }
			],
			"temperature_range": { "min": 10, "max": 45 },
			"permissions": {
				"role": "owner",
				"can": {
					"device": { "control_zones": true, "set_led": true, "set_quiet_mode": true },
					"sleep": { "move_others": true, "away_others": true, "edit_others_schedules": true }
				}
			}
		}
	],
	"shared_with": [{ "user": { "id": "c41d8e27-3f6a-4b90-a2d5-7e18f0b6c954" }, "is_away": false }]
}
JSON
FieldWhat it is
idThe device id. Every operation names a device by this id, as device_id.
serial_numberThe serial printed on the device. For display only: operations do not take it.
zonesThe device's zones, and the user on each one, if any.
temperature_rangeThe model's temperature range in °C.
permissionsYour role on this device, and in can, what you may do.
shared_withThe people you share a device with. Each user.id is a valid user_id for the operations that take one.

Get live device state

Get live device state returns what one device is doing now: each zone's target and on/off state, the measured temperature in the bed, any active thermal relief, the water fill, LED brightness, quiet mode, whether the bed is online, sensor readings and network details.

GET /v1/devices/{device_id}

Zones and sides

A two-zone device has zone_a and zone_b. Which side is which depends on where you stand:

Viewpointzone_azone_b
Standing at the foot of the bed, facing itThe rightThe left
Lying in the bed, on your backYour leftYour right

When someone says "my left side", they usually mean the lying-down view, which is zone_a. Better still, match by person: each zone in List devices shows the user on it.

Temperatures

  • Every temperature is in degrees Celsius, in requests and in responses.
  • A zone's temp is its target, the temperature you asked for. In Get live device state, status.zones[].temp is the measured temperature in the bed. The two differ while the device heats or cools.
  • Each device clamps a target to its own range. That is usually the model range in temperature_range, but a device can be set to a wider range of its own. So the API does not refuse a value only because it is outside temperature_range; the bed brings it into its range.
  • Timeline events are stricter: a temperature outside temperature_range is refused.

Change zones now

ToUse
Change one zoneSet zone
Change several zones of one device togetherSet multiple zones
Heat or cool as hard as possible for a whileStart thermal relief

Set zone

Set zone changes one zone of one device.

PUT /v1/devices/{device_id}/zones/{zone_id}

Send temp, on, or both. An empty update answers 400 invalid.

{ "temp": 18.5, "on": true }
JSON

Set multiple zones

Set multiple zones changes every listed zone in one update to the device, so both sides change together. Each zone needs temp or on, each zone may appear once, and zones you leave out stay as they are:

PUT /v1/devices/{device_id}/zones
{
	"zones": [
		{ "id": "zone_a", "temp": 18 },
		{ "id": "zone_b", "temp": 24 }
	]
}
JSON

Set zone and Set multiple zones both answer with every zone of the device after the change. To change zones later, every night, or for one night, see Timeline events and Schedules.

Thermal relief

Thermal relief runs one or more zones at full heat (about 45 °C) or full cooling (about 10 °C) for a while, then puts the zones back as they were. Use it for "warm the bed up now"; use Set zone for a specific temperature.

Start thermal relief

Start thermal relief starts it on the zones you name.

POST /v1/devices/{device_id}/thermal-relief
{ "type": "heat", "zones": ["zone_a"], "duration_minutes": 20 }
JSON

type is heat or cool. duration_minutes is 1 to 120 and defaults to 30.

Cancel thermal relief

Cancel thermal relief stops it early and restores the previous state. Send zones to cancel only some zones, or no body to cancel all of them.

DELETE /v1/devices/{device_id}/thermal-relief

LED brightness and quiet mode

Update device settings sets the device's LED brightness and quiet mode right away. Send at least one of them.

PATCH /v1/devices/{device_id}/settings
{ "led_brightness": 0, "quiet_mode": true }
JSON

led_brightness is 0 (off) to 100. Quiet mode makes the fan and pump quieter and gentler. Anyone on the device may change these.

Who sleeps where

Each zone has at most one person on it. Sleep configuration covers moving people: going away, coming back, taking a zone, swapping sides and splitting a device's zones.

Roles and permissions

Each person on a device has a role:

RoleCan
ownerEverything on the device, including acting for the other people on it.
adminAct for the other people on the device: set them away, move them, and change their schedules.
guestControl the zones, LED brightness and quiet mode; move and set away only themselves; view and edit only their own schedule.

permissions.can lists what you may do on each device, grouped by area (device, sleep, and others). Every key is always present, as true or false. Read it before you offer an action, rather than working it out from the role.

Operations that take a user_id act on you when you leave it out. To act on someone else, pass their id from shared_with; you need the owner or admin role on a device you share with them. Without it, the request answers 403 forbidden.