Lights & show

Like, ban or tune an effect

PATCH/api/effects/{id}
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.

pref: 1 likes it and -1 bans it for automatic mode (0: neither). params sets its speed, intensity, hue, saturation and mirror; params: null resets them.

Path parameters

idstringrequired

An effect id.

Request body application/json

prefinteger

1 like, -1 ban, 0 neither.

One of 1 0 -1
paramsobject | null

Responses

200OKapplication/json
idstring
prefinteger
paramsobject | null
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 PATCH 'http://localhost:8080/api/effects/laser' \
  -H 'content-type: application/json' \
  -d '{
  "pref": 1
}'
Response
{
  "id": "laser",
  "pref": 1,
  "params": null
}
Edit on GitHub