Devices & room

Write WLED segments

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

Writes the room's LED ranges for this controller into WLED as segments.

Path parameters

idstringrequired

A WLED device id (d…).

Responses

200OKapplication/json
segmentsobject[]
403Locked, or not allowed.application/json
errorstringrequired

What went wrong, in a sentence for people.

Request
curl -X POST 'http://localhost:8080/api/devices/id/segments'
Response
{
  "segments": [
    {
      "start": 0,
      "end": 120,
      "name": "Desk strip",
      "rev": false
    }
  ]
}
Edit on GitHub