State

Get the LED layout

GET/api/layout
Open. Open to everyone who can reach Tempolight.

Where every LED is, in the order the preview frames on the WebSocket use: positions, the shape each LED belongs to and each device's range.

Responses

200OKapplication/json
Ninteger

LEDs in all.

xnumber[]
ynumber[]
shapeinteger[]

Shape index per LED.

chainStartany

Where each device's LEDs start.

rangesobject[]
shapesobject[]
Request
curl 'http://localhost:8080/api/layout'
Response
{
  "N": 0,
  "x": [
    0
  ],
  "y": [
    0
  ],
  "shape": [
    0
  ],
  "chainStart": null,
  "ranges": [
    {
      "dev": "string",
      "start": 0,
      "end": 0
    }
  ],
  "shapes": [
    {
      "type": "line",
      "name": "Desk strip",
      "count": 120,
      "dev": "d4k2x9",
      "rot": 0,
      "start": 0,
      "rev": false,
      "from": null,
      "zone": null,
      "pts": [
        [
          1.5,
          6
        ],
        [
          14.5,
          6
        ]
      ]
    }
  ]
}
Edit on GitHub