Kistan 2.0 Doc
  • Furniture
  • Sound cables
  • Roof LED
  • Pipes
  • Inputs/Outputs
  • Mixer
  • Amplifiers
  • DALI
  • DMX
  • Roof LED
  • LMixer
  • Sound mixer defaults
  • Bar computer to Kitchen speakers
  • Server: IN-SMN
  • Server: IN-ITK
  • SSO / Login
  • Grafana
IT-Sektionen
  • Furniture
  • Sound cables
  • Roof LED
  • Pipes
  • Inputs/Outputs
  • Mixer
  • Amplifiers
  • DALI
  • DMX
  • Roof LED
  • LMixer
  • Sound mixer defaults
  • Bar computer to Kitchen speakers
  • Server: IN-SMN
  • Server: IN-ITK
  • SSO / Login
  • Grafana
IT-Sektionen
  • DMX

    • DMX Protocol
    • Fixture Types in Kistan
    • Fixtures in Kistan's LMixer
    • Fixture Config File

Fixture Config File

All fixtures accessable in LMixer should also be in a config file, located here.

Note

Currently, the nearly all of the fixtures on the master layer are listed here, other layers are not listed.

This file exists reduce maintenance for future projects. Instead of all of the projects having their own list of the fixtures in kistan, and having to update every project for every fixture, it is centralized into a single config file which needs to be maintained.

This config file is also responsible for generating Fixture types in Kistan and Fixtures in Kistan's LMixer

Whenever "Lua name" is mentioned, it refers to the variable name within LMixer

Basic format

For the full schema, see the schema

The configuration file is a standard .json file, to allow maximum interopability.

The file needs a formatVersion which specifies the version, this should be incremented for breaking changes to the schema.

keytypecomment
formatVersionnumberThe current version of the schema
fixtureTypesRecord<string, FixtureTypeSchema>The key to the record is the ID of the fixture type
fixtureRecord<string, FixtureSchema>The key to the record is just for organizational purposes within the JSON file, unnecessary usage is discouraged
fixtureGroupRecord<string, FixtureGroupSchema>The key to the record is the Lua name of the group in LMixer

ID Naming

IDs should always follow snake_case. Capital letters are allowed in names and abreviations.

When including the model name, the format is [role/category (wash, wallspot, etc)]_[model name (abreviations AOK)]

FixtureTypeSchema

Since multiple fixtures can behave the same way, FixtureType describes how a fixture maps it's channels to functions.

keytypecomment
displayNamestringHuman readable version of the name
displayNamePluralstring?For non-standard plural forms of words (Shelf->Shelves), if empty, "s" is appended to the display name
modelstring?If the fixtureType is for a specific model
descriptionstring?Optional extra information
channelsRecord<string, FixtureChannelSchema>A dictonary for what each channel maps to, the key should be the index of the dmx-channel ("1", "2", "3"). Make sure that it is 1-indexed

FixtureChannelSchema

keytypecomment
idstringAn id that helps identify what this channel does, for what ID to use, see Channel Naming
displayNamestringHuman readable name
descriptionstring?Optional extra information for documentation
lowerNibbleForChannelnumber?16bit properties are divided over two bytes, this marks that this channel is the lower nibble, and the ID stored in lowerNibbleForChannel is the channel for the upper nibble. They should have the same information, but in case if a disparity, the upperNibble takes priority
mapRangeForDisplayRangeMappingSchema?Used for displaying values to the user, maps the [0, 255] range to something else.
rangedFunctionChannelRangedFunctionSchema?Some channels behave differently in different ranges, when this is the case, rangeFunction should be used

Channel Naming

There are some default names that should be used when applicable:

NameUsage
col_redRed Color Component
col_greenGreen Color Component
col_blueBlue Color Component
col_whiteWhite Color Component
col_amberAmber Color Component
col_UVUV Color Component
col_temperatureColor Temperature
dimmerDimmers
strobeStrobing functionality
tiltTilting movements
panPanning movements
prog_macroMacros, or similar presets
prog_modeModes
prog_colorColor presets
relayRelays

The prog_ prefix (short for program_), is used for preprogrammed functions, such as color preset and movement paths that are built in.

RangeMappingSchema

Maps the 0-255 range onto another range when displaying. Most notable use case is rotations, were mapping from [0-255] to [0 degrees, 540 degrees] makes it more intutive to control.

keytypecomment
minnumberWhat 0 is mapped to
maxnumberWhat 255 is mapped to

ChannelRangedFunctionSchema

Some channels are decimated into smaller chunks, for instance a relay might use 8 bits, but only has two states. Strobing speed for lights tend to have a deadzone, for both of these, a "ranged" function is suitable. (in this case ranged means divided into ranges)

keytypecomment
minnumberThe lower bound [inclusive] of the range
maxnumberThe upper bound [inclusive] of the range
functionIDstringIdentifies what this range segment does, see Range Naming for naming guidelines
displayNamestringHuman readable name
identialWithinRangeboolean?Set to true if all the values in the range behave identically
mapRangeForDisplayRangeMappingSchema?Used for displaying values to the user, maps the [0, 255] range to something else.

Note

The ranges should not overlap. Overlapping ranges in undefined behavior.

Range Naming

Ranged functions can in general do their own system, every model is unique after all, however, there are some recommended names to use if applicable:

NameUsage
disabledThis should be used for disabling a function. As an example, if a fixture has light macros, then the value use which disabled the macro functionality should have the ID disabled
offWhen something is off, such as a relay
onWhen something is on, such as a relay
setShould only be used when the ranged function is disabled.
sound_sensitiveFor sound sensitive matching of syncing to sound.
blackoutIf the color output is set to black

When a channel is a lower nibble, simply append _lower to the name.

FixtureSchema

Since it is common for multiple fixture instance of the same type and model to exist, creation is grouped to allow for multiple at once. If only one is desired, only specify one channel.

keytypecomment
typestringThe ID of the Fixture Type to use as the base
displayNamestring?Human readable name of the group
displayNamePluralstring?Plural form of the name, if null, plural form is obtained by appending "s" to the singular version
modelstring?The model of these fixtures. There is also a model field in the Fixture Type Schema, the reason is that fixtures might use the same Fixture Type (e.g. A white LED strip and a white spotlight might both use the same brightness fixture type due to only having one channel)
descriptionstring?Optional extra information
fixtureChannelsRecord<string, number>The Lua names and channel ids for the fixtures. Each entry has it's key as the Lua name and the value as the first channel for the fixture (if the fixture has channels 10-16, then channel 10 should be specified)

FixtureGroupSchema

In LMixer, fixtures can be grouped, so the config file also has support for this.

keytypecomment
descriptionstring?Optional extra information about the group
fixturesstring[]An array of the fixtures contained. The values are the Lua names of the fixtures. Fixture groups are also allowed to be specified with their Lua name

Note

Take care to order the FixtureGroups such that dependecies (other fixture groups) are earlier in the file then the dependent group. This is to simply the loading.

Schema

export const currentFormatVersion = 1;

// The json file
export type FixtureConfig = {
  // The version of the config format. Minor additions can be
  // made without updating.
  // The number increase of breaking changes
  formatVersion: number;

  // The fixtures "types", a type can be reused among multiple
  // fixtures, most commonly this is used for multiple instances
  // of the same model
  // The key is the id of the string
  fixtureTypes: Record<string, FixtureTypeSchema>;

  // The fixtures, the key is only for categorization.
  fixtures: Record<string, FixtureSchema>;

  // Fixture groups are collections of fixtures and/or groups,
  // The key is the fixtureGroups id/lua name
  // Should always be ordered such the dependencies are always
  // earlier in the .json file.
  fixtureGroups: Record<string, FixtureGroupSchema>;
};

export type FixtureTypeSchema = {
  // The human readable display name for the fixture
  displayName: string;

  // The plural form of the displayName, if left blank, the plural
  // form is obtained by appendning "s". Useful of "shelf"->"shelves"
  displayNamePlural?: string;

  // The model/product name of the fixture
  model?: string;

  // Exta information about the fixture
  description?: string;

  // What each DMX channel maps to. There should be exactly one
  // entry per channel, and nothing else. The key is the channels
  // index, "1", "2", "3" (1-indexed)
  channels: Record<string, FixtureChannelSchema>;
};

// The information about a DMX channel
export type FixtureChannelSchema = {
  // The "id" of the DMX channel, this is used for identification
  // of what it does. See fixture_config.md for more info
  id: string;

  // Human readable name
  displayName: string;

  // Extra information about what this channel does
  description?: string;

  // If a 16bit property exists, setting this marks that this is
  // the lower 8bit of the 16bit value. The value of
  // lowerNibbleForChannel is the channel that is the upper 8bits
  lowerNibbleForChannel?: number;

  // Maps the 0-255 range onto another range when displaying,
  // most notable use case is rotations, were mapping from [0-255]
  // to [0 degrees, 540 degrees].
  mapRangeForDisplay?: {
    min: number;
    max: number;
  };

  // Some channels are decimated into smaller chunks, for instance
  // a relay might use 8 bits, but only has two states.
  // Strobing speed for lights tend to have a deadzone, for both of
  // these, a ranged function is suitable.
  rangedFunction?: ChannelRangedFunction[];
};

export type ChannelRangedFunction = {
  // Lowest value [inclusive] that this "mode" applies to
  min: number;

  // Highest value [inclusive] that this "mode" applies to
  max: number;

  // The "id" of the function, "disabled", "set", "off", "on",
  // are common values, See fixture_config.md.
  // Note: Multiple ranges can use the same function id,
  // for instance, if [0, 8] and [248, 255] both do the same
  // thing.
  functionID: string;

  // Human readable name
  displayName: string;

  // If true, all values within the range behave identically,
  // for instance a relay might have a giant range that is "on"
  // but no value is more "on" then another.
  identicalWithinRange?: boolean;

  // Maps the 0-255 range onto another range when displaying,
  // most notable use case is rotations, were mapping from [0-255]
  // to [0 degrees, 540 degrees].
  mapRangeForDisplay?: {
    min: number;
    max: number;
  };
};

// A collection of fixture. Since multiple fixtures tend to share
// everything except the ID, this groups it together.
export type FixtureSchema = {
  // The fixture type to use. Needs to match the key in the
  // config.fixtureTypes
  type: string;

  // Human readable name
  displayName?: string;

  // Plural form of the name, if omitted, "s" is appended to
  // the singular name
  displayNamePlural?: string;

  // The model of this fixture, useful if multiple fixtures
  // behave the same (for instance only a brightness component)
  // but are different product
  model?: string;

  // Extra information about the fixture
  description?: string;

  // The fixture instances. The key is the Lua name, and the
  // value is the DMX Channel that is used.
  fixtureChannels: Record<string, number>;
};

// A group of fixtures
export type FixtureGroupSchema = {
  // Array of the fixtures/group. The value is the Lua name,
  // which is why both fixture groups aswell as fixtures
  // can be used
  fixtures: string[];

  // Extra information
  description?: string;
};
Edit this page
Prev
Fixtures in Kistan's LMixer