DMX

Add a fixture

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

Adds a fixture to a DMX universe. Each fixture is a point of the device's shape in the room; x, y place it. Answers it with warnings about overlapping channels. At most 128 per universe.

Path parameters

idstringrequired

A DMX device id (d…).

Request body application/json

profilestring

rgb, rgbw, rgba, dimmer, strobe, moving-head, moving-head-16, moving-head-wheel, moving-head-wheel-16, laser, fog or custom.

Default "rgb"
addressinteger

The first DMX channel.

1 to 512
namestring
channelsstring[]

custom only: channel types (GET /api/dmx/profiles), or fixed:<value>.

patternstring

Moving heads.

One of "circle" "figure8" "sweep" "point" "still"
targetnumber[]

[x, y] in the room, for point.

cyclenumber

Beats per loop.

1 to 64
sizenumber
0 to 0.5
phasenumber
0 to 1
homenumber[]

[pan, tilt], 0 to 1.

panRangenumber

Degrees.

90 to 720
tiltRangenumber

Degrees.

90 to 360
wheelobject[]
gobosinteger[]
patternsinteger[]
shutterobject | null
xnumber

Where it is in the room, 0 to 16.

ynumber

0 to 9.

Responses

200OKapplication/json
fixtureobjectrequired

A DMX fixture; also has any FixtureInput fields that were set.

warningsstring[]required

Fixtures whose channels overlap.

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.

404No such id.application/json
errorstringrequired

What went wrong, in a sentence for people.

Request
curl -X POST 'http://localhost:8080/api/devices/id/fixtures' \
  -H 'content-type: application/json' \
  -d '{
  "profile": "moving-head",
  "address": 1,
  "name": "Left head",
  "pattern": "figure8",
  "x": 3,
  "y": 1
}'
Response
{
  "fixture": {
    "id": "f7h2m0",
    "profile": "moving-head",
    "name": "Left head",
    "address": 1,
    "pattern": "figure8"
  },
  "warnings": []
}
Edit on GitHub