Screen control widgets
From SpinetiX Support Wiki
Applies to Elementi 2015 and later.
Contents
Description
The screen control widgets can be used to send different commands to the connected screen, like power on / off the screen, mute / unmute, set a certain volume level, or select a screen input. They don't display any content.
These widgets are especially useful when the screen commands must be sent according to a predefined schedule; for instance, the Power.svg widget can be used to create a custom power saving schedule.
- These widgets simply pass the specified command to the finite state machine of the player - for the command to be executed, a serial connection between the HMP and the screen and a serial port protocol file (.fsm) activated on the HMP are required.
- The power on / off commands might work without a serial connection and an FSM file, because the HMP would try to send those commands via other display power management mechanisms, if any is available.
Widgets
The following widgets are included within the "Screen Control" collection (previously called "Automation") of Elementi Library:
- Power
- It is used for turning on or off the screen, depending on the "Command" property being set to "PowerOn" or "PowerOff".
- This widget might work without a serial connection, as explained in the note above.
- Mute
- It is used for muting or unmuting the sound of the screen, depending on the "Command" property being set to "MuteOn" or "MuteOff".
- Volume
- It is used for setting the screen volume to a certain level; expected value is between 0 and 100. The command that is triggered is "SetVolume", with the selected value passed as parameter.
- Sources
- It is used for selecting a certain input source of the screen, from the following choices: HDMI1, HDMI2, VGA, AV1, AV2, AV3. The command that is triggered is "SelectInput", with the selected value passed as parameter.
Advanced
Each screen control widget allows modifying the command to be sent or its parameters directly from Elementi GUI; the specified command is simply passed to the finite state machine of the player through the auxCmd
element present inside the widget code.
The "Power" and "Mute" widgets allow setting which command to be sent. For instance, the "PowerOn" command is described like this within the Power widget:
<auxCmd command="PowerOn" target="monitor"/>
Inside the serial port protocol file, something like this would be present:
<onStart command='PowerOn' goto='start'>
<write data='ª%c{17}ÿ%c{1}%c{1}%c{18}'/>
</onStart>
The "Volume" and "Sources" widgets allows setting the parameter of the fixed command ("SetVolume" or "SelectInput") they are sending. In such cases, two finite states are required within the fsm file, for instance, the following code would allow to select the HDMI1 input:
<state xml:id='start'>
[...]
<onStart command='SelectInput' goto='select_input_start'>
</onStart>
</state>
<state xml:id='select_input_start'>
<onTest var='$PARAM1' stringEqualTo='HDMI1' goto='start'>
<write data='%c{1}0A0E0A%c{2}11%c{3}r
'/>
</onTest>
</state>
The full example can be found here.