Command parsing rules
Each command sent to the Light Engine is a text string.
A command is a list of tokens (words) separated by whitespace.
Command contains two or more tokens. Number of tokens is variable.
The first token for a TX (transmitted) command string is one of the two keywords GET, SET (to query or to set)
The first token for a RX (received) answer string is one of the two keywords A, E (for success or failure)
Each TX command will cause the Light Engine to respond with a RX string. If RX string is not received within 100ms, we can assume that the command failed.
Commands
Color codes:
Blue: Functional
Red: Under Development
Black: Not implemented
Get Version (GET VER)
Returns the Light Engine firmware version.
Command:
GET VER
Answer:
A VER 1.0.6
Get Number Of Channels (GET NUMCH)
Returns the number of channels available in the Light Engine.
Command:
GET NUMCH
Answer:
A NUMCH 4
Get Model (GET MODEL)
Returns model name.
Command:
GET MODEL
Answer:
A MODEL SPECTRAX
Get Serial Number (GET SN)
Returns serial number.
Command:
GET SN
Answer:
A SN 6678
Get Operating Time (GET OT)
Returns total time in seconds that the specified channel was in the ON state. This value accumulates through the entire lifetime of the Light Engine.
Command:
GET OT 2
Returns total operating time for channel2
Answer:
A OT 1890667
Get Temperature (GET TEMP)
Returns current temperature in degrees Celsius.
Command:
GET TEMP
Answer:
A TEMP 26
Get Channel Power (GET CHPWR)
Obtains power reading for a given channel. This command will return actual power reading only if specified channel is ON and all other channels are OFF. In all other cases it returns 0.
Command:
GET CHPWR 2
The above example requests channel 2 power
Answer:
A CHPWR 337
(returns power reading of 337)
if successful or
E CHPWR
if error occured
Get Channel Map (GET CHMAP)
Returns ordered list of color mnemonics, e.g. VIOLET,BLUE,GREEN,RED, separated by spaces. The first channel ID is 0, the next one 1, etc. The list in this example should be interpreted as zero-based mapping of channel numbers to color mnemonics:
0 = VIOLET
1 = BLUE
2 = GREEN
3 = RED
Command:
GET CHMAP
Answer:
A CHMAP VIOLET BLUE GREEN RED
Set Light ON or OFF (SET CH)
Turns light ON or OFF for the specified channel.
Command:
SET CH 2 1
The above example sets channel 2 to ON
SET CH 3 0
The above example sets channel 3 to OFF
Answer:
A CH
if successful or
E CH
if error occured
Get Light ON or OFF (GET CH)
Obtain ON or OFF state for the specified channel.
Command:
GET CH 2
The above example requests state for channel 2
Answer:
A CH 1
or
A CH 0
if successful or
E CH
if error occured
Set Multiple Lights ON or OFF (SET MULCH)
Turns multiple lights ON or OFF with a single command. Channel ON or OFF settings (1 or 0) are provided in the order of channel IDs.
Command:
SET MULCH 1 0 1 1
Assuming the following channel order (based on IDs)
VIOLET, BLUE, GREEN, RED
The example above would result in the following light status
VIOLET ON
BLUE OFF
GREEN ON
RED ON
Answer:
A MULCH
if successful or
E MULCH
if error occured
Get Maximum Intensity Count (GET MAXINT)
Obtain maximum valid intensity that can be applied to a light channel.
Command:
GET MAXINT
Answer:
A MAXINT 4095
Set Intensity (SET CHINT)
Sets intensity for a given channel. Allowed values range from 0 to maximum intensity. Maximum intensity varies with the light engine model and can be obtained with the command GET MAXINT. Typically intensity has 12-bit resolution (4095 maximum count). This command is independent from ON/OFF commands. We can set intensity regardless of whether the specific light is turned ON or OFF, and this setting will not affect the light state.
For example if GREEN light is OFF and we set its intensity to 50, it will not turn ON. The next time ON command is sent the green light will turn ON with 50 intensity. However, if the light is already ON, CHINT command will instantaneously change its intensity.
If we set light intensity to “0”, this will effectively disable the channel, i.e. the light will be always OFF, regardless of whether it was set to ON or OFF.
Command:
SET CHINT 2 800
The above example sets channel 2 to 800 counts
SET CHINT 3 2500
The above example sets channel 3 to 2500 counts
Answer:
A CHINT
if successful or
E CHINT
if error occured
Get Channel (Color) Intensity (GET CHINT)
Obtains current intensity setting for a given channel. Maximum value for intensities can be obtained with the command “GET MAXINT”.
Command:
GET CHINT 2
The above example requests channel 2 intensity
Answer:
A CHINT 37
(for 37% setting)
if successful or
E CHINT
if error occured
Set Multiple Channel (Color) Intensities (SET MULCHINT)
Sets multiple light channel intensities with a single command. Channel intensities (0 to 4095) are provided in the order of channel IDs.
Command:
SET MULCHINT 100 900 400 850
Assuming the following channel order (based on IDs):
VIOLET, BLUE, GREEN, RED
The example above would result in the following light intensities expressed in digital counts:
VIOLET = 100
BLUE = 900
GREEN = 400
RED = 850
Answer:
A MULCHINT
if successful or
E MULCHINT
if error occured
Get Multiple Channel (Color) Intensities (GET MULCHINT)
Obtains multiple light channel current intensities with a single command. Channel intensities (0 to 4095) are provided in the order of channel IDs.
Command:
SET GET MULCHINT
Assuming the following channel order (based on IDs)
VIOLET, BLUE, GREEN, RED
Answer:
A MULCHINT 1000 3100 500 900
if successful or
E MULCHINT
if error occured
Get Light Engine Status (GET STAT)
Returns current status code from the Light Engine. “0” means all OK. Any other number will represent an error ID with a specific meaning (TBD).
Command:
GET STAT
Answer:
A STAT 3
Get Light Status (GET CHSTAT)
Returns current status code of the individual light, specified by its ID number. Return value of “0” means the normal operation. Any other number will represent an error code with a specific meaning (TBD).
Command:
GET CHSTAT 3
Answer:
A CHSTAT 0
Get IP Address (GET IP)
Returns current IP address of the Light Engine.
Command:
GET IP
Answer:
A IP 192.168.1.163
SET IP Address (SET IP)
Assigns static IP address to Light Engine. The change will take effect only after reboot. If the newly assigned address clashes with another device on the network, or if an invalid address is entered the unit can become unreachable via UDP.
Command:
SET IP 192.168.1.180
To set dynamic IP assignment (via DHCP) use the following variation of the command:
SET IP DHCP
or
SET IP 0.0.0.0
Answer:
A IP
Reboot (REBOOT)
This command reboots the Light Engine control computer. After issuing this command and receiving answer, the system will be unresponsive during reboot process (about 20 sec).
Command:
REBOOT
Answer:
A REBOOT
Shutdown (SHUTDOWN)
This command shuts down the control computer. After issuing this command and receiving answer, the system will stop responding to commands until next power up.
Command:
SHUTDOWN
Answer:
A SHUTDOWN
Set User Variable (SET USERVAR)
Set value of the user variable. Value can be any string or number. On startup/powerup user variable is assigned value “0”.
Command:
SET USERVAR 1
Answer:
A USERVAR
Get User Variable (GET USERVAR)
Returns the current value of the user variable. If not assigned by SET command “0” will be returned by default.
Command:
GET USERVAR
Answer:
A USERVAR 0
Set Logging Level (SET LOGLVL)
Set current logging level. Valid logging levels are integers between 0 and 3. Value is persisted across sessions.
Command:
SET LOGLVL 2
Answer:
A LOGLVL
Get Logging Level (GET LOGLVL)
Returns the current logging level.
Command:
GET LOGLVL
Answer:
A LOGLVL 2