GithubHelp home page GithubHelp logo

mmm-ceccontrol's Issues

On/Off Commands turning off video output not tv (TV goes black and "No Signal")

There was a change to the code in Feb. 2021 that caused my MM to stop working when I finally did an update to modules that I have been putting off for a while. Let me start by saying I am new to GitHub and programming raspberry pi so I am sorry if this is a noob issue. The change was for pull #15 that that changes the command from "cec-client" control to "tvservice". This essentially change the function of the command to disable the hdmi output not send the command to turn off the display. I have used this module for over a year with out issues until this change was pushed into master. I think this should be undone or an option to decide which method of control is to be used. Please help me if there is just an easy way to remedy (at least on my screen). Thanks

Remove need for python-shell

It is only needed in turnOffXScreensaver() to call "xscreensaver-command -deactivate", but I see no reason to not use "exec('xscreensaver-command -deactivate');" for that. It is used anyway.

turnOffXScreensaver: function() {
PythonShell.runString('import os;os.system("xscreensaver-command -deactivate");', null, function (error) {

Segmentation fault

Hello,
I have tried to use your module that looks super useful but I get an error that I don't really understand:

[18.01.2021 22:21.28.370] [LOG]   Error: Command failed: echo "standby 0" | cec-client RPI -s -d 1
Segmentation fault

    at ChildProcess.exithandler (child_process.js:308:12)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:430:11)
    at Socket.emit (events.js:210:5)
    at Pipe.<anonymous> (net.js:658:12) {
  killed: false,
  code: 139,
  signal: null,
  cmd: 'echo "standby 0" | cec-client RPI -s -d 1'
}

I have installed cec-utils
I am a bit lost.

Thanks for your help,
Kevin

Handle all supported cec-utils commands

It would be nice if the payload could support all commands listed below.

If we need special functions for on/off (to keep track of status), then the case "else" statement could basically forward/execute whatever is in the payload. And if that seems too permissive, it could check the first word against an array of allowed/whitelisted commands.

Available commands:

[tx] {bytes}              transfer bytes over the CEC line.
[txn] {bytes}             transfer bytes but don't wait for transmission ACK.
[on] {address}            power on the device with the given logical address.
[standby] {address}       put the device with the given address in standby mode.
[la] {logical address}    change the logical address of the CEC adapter.
[p] {device} {port}       change the HDMI port number of the CEC adapter.
[pa] {physical address}   change the physical address of the CEC adapter.
[as]                      make the CEC adapter the active source.
[is]                      mark the CEC adapter as inactive source.
[osd] {addr} {string}     set OSD message on the specified device.
[ver] {addr}              get the CEC version of the specified device.
[ven] {addr}              get the vendor ID of the specified device.
[lang] {addr}             get the menu language of the specified device.
[pow] {addr}              get the power status of the specified device.
[name] {addr}             get the OSD name of the specified device.
[poll] {addr}             poll the specified device.
[lad]                     lists active devices on the bus
[ad] {addr}               checks whether the specified device is active.
[at] {type}               checks whether the specified device type is active.
[sp] {addr}               makes the specified physical address active.
[spl] {addr}              makes the specified logical address active.
[volup]                   send a volume up command to the amp if present
[voldown]                 send a volume down command to the amp if present
[mute]                    send a mute/unmute command to the amp if present
[self]                    show the list of addresses controlled by libCEC
[scan]                    scan the CEC bus and display device info
[mon] {1|0}               enable or disable CEC bus monitoring.
[log] {1 - 31}            change the log level. see cectypes.h for values.
[ping]                    send a ping command to the CEC adapter.
[bl]                      to let the adapter enter the bootloader, to upgrade
the flash rom.
[r]                       reconnect to the CEC adapter.
[h] or [help]             show this help.
[q] or [quit]             to quit the CEC test client and switch off all
connected CEC devices.

Add support for vcgencmd for turning on/off computer monitors

The CEC-client works well for TVs but it is not compatible for computer monitors. Using vcgencmd we can turn/off a computer monitor as well. This might be beyond the scope of CECControl project as the name implies but vcgencmd can be added as an optional way of turning on/off monitors.

Queue mechanism blocks if same command is received twice

Hi

If a module generates off command twice the code checks current status and ignores the command which in turn keeps the queueWorking flag set to true and thus disables the module to act on any other commands afterwards.

how to use this in conjuction with remote

super new to all this but def have a decent footing, i can control my tv through terminal, but im wanting to either create a scripted on/off time for the tv and or be able to control it through the remote web interface. any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.