Monitor control
In this article, you will find methods to control screens with other option(s) besides the working hours.
Common way
The easiest solution if you simply use a smart plug or timer switch for powering the screen of the media player, or/and the media player. This will simply switch on or off the power as you manually set it up.
There are many analog and digital versions of these smart plugs.
Advanced configuration
Some TVs (Vestel, Philips etc...) require custom commands for monitor control, these commands can be set up with an Advanced configuration.
Configuration
{
"configuration": [
{
"type": "SCREEN_CONTROL",
"serialConnection": {
"baudrate": 9600,
"port": "0",
"dataBits": 8,
"stopBits": 1,
"parity": 0,
"flowControl": 1
},
"socketConnection": {
"address": "localhost",
"port": 1234
},
"commands": [
{
"action": "SCREEN_ON",
"method": "serial",
"messageType": "string",
"message": "TOF/n"
},
{
"action": "SCREEN_OFF",
"method": "cec",
"messageType": "byte",
"message": "x64x13"
}
]
}
]
}
Connection methods
There are 2 connection methods that can be used, Serial connection or Socket connection.
When Serial connection is used the port
parameter must be specified, on Windows devices if no
other serial device is connected then the port should be COM1, on Android you can find more
information about how you can get the
port here
The other serial connection parameters should only be specified if the device connected needs different values than the default ones seen in the example configuration.
Commands
There are two command action SCREEN_OFF
and SCREEN_ON
, here the method parameter can be serial
or cec
, this will define on which interface the message should be sent on, the messageType can
be string
or byte
it tells the application in which format the message should be sent in, the message itself depends on the device.
You can find more information about which connection method, or commands must be used in you devices manual.
Android (Qbic devices)
Devices with CEC support will be able to turn off the capable screen, and also puts the device into a sleep state. Devices without CEC support will also be able to go into a sleep state without affecting the screen.
For CEC, you have to use the right HDMI cable and a display that can react to CEC messages.
Enable/Disable HDMI CEC
When the device turn on/off it can send a CEC turn on/off command.
Enable
{
"configuration": [
{
"type": "QBIC_HDMI_CEC",
"enabled": true
}
]
}
Disable
{
"configuration": [
{
"type": "QBIC_HDMI_CEC",
"enabled": false
}
]
}
Set screen on/off type
These commands only allow choosing the method of how you wish to turn on/off.
HDMI output
Allows the device to turn on/off the output source, the device gives to the screen. The disadvantage is that it does not turn off the screen.
{
"configuration": [
{
"type": "QBIC_DISPLAY_STATE_COMMAND",
"command": "HDMI"
}
]
}
CEC
Allows the device to turn on/off the CEC capable screen through HDMI.
{
"configuration": [
{
"type": "QBIC_DISPLAY_STATE_COMMAND",
"command": "HDMI"
}
]
}
BrightSign
BrightSign can communicate over HDMI CEC (https://en.wikipedia.org/wiki/Consumer_Electronics_Control) and send a CEC signal when the content wants to switch the screen on or off.
For this, you have to use the right HDMI cable and a display that can react to CEC messages.
Since the CEC messages can be different producer by producer, by default Wallboard sends out 0x40; 0x0d codes for the display ON, and 0x40; 0x36 codes for the OFF message. For custom commands please check https://www.cec-o-matic.com/
On BrightSign you can use these codes from custom scripts, or you can use Triggers from content. Example script for turn off screen:
var cec_control = new BSCECTransmitter();
var buffer = new Uint8Array(2);
buffer[ 0 ] = 0x40;
buffer[ 1 ] = 0x0D;
cec_control.SendRawMessage(buffer);
For further examples please follow the documentation provided by BrigthSign
Trigger Screen On/Off with Content
Currently, Samsung and LG screens and BrightSign devices with CEC screens can be controlled through content with events. You can easily set up Sensor events, Page change events, Time-based events, Datasource events, and Widget interaction events to trigger the Screen On or Screen Off action.