[mythtv-users] MythTV Raspberry Pi2 - GPIO IR - Multiple Key-presses from remote control

Kingsley Turner krt at krt.com.au
Wed Jan 13 19:06:14 UTC 2016


On 13/01/16 14:22, Larry Kennedy wrote:
>
>
> On Thu, Jan 7, 2016 at 4:41 AM, Joseph Fry <joe at thefrys.com 
> <mailto:joe at thefrys.com>> wrote:
>
>
>
>     On Wed, Jan 6, 2016 at 6:22 PM, Kingsley Turner <krt at krt.com.au
>     <mailto:krt at krt.com.au>> wrote:
>
>         Greetings,
>
>         So I have my Raspberry PI GPIO Infra-Red remote mostly working fine.
>
>         I can see messages debugging with 'irw', all the codes are
>         correct, etc.
>
>         However in mythfrontend (and irw) I quite clearly get multiple
>         keypresses; 99% double, sometimes single, sometimes triple.
>         e.g.:
>         pi at raspberrypi:~ $ irw
>         00000000807f9867 00 KEY_ENTER noontec_a6
>         00000000807f9867 01 KEY_ENTER noontec_a6
>
>         Reading many of the various posts for MythTV (and XBMC, etc.) the
>         proposed solutions are not applicable to RPi.
>
>         One thing I have tried, is creating an /etc/lirc/lircrc file which
>         specifies button handling:
>
>         begin
>             button = KEY_ENTER
>             delay  = 5
>             repeat = 3
>             #prog   = irexec
>             #config = echo KEY_ENTER
>         end
>
>         I added a clause like this for every key.
>
>         If I run 'irexec' with those two commented-out lines back in, and
>         press keys, the remote does behave as-if the lircrc file has made
>         a difference.  Indeed, changing the delay & repeat allowed me to
>         tune button pushing so there was no unwanted repeats - but only
>         for irexec.
>
>         Should I expect 'irw' and MytvTV to respect this lircrc file ?
>
>         Is there something I'm missing?
>
>
>     First of all... IRW doesn't really use your lircrc, so those options
>     will have no effect.... it is showing every signal the receiver gets.
>
>     You are doing the right thing playing with the delay and repeat, but
>     should be testing in mythtv or irexec or whatever.... not lirc.
>     Additionally, if you really hate seeing the repeats in IRW, you can
>     actually have lircd ignore repeats using the suppress_repeat directive
>     in your lircd.conf. see: http://www.lirc.org/faq.html
>
>         Every time I press a button on my remote control irw will show at
>         least 5 events (or any other number > 1) independent of how short
>         I try pressing the button.
>         In most cases this is the correct behavior. Many remote controls
>         send the same code multiple times to make sure that at least one
>         code comes through to the receiver when you press a button for a
>         short time. The default .lircrc setup ignores repeat events. If
>         you want to use the button to do things repeatedly when it is
>         being hold down, like e.g. increasing the volume or something
>         similar, you should use the /delay/ token (will be available in
>         0.7.0) in your .lircrc file.
>         You can identify such remotes by the fact that irrecord usually
>         will add a /min_repeat/ field for this remote control to the
>         lircd.conf config file.
>         If you want to suppress those repeats already at lircd level, you
>         can also add /suppress_repeat x/ to the lircd.conf config file
>         where /x/ is the number of repeats you want to suppress. This
>         feature is available in lircd since release 0.8.6.
>
>
>     Sometimes you can tweak other things in lircd.conf to resolve this
>     problem... such as your gap, repeat_gap, min_repeat, etc.
>
>     If you used irrecord to create your remote file, you might want to do
>     it again and make a point to hold each button for at least a
>     second.... irrecord should have detected that your remote is sending
>     repeats and set a min_repeat value in the lircd.conf.   If you didn't
>     use irrecord, and your using some pre-generated remote
>     configuration... you might want to try using it.... I have found that
>     some of the prefab ones are not quite right for some hardware.
>
>     I'm not sure if this might impact the pi... but it's also worth a
>     shot: https://www.mythtv.org/wiki/MCE_Remote#Arrow_Buttons_Repeat
>
>     Good luck... I'm sure you'll figure it out eventually.
>
>
>
> If you are running lircd and a modern kernel,both could be responding to 
> your key presses.  See section entitled, */Double presses for certain 
> buttons/*, at this link on how to verify this and write a udev rule to fix it:
>
> https://www.mythtv.org/wiki/LIRC
>
>

Hi Larry,

I did read all this (and other) help pages, but the first problem you 
encounter on the RPi, is that stuff like:
      /sys/class/rc/rc0/protocols

don't exist.  IIRC, this directory only exists up to /sys/class/rc and then 
it's empty.

I think Joseph's comment will lead to a solution, but I've been a bit too 
busy with work to devote more time to it as yet,

cheers,
-Kingsley

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20160114/e88208d0/attachment.html>


More information about the mythtv-users mailing list