Skip to content
This repository has been archived by the owner on Dec 9, 2020. It is now read-only.

Server API

Kristian Skov edited this page Oct 1, 2018 · 19 revisions

Up to date as of version 1.6

Table of Content

Overview

Here is a full list of all the server API commands.

Server API commands

There is a preset number of commands to choose from, which are listed here:

Command Function
GETTOTALLEDCOUNT Method Gets the current total LED count in the currently send setup
GETSERVERNAME Method Gets the name of the server
FADECOLOR Method This command can be used to make the LEDs fade.
INDIVIDUALCOLOR Method This command can be used to set the color of individual LEDs.
VISUALIZER Method This command can be used to start, stop and configure the visualizer.
GETVISUALIZERCONFIGS Method This command can be used to get the names of saved config files for the visualizer.
AMBILIGHT Method This command can be used for limited control over the ambilight section.
GETAMBILIGHTCONFIGS() Gets the name of all the current config files in the ambilight config folder.
ANIMATION(bool StartAnimation, bool StopAnimation, bool LoopState, string ConfigName bool StartAnimation: Tells to start the Animation bool StopAnimation: Tells to stop the Animation bool LoopState: Tells whether to loop the animation or not string ConfigName: The name of the.txt file to use as a Animation configuration
GETANIMATIONCONFIGS() Gets the name of all the current config files in the animations config folder.
INSTRUCTIONS(bool StartInstructions, bool StopInstructions, bool LoopState, string ConfigName bool StartInstructions: Tells to start the Instructions bool StopInstructions: Tells to stop the Instructions bool LoopState: Tells whether to loop the Instructions or not string ConfigName: The name of the.txt file to use as a Instructions configuration
GETINSTRUCTIONSCONFIGS() Gets the name of all the current config files in the instructions config folder.
CLICKBUTTON(string ButtonName, int ButtonID) string ButtonName: What button to press int ButtonID: If there are more than one buttons with this name, then the index can be selected here (however 0 is usually a normal value to use)
SETTEXTCONTROL(string TextboxName, int TextboxID, string Text) string TextboxName: What text box to edit int TextboxID: If there are more than one text box with this name, then the index can be selected here (however 0 is usually a normal value to use) string Text: The string to put into the text field
SETTACKBARCONTROL(string TrackbarName, int TrackbarID, int Value) string TrackbarName: What track bar to edit int TrackbarID: If there are more than one track bar with this name, then the index can be selected here (however 0 is usually a normal value to use) int Value: What value to set the track bar to
SETNUMERICCONTROL(string NumericUpDownName, int NumericUpDownID, int Value) string NumericUpDownName: What NumericUpDown to edit int NumericUpDownID: If there are more than one NumericUpDown with this name, then the index can be selected here (however 0 is usually a normal value to use) int Value: What value to set the NumericUpDown to
SETCOMBOBOXINDEXCONTROL(string ComboBoxName, int ComboBoxID, int Index) string ComboBoxName: What ComboBox to edit int ComboBoxID: If there are more than one ComboBox with this name, then the index can be selected here (however 0 is usually a normal value to use) int Index: What index to set the combo box to
SETCHECKBOXCONTROL(string CheckboxName, int CheckBoxID, int Index) string CheckboxName: What Checkbox to edit int CheckBoxID: If there are more than one Checkbox with this name, then the index can be selected here (however 0 is usually a normal value to use) int Index: What index to set the Checkbox to
GETCOMBOBOXLIST(string CheckboxName, int CheckBoxID) string CheckboxName: What Checkbox to edit int CheckBoxID: If there are more than one Checkbox with this name, then the index can be selected here (however 0 is usually a normal value to use)
GETTRACKBARVALUE(string TrackbarName, int TrackbarNameID) string TrackbarName: What Trackbar to edit int TrackbarID: If there are more than one Trackbar with this name, then the index can be selected here (however 0 is usually a normal value to use)
GETCHECKBOXSTATE(string CheckBoxName, int CheckBoxNameID) string CheckBoxName: What CheckBox to edit int CheckBoxID: If there are more than one CheckBox with this name, then the index can be selected here (however 0 is usually a normal value to use)

All the return values are in a string format, since its being transmitted on a char basis. This means that you would have to parse the actural value yourself.

Server Return Codes

As well as some return codes (These are by default commented out, can be found under ServerAPISection.cs):

Return code Function
G Good, input, executing command
U Unknown command
B Error in input
Clone this wiki locally