Schema Definition ----------------- Class = RGBLED Type = BASIC This Schema provides RGBLED command functionality to an xpl implementation This Schema provides control over RGB LEDs on the controller described at http://www.rgbled.org The controller must be hooked to a free serial port and be running a xPL->RGBLED gateway. XPL-TRIG Structure ------------------ RGBLED is a one-way control -- there are no triggers or status messages XPL-STAT Structure ------------------ RGBLED is a one-way control -- there are no triggers or status messages XPL-CMND Structure ------------------ RGBLED.BASIC { COMMAND=, see notes BOARD= [LED=] [COLOR=<6 digital hex RGB value like FF0000 for red or 00FFFF for cyan> or CURRENT for add animation color] [MASTER_LED=] [NEW_BOARD_ID=] [NEW_GROUP= [DELAY_TIME=<0-255>] [DELAY_UNITS=] [COLOR_CHANGE=] [STATE=] } Addressing Notes ---------------- BOARD= can take a specific board #, a wildcard (ALL) or a group (form G# like G4 for boards on group #4) LED= can take a specific LED #, a wildcard (ALL), a group (form of G# like LED=G8 to address leds in group #8) or a range in the format of l-h (i.e. 3-8 to address LEDs 3, 4, 5, 6, 7 & 8 at one time). Schema Specific Notes --------------------- RGB LED oriented COMMAND= (all use BOARD= and LED=) ON - Turn an LED or LEDs on OFF - Tuen an LED or LEDs off SLAVE - slave LED or LEDs to a master (uses MASTER_LED=) LIBERATE - release/unslave LED or LEDs HIGH_CURRENT - set LED or LEDs current to 20ma (RGBLED only) LOW_CURRENT - set LED or LEDs current to 10ma (RGBLED only) SET_COLOR - change the color of an LED or LEDs (uses COLOR=) SET_GROUP - set the LEDs group (uses NEW_GROUP=) CLEAR_GROUP - clears the LED from any group ENABLE_ANIMATION - Enable animation of the LED or LEDs DISABLE_ANIMATION - Disable animation of the LED or LEDs CLEAR_ANIMATION - Disable and release LED or LEDs animation resources CHANGE_ANIMATION - change animation options (uses DELAY_UNITS, DELAY_TYPE, COLOR_CHANGE=) ADD_COLOR - adds a color or colors to an LED or LEDs (uses multiple COLOR=) DEFINE_ANIMATION - clear animation and define a new one for the LED or LEDs (uses DELAY_UNITS, DELAY_TYPE, COLOR_CHANGE= and multiple COLOR=, and optional STATE=) Animation Color Notes --------------------- When adding a color to an animation, either via ADD_COLOR or DEFINE_ANIMATION, the special color "CURRENT" is allowed. This will cause whatever color the addressed LED is at when the command is received to be captured and added as the next animation color for the LED. This is mostly useful when you want to do a one-shot animation from whatever the LEDs current color is to a new one, but may have other uses as well. CHANGE_ANIMATION and DEFINE_ANIMATION take the following items: DELAY_UNITS=[SECONDS|TENTHS|HUNDREDTHS] Determines what unit DELAY_TIME is measured in DELAY_TIME=[1..255] # of hundredths, tenths or seconds for each color transition COLOR_CHANGE=[WASH|ABSOLUTE] Sets how colors are translated. WASH is a gentle, smooth change from one color to the next over the DELAY_TIME interval. ABSOLUTE means the color stays solid and the at the end of DELAY_TIME, switces immediatly to the next color ANIMATION_REPEATS=[YES|NO] (optional, default Yes) Determines if the animations loop over and over or only execute once and then are done. AUTO_RELEASE_COLORS=[YES|NO] (optional, default No) Determines if the colors allocated for the LED are released when the animation stops (either because it receives a disable animation command or because a one-shot, non-repeating animation completes. COLOR= (DEFINE_ANIMATION only) Can occur many times, each time defining a color step STATE=[ENABLE|DISPLAY|NA] (DEFINE_ANIMATION only, optional, no default) Tells the LED(s) what state to take after the animation is defined. If it's omitted or set to NA, nothing in the state (animation being enabled and LED being on) is changed. If it's ENABLE, the animation will be started, but the led ON/OFF status will not be changed. DISPLAY means the LED will be set to ON and animation ENABLED. RGB Controller Board COMMAND= (all use BOARD=) CLEAR_BOARD - Clear all board resources (animations, colors, etc) PRESERVE_BOARD - Save current settings as power-on defaults REBOOT_BOARD - Reset the board to power-on defaults CHANGE_BOARD_ID - change boards ID to new ID (uses NEW_BOARD_ID=) SET_BOARD_GROUP - change the group the board is assigned to (uses NEW_GROUP=) CLEAR_BOARD_GROUP - clears the board from any group SET_COMMON_CATHODE - sets board to control common cathode LEDs (mRGBLED only) SET_COMMON_ANODE - sets board to control common anode LEDs (mRGBLED only) Most commands are one-for-one xPL equivilents of the serial commands described more fully in the protocol.txt document included with the RGBLED project. DEFINE_ANIMATION is a convience and sums up the animation functions of clearing, setting attributes, defining colors and enabling/displaying the result. Standard Notes -------------- HBEAT.* = hbeat.basic or hbeat.app etc (hbeat items) = standard .basic or .app heartbeat items [] = optional