Lights & show

Change the show

PATCH/api/show
Guest area “effects”. Open unless a PIN lock is set and guests aren't allowed this area (settings.guest.effects); then it needs an unlock token.

Changes any of the mode, effect, style, palette, how often effects change, speed and the accent layer. Setting effect alone switches to manual mode. Answers the show.

Request body application/json

modestring
One of "auto" "manual"
effectstring

An effect id. Setting it alone switches to manual mode.

stylestring

auto or a style id.

palettestring

A palette id.

everyBeatsinteger
1 to 64
speednumber
0.1 to 4
layerobject | null

Responses

200OKapplication/json
powerboolean

The lights are on.

modestring

auto picks effects from the music; manual keeps effect.

One of "auto" "manual"
effectstring

The effect shown in manual mode.

stylestring

auto or a style id (party, chill, …).

palettestring

auto or a palette id (sunset, ocean, …).

everyBeatsinteger

Automatic mode changes effect at most every this many beats, 1 to 64.

1 to 64
speednumber

0.1 to 4.

0.1 to 4
paramsmap of object

Per-effect settings, by effect id.

layerobject | 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.

Request
curl -X PATCH 'http://localhost:8080/api/show' \
  -H 'content-type: application/json' \
  -d '{
  "effect": "laser"
}'
Response
{
  "power": true,
  "mode": "auto",
  "effect": "shock",
  "style": "auto",
  "palette": "auto",
  "everyBeats": 8,
  "speed": 1,
  "params": {},
  "layer": null
}
Edit on GitHub