Respond to events to control Colorstars Tristar LED lights. These are accessed over an RS485 serial interface.
Description
This event interface responds to events and send out serial commands as configured to control the LED lighting.
Configuration
The EventInterface element of this configuration has an additional attribute:
- serialPort the platform specific name for the serial interface to be opened. For example on windows this may be com9 and on linux /dev/ttys0
The handler specific configuration for this expects one or more 'action' elements within the event element. This contains the folllowing attributes
- task - one of "rgb", "command", "on" or "off"
- red - a value between 0 and 64 as red brightness level
- green - a value between 0 and 64 as green brightness level
- blue - a value between 0 and 64 as blue brightness level
- command - one of the following commands, these match the commands on the IR remote, but please remember that some of the remote commands are performed by the master lamp and not the slaves. When integrated with WebBrick Gateway you do not have a master lamp and some fetures that the remote controls are not available.
- on
- off
- toggle
- flash - This command is processed by thre master lamp.
- strobe - This command is processed by thre master lamp.
- fade - This command is processed by thre master lamp.
- smooth - This command is processed by thre master lamp.
- bright1
- bright2
- bright3
- bright4
- red1
- red2
- red3
- red4
- red5
- green1
- green2
- green3
- green4
- green5
- blue1
- blue2
- blue3
- blue4
- blue5
- white
- lock
- unlock
- setup
- cancel
The action element may be repeated to get multiple actions on a single event.
Example
<eventInterface module='EventHandlers.RgbLedLighting' name='RgbLedLighting' serialport="com9">
<eventtype type="internal">
<eventsource source="cinema/lighting/red" >
<event>
<action task="rgb" red="64" green="0" blue="0" />
</event>
</eventsource>
<eventsource source="cinema/lighting/white" >
<event>
<action task="command" command="white" />
</event>
</eventsource>
<eventsource source="cinema/lighting/on" >
<event>
<action task="command" command="on" />
</event>
</eventsource>
<eventsource source="cinema/lighting/off" >
<event>
<action task="command" command="off" />
</event>
</eventsource>
</eventtype>
</eventInterface>
