Scenes & schedules
Apply a scene
POST
/api/scenes/{id}/applyGuest area “scenes”. Open unless a PIN lock is set and guests aren't allowed this area (
settings.guest.scenes); then it needs an unlock token.Applies the scene and turns the lights on. Answers the show.
Path parameters
idstringrequiredA scene id, for example party.
Responses
200OKapplication/json
powerbooleanThe lights are on.
modestringauto picks effects from the music; manual keeps effect.
One of
"auto" "manual"effectstringThe effect shown in manual mode.
stylestringauto or a style id (party, chill, …).
palettestringauto or a palette id (sunset, ocean, …).
everyBeatsintegerAutomatic mode changes effect at most every this many beats, 1 to 64.
1 to 64speednumber0.1 to 4.
0.1 to 4paramsmap of objectPer-effect settings, by effect id.
layerobject | null403Locked, or not allowed.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
404No such id.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
Request
curl -X POST 'http://localhost:8080/api/scenes/party/apply'const res = await fetch("http://localhost:8080/api/scenes/party/apply", {
method: "POST",
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"http://localhost:8080/api/scenes/party/apply",
)
print(res.json())Response
{
"power": true,
"mode": "auto",
"effect": "shock",
"style": "auto",
"palette": "auto",
"everyBeats": 8,
"speed": 1,
"params": {},
"layer": null
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}{
"error": "No such scene"
}