Devices & room

Camera mapping

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

Lights only one LED of a device, for mapping the room with a camera; {end: true} goes back to the show. Stops by itself after 5 s without news. Also over the WebSocket.

Request body application/json

devicestring
ledinteger

The LED to light; -1: all dark.

levelnumber
endboolean

Back to the show.

Responses

200OKapplication/json
oktruerequired
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 POST 'http://localhost:8080/api/map' \
  -H 'content-type: application/json' \
  -d '{
  "device": "d4k2x9",
  "led": 17
}'
Response
{
  "ok": true
}
Edit on GitHub