The Command Functionality in Xibo can be used to configure a set of predefined Commands that a User can select to execute via XMR, in a Schedule or include in a Layout.
Predefined Commands can have a different Command String per Player which is particularly useful if the network of Players is mixed, connected to different Displays or have slightly different Player hardware.
A Command record is created with a Name, Description and unique Command Code, which allows for a “generic command” to be created which can be used across Display Profiles, Scheduled Events and the Shell Command Widget.
Commands provide easy access to functionality such as RS232, Android Intents, etc.
Step 1 Create Command
Navigate to Commands under the Displays section of the menu.
Click on the Add Command button and complete the presented form fields.
Edit,Delete and Permission options can be accessed using the row menu for the selected Command.
Please note: Permissions can be applied from v2.3 and later!
Step 2 Configure Command on the Display Profile
This is administered from Display Settings under the Displays section of the menu. Click on the row menu for the selected profile and Edit.
For each Command, a Command and Validation can be specified.
The Command String represents the final executed Command and can be a direct call to the shell or can have a helper specified, see below.
The Validation String is used as a comparison to the Command output and if it matches then the Command is considered a success. This string can be a regular expression.
This could be useful for a network of mixed Windows and Android Players with a command called ‘Reboot’. The Command String for ‘Reboot’ on Windows being
shutdown /r now, and on Android, it is
The same can also be useful with a non-mixed network - imagine a network of Windows players with different monitors connected over HDMI/RS232. A single Command called ‘Monitor On’ can be created with the different brands of monitor represented by different Display Settings Profiles, each can have a different Command String to turn the monitor on/off.
Commands can be executed via XMR from Display/Display Groups.
Commands can be Scheduled to execute on a specific date/time by using the Schedule Page. Select the Command using the drop-down menu for Event Type when adding/editing a Schedule.
Schedule Commands such as ‘turn on’ to be executed at set times.
Scheduled commands are executed once on the Player and only require a “Start date and time”. The Command can be executed up to 10 seconds after the time selected.
The Shell Command Widget is used to run external Commands based on the Layouts activity.
Commands can be selected by adding the Shell Command Widget to a Layout. Shell Commands with a Command as their source act in the same fashion as normal shell commands. The Command is executed when the Widget is shown on the Layout.
They should be used in a Region on their own so they are executed only once each time the Layout is shown.
A Shell Command can also be a Command String with options for Windows and Linux provided. This allows Users to add Commands ‘ad-hoc’ for one-time use. We recommend that Administrators create predefined commands where possible.
Command Helpers are prefixes that can be added to the Command String in order to take a more advanced action. Commands without a prefix are executed in the shell of the operating system which runs the Player.
cmd.exe on Windows and
shell on Android.
RS232 commands can be executed on Players by using the
rs232 prefix in the Command String. The format of the command is
The connection string should be provided in the following format on Windows:
<COM#>,<Baud Rate>,<Data Bits>,<Parity|None,Odd,Even,Mark,Space>,<StopBits|None,One,Two,OnePointFive>,<Handshake|None,XOnXOff,RequestToSend,RequestToSendXOnXOff>,<HexSupport|0,1,default 0>
Please note: If you need to send your Command in HEX format, you should specify the byte string in the Command String, for example:
7E 00 00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 FF , this will be converted to a byte stream by the player. You will need to set the
HexSupport element of the connection string to
The connection string should be provided in the following format on Android:
<DeviceName>,<Baud Rate>,<Data Bits>,<Parity>,<StopBits>,<FlowControl>
Each setting is represented by a corresponding number:
DATA_BITS_5 = 5; DATA_BITS_6 = 6; DATA_BITS_7 = 7; DATA_BITS_8 = 8; PARITY_NONE = 0; PARITY_ODD = 1; PARITY_EVEN = 2; PARITY_MARK = 3; PARITY_SPACE = 4; STOP_BITS_1 = 1; STOP_BITS_15 = 3; STOP_BITS_2 = 2; FLOW_CONTROL_OFF = 0; FLOW_CONTROL_RTS_CTS = 1; FLOW_CONTROL_DSR_DTR = 2; FLOW_CONTROL_XON_XOFF = 3;
The Command itself is a string which gets sent over RS232 using the connection details.
Android display profiles can use the
intent helper to specify an intent that should be called when the Command executes. The format of the Command is
Commands containing an intent helper are ignored in the Windows Player.
HDMI-CEC is a bus that is implemented on nearly all new large-screen TVs that have HDMI connectors. This bus (which is physically connected within normal HDMI cables) supports control signals that can perform power-on, power off, volume adjusts, selection of video source and many of the features that are accessible via the TV’s remote control. It can also control most other hardware on the HDMI bus.
Xibo doesn’t provide a direct interface to HDMI-CEC as there are many different manufacturer specifications, however, it is possible to control HDMI-CEC via a batch file.
Industry grade monitors often have a serial interface for turning the monitor panel on and off. Xibo can use the RS232 Command helper to send these Commands to the monitor - usually in HEX mode.
The following monitors and Commands have been tested:
- Power On -
rs232|COM1,9600,8,None,One,None,1|01 30 41 30 41 30 43 02 43 32 30 33 44 36 30 30 30 31 03 73 0d
- Power Off -
rs232|COM1,9600,8,None,One,None,1|01 30 41 30 41 30 43 02 43 32 30 33 44 36 30 30 30 34 03 76 0d
- Power On -
rs232|COM1,9600,8,None,One,None,1|50 4F 57 52 31 20 20 20 0D
- Power Off -
rs232|COM1,9600,8,None,One,None,1|50 4F 57 52 00 20 20 20 0D
- Power On -
rs232|COM1,9600,8,None,One,None,1|6B 61 20 30 30 20 30 31 0D
- Power Off -
rs232|COM1,9600,8,None,One,None,1|6B 61 20 30 30 20 30 30 0D
It should be noted that other models of each brand should also use the same Commands.
Philips Commercial Displays
Phillips integration is available from Xibo for Android v2 R200.
The following commands can be used to control LED’s located on the sides of some commercial Phillips Displays: