[mythtv-users] Blasting to STB,using a MCEUSB

Stephen Worthington stephen_agent at jsw.gen.nz
Fri Oct 5 01:58:59 UTC 2018


On Thu, 4 Oct 2018 21:19:37 +0100, you wrote:

>Hi Stephen,
>
>
>
>Like Greg, I can see all the keypresses in IRW, as you can see:
>
>0000000080010067 00 KEY_UP devinput-32 
>0000000080010067 01 KEY_UP devinput-32 
>000000008001006c 00 KEY_DOWN devinput-32 
>000000008001006c 01 KEY_DOWN devinput-32 
>000000008001006a 00 KEY_RIGHT devinput-32 
>000000008001006a 01 KEY_RIGHT devinput-32 
>0000000080010069 00 KEY_LEFT devinput-32 
>0000000080010069 01 KEY_LEFT devinput-32 
>0000000080010201 00 KEY_NUMERIC_1 devinput-32 
>0000000080010202 00 KEY_NUMERIC_2 devinput-32 
>0000000080010202 00 KEY_NUMERIC_2 devinput-32 
>0000000080010203 00 KEY_NUMERIC_3 devinput-32 
>0000000080010203 01 KEY_NUMERIC_3 devinput-32 
>0000000080010160 00 KEY_OK devinput-32 
>0000000080010160 01 KEY_OK devinput-32 
>0000000080010077 00 KEY_PAUSE devinput-32 
>0000000080010077 01 KEY_PAUSE devinput-32
>
>
>
>
>But I cannot get mythtv to respond to any of them. I have put my lircrc file in ~/.mythtv/lircrc, and any number of other suggested locations, but nothing happens in mythfrontend.
>
>
>
>Getting irw to see the key presses is a MASSIVE step forward, thanks to your other post and your script, I'm just missing this final step.
>
>
>
>Regards,
>
>Dave.

The file $HOME/.lircrc is where you put lirc config for programs like
mythtv.  The default .lircrc file contains "include" lines for other
files put in $HOME/.lirc which is where you put your actual lirc
config for each program:

include ~/.lirc/mythtv
include ~/.lirc/mplayer

So for MythTV, you put the lirc config in $HOME/.lirc/mythtv, which
should already have the default config.

But, the file name does not actually have any meaning.  You can have
lirc config for any program in any of the included files, or directly
in $HOME/.lircrc.  What tells lirc which program the config applies to
is the "prog =" line in each rule in the config.  Here is an example
from my $HOME/.lirc/mythtv file:

begin
    remote = devinput
    prog = mythtv
    button = KEY_EXIT
    config = Escape
    repeat = 0
    delay = 0
end

So, the "remote = devinput" line must match the remote configured in
/etc/lirc/lirc.conf.d/devinput.lircd.conf, and the "prog = mythtv"
must match the lirc name used by the program.  All MythTV programs
(mythfrontend, mythtv-setup.real, mythavtest) use the lirc name
"mythtv".  If the remote and prog lines match, then the "button ="
line can be matched against an incoming keystroke, so if KEY_EXIT
arrives, it will match this rule and then the "config = Escape" line
will be used to tell lirc to pass on the string "Escape" instead of
KEY_EXIT.

In your case, as with me, irw is showing that your remote is matching
the "devinput-32" config in /etc/lirc/lirc.conf.d/devinput.lircd.conf.
Since your $HOME/.lirc/mythtv file will almost certainly be using
"remote = devinput" instead of "remote = devinput-32", there will not
be a match and lirc will not send mythfrontend any keystrokes.  As I
explained in my other post, you need to edit
/etc/lirc/lirc.conf.d/devinput.lircd.conf and change the "name
devinput-32" line to "name devinput" and restart lircd:

sudo systemctl restart lircd

Then restart mythfrontend.  Or you can also test using an "ircat
mythtv" command (while mythfrontend is not running).


More information about the mythtv-users mailing list