DMX
Change a fixture
PATCH
/api/devices/{id}/fixtures/{fid}Admin. Needs an unlock token (
x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.Changes the fields given.
Path parameters
idstringrequiredA DMX device id (d…).
fidstringrequiredA fixture id (f…).
Request body application/json
profilestringrgb, rgbw, rgba, dimmer, strobe, moving-head, moving-head-16, moving-head-wheel, moving-head-wheel-16, laser, fog or custom.
Default
"rgb"addressintegerThe first DMX channel.
1 to 512namestringchannelsstring[]custom only: channel types (GET /api/dmx/profiles), or fixed:<value>.
patternstringMoving heads.
One of
"circle" "figure8" "sweep" "point" "still"targetnumber[][x, y] in the room, for point.
cyclenumberBeats per loop.
1 to 64sizenumber0 to 0.5phasenumber0 to 1homenumber[][pan, tilt], 0 to 1.
panRangenumberDegrees.
90 to 720tiltRangenumberDegrees.
90 to 360wheelobject[]gobosinteger[]patternsinteger[]shutterobject | nullxnumberWhere it is in the room, 0 to 16.
ynumber0 to 9.
Responses
200OKapplication/json
fixtureobjectrequiredA DMX fixture; also has any FixtureInput fields that were set.
warningsstring[]requiredFixtures whose channels overlap.
400The body isn't valid JSON, or a value is wrong.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
403Locked, 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 PATCH 'http://localhost:8080/api/devices/id/fixtures/fid' \
-H 'content-type: application/json' \
-d '{
"address": 17
}'const res = await fetch("http://localhost:8080/api/devices/id/fixtures/fid", {
method: "PATCH",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"address": 17
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.patch(
"http://localhost:8080/api/devices/id/fixtures/fid",
json={
"address": 17
},
)
print(res.json())Response
{
"fixture": {
"id": "f7h2m0",
"profile": "moving-head",
"name": "Left head",
"address": 1,
"pattern": "figure8"
},
"warnings": []
}{
"error": "The DMX address is 1 to 512"
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}{
"error": "No such fixture"
}