Skip to content
Control HDMI-Device to turn it on and off
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore add xscreensaver Jul 26, 2019
LICENSE Create first draft for my CECControl Jun 6, 2019
MMM-CECControl.js add xscreensaver Jul 26, 2019
README.md
node_helper.js add queue for status change Aug 2, 2019
package-lock.json add xscreensaver Jul 26, 2019
package.json add queue for status change Aug 2, 2019

README.md

MMM-CECControl

Control your HDMI-TV to turn it on and off. It works only with another compatible module which send the correct Event to this module which can turn the TV off or on.

For example my other little Project MMM-MotionControl which turn the TV on when a person is on front of the Mirror and turn it off if they leave, all that work with a Raspberry Pi Camera.

Screenshot

We can't do a Screenshot because it runs in the background :) It's only react on some events to turn the TV on and off.

Dependencies

CEC-Client to send the command to the TV.

sudo apt-get install cec-utils

npm module install

npm ci

Setup the Module

In this module you only need to set the comport for the CEC-Client. Usualy it is RPI which is also the defaut value.

You can read the comport if you run the following command. cec-client -l.

Config Description
comport Comport of your Raspberry Pi
Default Value: RPI
offOnStartup Turn the TV off if the Mirror start
Default Value: true
xscreensaver Turn xScreensaver off if TV turn on. You need to have sudo apt-get install xscreensaver installed.
Default Value: false

Full configuration of the module

{
    module: 'MMM-CECControl',
    config: {
        // Comport of your Raspberry Pi
        comport: 'RPI',
        // Turn the TV off if the Mirror start
        offOnStartup: true,
        // Turn xScreensaver off if TV turn on
        xscreensaver: false
    }
}

For Developers

To turn the TV on or of from another Module you need to send a notification.

this.sendNotification('CECControl', 'on');
this.sendNotification('CECControl', 'off');
You can’t perform that action at this time.