[mythtv] Request for a new system event: CEC Command

Torbjörn Jansson torbjorn.jansson at mbox200.swipnet.se
Mon May 20 16:37:09 UTC 2013

> On 5/20/2013 8:01 AM, Michael T. Dean wrote:
> > On 05/17/2013 08:23 AM, Raymond Wagner wrote:
> >> On 5/17/2013 8:05 AM, phipps-hutton wrote:
> >>> Any comments? Can I create a ticket? I may be able to code this and
> >>> submit a patch but it will be against fixes/0.26 (I don't think
> >>> libmythui/cecdapater.cpp has diverged much).
> >>
> >> Right now, the only CEC capability yet implemented in MythTV is the
> >> ability to bind an input command to turn the TV off.  It has no
> >> external event support.  Feature requests are not permitted on trac,
> >> but if you have a patch implementing this feature, you could open a
> >> ticket.
> >
> > And, IMHO, it seems like the right approach to use for all the CEC
> > actions.
> That's really taking an overly simplified view of things.  Certain
> options and inputs could logically be tied into the existing input
> mechanism, but there is use for a mechanism that would force the TV to
> be turned on and tuned to the correct input during playback, and other
> similar automated triggering.  That said, the "smarts" in my TV often
> fall short, and require a bit of wrangling trying to get my receiver
> back into the proper mode when the TV tries to do the smart thing.  I
> haven't the foggiest how one might set up an intuitive mechanism to
> allow the user to program their own behavior into MythTV.  Perhaps
> that's something best left entirely up to the event system and external
> scripts.

One problem is that you can't use the cec command line tools to send
commands while mythtv is using it since mythtv (probably libcec) grabs the
usb device exclusively.

If there was a way to send cec commands while mythtv is running then the
event system could trigger scripts to take some action.

One thing I would like to do (not sure it is possible) is to tie the
deactivation of the screensaver to turn on the tv again.
But currently even if I could detect the screensaver being deactivated I
still can't send a cec command to turn on the tv.
(tv turns itself off after a while when the screen is black or not changing
to prevent burn in)

More information about the mythtv-dev mailing list