Change a device
/api/devices/{id}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
idstringrequiredA device id (d…).
Request body application/json
namestringhoststringledsintegerddpPortintegerenabledbooleanmaxAmpsnumberCaps brightness to the power supply.
0 to 500mAperLednumber5 to 200protocolstring"ddp" "e131" "artnet"universeinteger | nullgoveeModestring"color" "segments"goveeSegmentsinteger | nulllightLatencyMsinteger | nullLight timing: this light's own delay, 0-500 ms, instead of the estimate; null: estimated again.
0 to 500lightobjectSmart light options: music (Yeelight), perZone (Kasa strip), rtPort (Twinkly).
hueFastbooleanHue: fast mode (Entertainment streaming).
hueAreastringHue: the entertainment area for fast mode.
Responses
200OKapplication/json
idstringrequiredd…
namestringrequiredhoststringrequiredIts address (virtual for a virtual room).
kindstringLeft out for WLED.
"govee" "openrgb" "hue" "nanoleaf" "lifx" "wiz" "kasa" "yeelight" "twinkly" "dmx"ledsintegerddpPortintegerenabledbooleanvirtualbooleanprotocolstring"ddp" "e131" "artnet"universeintegermaxAmpsnumber0 to 500mAperLednumber5 to 200goveeModestring"color" "segments"goveeSegmentsintegerlightLatencyMsintegerThis light's own delay set by hand, 0-500 ms (light timing). Left out: estimated.
0 to 500lightobjectSmart lights: what was found (for example zones) and their options.
hueobjectHue bridges only.
nanoleafobjectNanoleaf only.
fixturesobject[]DMX devices only.
healthobject | null400The body isn't valid JSON, or a value is wrong.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
403Locked, or not allowed.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
404No such id.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
curl -X PATCH 'http://localhost:8080/api/devices/d4k2x9' \
-H 'content-type: application/json' \
-d '{
"name": "TV backlight",
"maxAmps": 4
}'const res = await fetch("http://localhost:8080/api/devices/d4k2x9", {
method: "PATCH",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"name": "TV backlight",
"maxAmps": 4
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.patch(
"http://localhost:8080/api/devices/d4k2x9",
json={
"name": "TV backlight",
"maxAmps": 4
},
)
print(res.json()){
"id": "d4k2x9",
"name": "Desk strip",
"host": "192.168.1.42",
"ddpPort": 4048,
"leds": 120,
"enabled": true
}{
"error": "Protocol is ddp, e131 or artnet"
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}{
"error": "No such device"
}