Devices & room

Change a device

PATCH/api/devices/{id}
Admin. Needs an unlock token (x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.

Changes its name, address, LED count, protocol, power limit and per-kind options. Hue: {hueFast: true} turns on fast mode (Entertainment streaming); a bridge paired before needs its link button pressed first, and the answer says so.

Path parameters

idstringrequired

A device id (d…).

Request body application/json

namestring
hoststring
ledsinteger
ddpPortinteger
enabledboolean
maxAmpsnumber

Caps brightness to the power supply.

0 to 500
mAperLednumber
5 to 200
protocolstring
One of "ddp" "e131" "artnet"
universeinteger | null
goveeModestring
One of "color" "segments"
goveeSegmentsinteger | null
lightLatencyMsinteger | null

Light timing: this light's own delay, 0-500 ms, instead of the estimate; null: estimated again.

0 to 500
lightobject

Smart light options: music (Yeelight), perZone (Kasa strip), rtPort (Twinkly).

hueFastboolean

Hue: fast mode (Entertainment streaming).

hueAreastring

Hue: the entertainment area for fast mode.

Responses

200OKapplication/json
idstringrequired

d…

namestringrequired
hoststringrequired

Its address (virtual for a virtual room).

kindstring

Left out for WLED.

One of "govee" "openrgb" "hue" "nanoleaf" "lifx" "wiz" "kasa" "yeelight" "twinkly" "dmx"
ledsinteger
ddpPortinteger
enabledboolean
virtualboolean
protocolstring
One of "ddp" "e131" "artnet"
universeinteger
maxAmpsnumber
0 to 500
mAperLednumber
5 to 200
goveeModestring
One of "color" "segments"
goveeSegmentsinteger
lightLatencyMsinteger

This light's own delay set by hand, 0-500 ms (light timing). Left out: estimated.

0 to 500
lightobject

Smart lights: what was found (for example zones) and their options.

hueobject

Hue bridges only.

nanoleafobject

Nanoleaf only.

fixturesobject[]

DMX devices only.

healthobject | null
400The body isn't valid JSON, or a value is wrong.application/json
errorstringrequired

What went wrong, in a sentence for people.

403Locked, or not allowed.application/json
errorstringrequired

What went wrong, in a sentence for people.

404No such id.application/json
errorstringrequired

What went wrong, in a sentence for people.

Request
curl -X PATCH 'http://localhost:8080/api/devices/d4k2x9' \
  -H 'content-type: application/json' \
  -d '{
  "name": "TV backlight",
  "maxAmps": 4
}'
Response
{
  "id": "d4k2x9",
  "name": "Desk strip",
  "host": "192.168.1.42",
  "ddpPort": 4048,
  "leds": 120,
  "enabled": true
}
Edit on GitHub