Android CEC Screen Power On/Off with DSDevices

On this page

Android CEC Screen Power On/Off with DSDevices

Documentation Versions

  • If you are using a v3.0.0 and earlier CMS, please use this link

This guide will take you through how to use the DSDevices DSCS9X, DSCS95 and DSCS9 to control the attached TV/screen via HDMI-CEC using a v3.x or higher CMS.

Modern TVs and signage panels offer the HDMI-CEC standard to accept power on/off Events via the HDMI cable.

DSDevices DSCS9X, DSCS95 and DSCS9 offer a method to send those CEC control signals so that you can turn the screen on and off via Commands Scheduled in Xibo or built into Layouts.

Player Setup

If you are using a DSCS9X or DSCS95 please go straight to the Xibo Setup section below.

NOTE: DSCS9 devices shipped from 1st January 2019 onwards have the DSDCEC app pre-installed and the CEC options correctly configured for you automatically, so you can skip straight to the Xibo Setup section below.

Download the DSDCEC app from here and install on your DSCS9.

Once installed, if you open the DSDCEC app, it should look like this:

Next, go into the Settings app from the device home screen:

Select Preference:

Select HDMI CEC:

Ensure that the following options are selected:

  • CEC Control - Open
  • One key play - Close
  • One key power off - Close
  • Auto change language - Close

Exit the settings using the back arrow at the bottom of the screen.

Next, ensure that your TV or panel has HDMI-CEC control enabled. How you achieve this varies from manufacturer to manufacturer. Please see the user guide for your particular TV for guidance.

Once CEC is enabled, ensure that your DSCS9 is connected to the TV via HDMI cable. CEC control signals cannot pass through HDMI to VGA adapters for example.

Click the POWEROFF button, or press f on the keyboard in the DSDCEC app. Your TV should turn off. Assuming it does so, turn the screen back on manually, or if you have a keyboard connected use the n button to trigger a power-on event.

Assuming that the screen powers off and on as expected, the Player setup is complete.

Xibo Setup

From the CMS, create and define Commands to turn the screen power On and Off.

  • Select Commands located under the Displays section of the main menu.

Create 2 commands to use: Screen On: dsd_cec_on and Screen Off: dsd_cec_off

  • Click Add Command and enter the Command using Free Text:

Repeat to add a Screen Off Command:

NOTE: From v2 R216 and earlier and v3 R301 and earlier, the following commands should be used instead:

Screen Off: /system/bin/am start -n com.microcontrollerbg.dsdcec/.dsdcec --es "ceccommand" "off"

Screen On: /system/bin/am start -n com.microcontrollerbg.dsdcec/.dsdcec --es "ceccommand" "on"

You can now try sending an instant screen on/off command from the Displays page.

  • Use the row menu for a selected Display and select Send Command:

  • Pick Screen On or Screen Off and then Save.

The screen should receive an XMR message and obey the command to turn on or turn off.

Non-Docker installations must have XMR up and running to send an instant screen/on/off command!
Screenshot/Image

The same Commands can also be Scheduled as an Event Type (these don’t require XMR to work):

As in the example image above, the selected Start Time would cause the screen to turn off at 18:30 for the selected Display Group. You could then use a Repeat to cause that to happen every day for example.

A similar Schedule could be defined to turn the screen back on again!
Screenshot/Image

It is also possible to embed the Commands required into a Layout.

Simply add the Shell Command Widget to your Layout and choose the Commands you defined earlier.

When that particular Layout is shown, the screen power state will change accordingly.