[mythtv-users] Remote and blaster without LIRC?

Don Brett dlbrett at zoominternet.net
Mon Jun 3 19:52:10 UTC 2019


On 5/24/2019 5:42 AM, Stephen Worthington wrote:
> On Thu, 23 May 2019 22:33:10 -0400, you wrote:
>
>> I think I just spent the last couple of days going down LIRC blind
>> alleys.  Can someone point me to a current guide to setup an MCE
>> receiver/blaster?  Or, maybe, just some sample files with settings that
>> apply to this version of LIRC?
>>
>> Don
> I have not run a blaster for a long time, so I can not help with that.
> I only did it before the config changed.  I hope the LIRC
> documentation will help with that:
>
> http://www.lirc.org
> http://www.lirc.org/html/configuration-guide.html
>
> The LIRC docs do have decent information about how to configure a
> remote also.
>
> Here is information on my working MCE setup.  The first thing to
> remember is that LIRC has finally been upgraded from the ancient
> version in 16.04 to a modern version in 18.04.  So its config files
> are different, and there is a new Python program lirc-setup to run to
> set it up.  The old /etc/lirc/hardware.conf file is no longer used.
> You need to run lirc-setup (I think it needs to be run as root) and
> tell it to download the MCE remote config file (devinput) and
> configure LIRC to use that.  It may already be set up that way as
> default, but there are some names to change to make it work.
>
> Here is my setup:
>
> root at mypvr:/lib/udev/rc_keymaps# ll rc6* hauppauge
> -rw-r--r-- 1 root root 2838 Feb 11  2018 hauppauge
> -rw-r--r-- 1 root root 1475 Feb 11  2018 rc6_mce
>
> These are the files I use for my Hauppauge and MCE remotes.  They are
> the key mappings used by ir-keytable.  You need to run ir-keytable -t
> and check that each key on your remote is producing a keystroke listed
> in the rc6_mce file.  If you find a key that is not working, then you
> will need to set up a modified copy of the rc6_mce file - let me know
> and I will tell you how.  Remember to stop lircd when using
> ir-keytable:
>
> sudo systemctl stop lircd
>
> This is the first LIRC config file:
>
> root at mypvr:/etc/lirc# cat lirc_options.conf
> # These are the default options to lircd, if installed as
> # /etc/lirc/lirc_options.conf. See the lircd(8) and lircmd(8)
> # manpages for info on the different options.
> #
> # Some tools including mode2 and irw uses values such as
> # driver, device, plugindir and loglevel as fallback values
> # in not defined elsewhere.
>
> [lircd]
> nodaemon        = False
> driver          = devinput
> device          = auto
> output          = /var/run/lirc/lircd
> pidfile         = /var/run/lirc/lircd.pid
> plugindir       = /usr/lib/x86_64-linux-gnu/lirc/plugins
> permission      = 666
> allow-simulate  = No
> repeat-max      = 600
> #effective-user =
> #listen         = [address:]port
> #connect        = host[:port]
> #loglevel       = 6
> #release        = true
> #release_suffix = _EVUP
> #logfile        = ...
> #driver-options = ...
>
> [lircmd]
> uinput          = False
> nodaemon        = False
>
> # [modinit]
> # code = /usr/sbin/modprobe lirc_serial
> # code1 = /usr/bin/setfacl -m g:lirc:rw /dev/uinput
> # code2 = ...
>
>
> # [lircd-uinput]
> # add-release-events = False
> # release-timeout    = 200
> # release-suffix     = _EVUP
>
>
> The lirc_options.conf file is largely unchanged - just check that it
> says "driver = devinput".
>
> The next LIRC config file is:
>
> root at mypvr:/etc/lirc# cat lircd.conf
> # Populated config files can be found athttp://sf.net/p/lirc-remotes.
> The
> # irdb-get(1) and lirc-setup(1) tools can be used to search and
> download
> # config files.
> #
> # From 0.9.2 config files could just be dropped as-is in the
> lircd.conf.d
> # directory and be included by this file.
>
> include "lircd.conf.d/*.conf"
>
> The lircd.conf file is unchanged - it now just loads all the changed
> config from the lircd.conf.d directory:
>
> root at mypvr:/etc/lirc# ll lircd.conf.d
> total 48
> drwxr-xr-x 2 root root  4096 Oct  6  2018 ./
> drwxr-xr-x 3 root root  4096 Oct  6  2018 ../
> -rw-r--r-- 1 root root 35015 Oct  6  2018 devinput.lircd.conf
> -rw-r--r-- 1 root root   615 Aug 13  2017 README.conf.d
>
> And here is the start of my devinput.lircd.conf file:
>
> root at mypvr:/etc/lirc/lircd.conf.d#  head -n 30 devinput.lircd.conf
> # Rename to devinput.lircd.dist if not using devinput driver
> # Re-generate for current kernel using lirc-make-devinput
> #
> # Generated by lirc-make-devinput on 4.4.0-91-generic
> # Date: Thu Aug 17 11:08:45 UTC 2017
>
> begin remote
>          name            devinput-64
>          bits            16
>          eps             30
>          aeps            100
>          pre_data_bits   16
>          pre_data        0x0001
>          post_data_bits  32
>          post_data       0x00000001
>          gap             132799
>          toggle_bit      0
>          driver          devinput
>
>          begin codes
>           KEY_0      11
>           KEY_1      2
>           KEY_102ND      86
>           KEY_10CHANNELSDOWN      0x1b9
>           KEY_10CHANNELSUP      0x1b8
>           KEY_2      3
>           KEY_3      4
>           KEY_3D_MODE      0x26f
>           KEY_4      5
>           KEY_5      6
>
> The devinput.lircd.conf file may already be present, but if not,
> lirc-setup can download and install it.  Note that I had to change the
> "name" setting in the second half of that file from "devinput-32" to
> "devinput".  That is the name I am using in my $HOME/.lircrc included
> files (see below) in the "remote = devinput" lines.  It was much
> easier to change it in one line there, rather than change all the
> "remote = devinput" lines to "remote = devinput-32".  Depending on
> your remote, you might need to use the devinput-64 section of the
> devinput.lircd.conf file and rename that, rather than the devinput-32
> section.  Sorry, I can not remember how I worked out that my remote
> needed devinput-32.
>
> Programs that support LIRC for IR input normally read the file
> $HOME/.lircrc to load their LIRC config.  MythTV conforms to this.  In
> a standard MythTV setup with LIRC, that file is just a set of include
> commands for the files containing the actual LIRC configs for the
> various programs that are using LIRC:
>
> root at mypvr:/home/stephen# cat .lircrc
> #Custom lircrc generated via mythbuntu-lirc-generator
> #All application specific lircrc files are within ~/.lirc
> include ~/.lirc/mythtv
> include ~/.lirc/mplayer
> include ~/.lirc/xine
> include ~/.lirc/vlc
> include ~/.lirc/xmame
> include ~/.lirc/xmess
> include ~/.lirc/totem
> include ~/.lirc/elisa
> include ~/.lirc/irexec
>
> root at mypvr:/home/stephen/.lirc#  head -n 30 mythtv
> # lircrc for devinput with Hauppauge Nova TD-500 and Hauppauge
> HVR-900R2 remotes (with lirc 0.9.0),
> # and MCE remotes.
>
> # Save it in ~/.lircrc
>
> begin
>      remote = devinput
>      prog = mythtv
>               # Guide key
>      button = KEY_EPG
> #    config = S
>      config = Ctrl+Alt+G
>      repeat = 0
>      delay = 0
> end
>
> begin
>      remote = devinput
>      prog = mythtv
>      button = KEY_EXIT
>      config = Escape
>      repeat = 0
>      delay = 0
> end
>
> begin
>      remote = devinput
>      prog = mythtv
>      button = KEY_OK
>      config = Return
>
> In the $HOME/.lirc files, the "button = " values must match the
> keystroke KEY_ names in the rc6_mce file, and the "config = " values
> must match the value expected by the program named in the "prog = "
> line.  So for MythTV programs ("prog = mythtv"), the "config = "
> values must be defined in mythfrontend > Setup > Edit keys (database
> tables jumppoints and keybindings).
>
> To check that LIRC is sending the right things to MythTV, you can shut
> down all MythTV GUI programs (mythfrontend, mythtv-setup.real, ...)
> and then from a command prompt started from the GUI screen, run:
>
> ircat mythtv
>
> That will display what would be sent to MythTV when you do a button
> press on the remote.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums:https://forum.mythtv.org
>

This should be working, but it's not; MythTv responds to none of the 
button presses from the remote.

Using lirc-setup, when picking mceusb hardware, it pretty much forces  
the driver to default, so, I ended up using default. Testing with irw, 
it works fine, and returns string  that match the strings in 
/etc/lirc/lircd.conf.d/mceusb.lircd.conf.  If I change a string in 
mceusb.lircd.conf and retest, I can see the changes in irw.

Testing with ircat, it looks like it's working, but I'm not sure where 
the strings are config from.  Some buttons match the contents of 
/etc/lirc/lircd.conf.d/mythtv.lircrc, and some don't.  If I change a 
string in mythtv.lirc and retest, nothing changes.  I suspect ircat is 
getting strings from somewhere else.

Below are the the contents of lircd_options_conf and a couple of 
examples; any suggestions on what to look for next?

*Contents of "lircd_options_conf":*
# Generated by lirc-setup
[lircd]
nodaemon = False
driver = default
device = /dev/lirc0
output = /var/run/lirc/lircd
pidfile = /var/run/lirc/lircd.pid
plugindir = /usr/lib/x86_64-linux-gnu/lirc/plugins
permission = 666
allow-simulate = No
repeat-max = 600
lircd_conf = mceusb.lircd.conf

[lircmd]
uinput = False
nodaemon = False

[modinit]
code = echo lirc > /sys/class/rc/rc0/protocols

*example 1:*
don at johnny:~$ irw
000000037ff07be0 00 KEY_DOWN mceusb
000000037ff07be0 01 KEY_DOWN mceusb
000000037ff07be1 00 KEY_UP mceusb
000000037ff07be1 01 KEY_UP mceusb
^C
don at johnny:~$
don at johnny:~$ ircat mythtv
Down
Up

*example 2:*
don at johnny:~$ irw
000000037ff07bdc 00 KEY_BACK mceusb
000000037ff07bdc 01 KEY_BACK mceusb
^C
don at johnny:~$ ircat mythtv
Escape

*example 3:*
don at johnny:~$ irw
000000037ff07bdd 00 KEY_OK mceusb
000000037ff07bdd 01 KEY_OK mceusb
^C
don at johnny:~$
don at johnny:~$ ircat mythtv
Return
^C
don at johnny:~$



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20190603/53d93b6d/attachment.html>


More information about the mythtv-users mailing list