<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 13/01/16 14:22, Larry Kennedy wrote:<br>
</div>
<blockquote
cite="mid:CAPCvy=m0i8gLAYnvSVLp1y_7iboEgELL_fx1uX9=EEK207YA1Q@mail.gmail.com"
type="cite">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Jan 7, 2016 at 4:41 AM,
Joseph Fry <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:joe@thefrys.com" target="_blank">joe@thefrys.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><span class=""><br>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jan 6, 2016 at 6:22
PM, Kingsley Turner <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:krt@krt.com.au" target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:krt@krt.com.au">krt@krt.com.au</a></a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px
0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Greetings,<br>
<br>
So I have my Raspberry PI GPIO Infra-Red remote
mostly working fine.<br>
<br>
I can see messages debugging with 'irw', all the
codes are correct, etc.<br>
<br>
However in mythfrontend (and irw) I quite
clearly get multiple keypresses; 99% double,
sometimes single, sometimes triple.<br>
e.g.:<br>
pi@raspberrypi:~ $ irw<br>
00000000807f9867 00 KEY_ENTER noontec_a6<br>
00000000807f9867 01 KEY_ENTER noontec_a6<br>
<br>
Reading many of the various posts for MythTV
(and XBMC, etc.) the proposed solutions are not
applicable to RPi.<br>
<br>
One thing I have tried, is creating an
/etc/lirc/lircrc file which specifies button
handling:<br>
<br>
begin<br>
button = KEY_ENTER<br>
delay = 5<br>
repeat = 3<br>
#prog = irexec<br>
#config = echo KEY_ENTER<br>
end<br>
<br>
I added a clause like this for every key.<br>
<br>
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.<br>
<br>
Should I expect 'irw' and MytvTV to respect this
lircrc file ?<br>
<br>
Is there something I'm missing?<br>
</blockquote>
</div>
<br>
</div>
</span>
<div class="gmail_extra">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.</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">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: <a moz-do-not-send="true"
href="http://www.lirc.org/faq.html" target="_blank">http://www.lirc.org/faq.html</a></div>
<div class="gmail_extra"><br>
</div>
<blockquote style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"
class="gmail_quote"><span
style="color:rgb(0,0,0);font-family:Verdana,Arial,Lucida,Helvetica;font-size:medium">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.<br>
</span>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 <em>delay</em> token
(will be available in 0.7.0) in your .lircrc file.<br>
You can identify such remotes by the fact that
irrecord usually will add a <em>min_repeat</em> field
for this remote control to the lircd.conf config file.<br>
If you want to suppress those repeats already at lircd
level, you can also add <em>suppress_repeat x</em> to
the lircd.conf config file where <em>x</em> is the
number of repeats you want to suppress. This feature
is available in lircd since release 0.8.6.</blockquote>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Sometimes you can tweak other
things in lircd.conf to resolve this problem... such
as your gap, repeat_gap, min_repeat, etc.</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">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.</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">I'm not sure if this might
impact the pi... but it's also worth a shot: <a
moz-do-not-send="true"
href="https://www.mythtv.org/wiki/MCE_Remote#Arrow_Buttons_Repeat"
target="_blank"><a class="moz-txt-link-freetext" href="https://www.mythtv.org/wiki/MCE_Remote#Arrow_Buttons_Repeat">https://www.mythtv.org/wiki/MCE_Remote#Arrow_Buttons_Repeat</a></a></div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Good luck... I'm sure you'll
figure it out eventually.</div>
<div class="gmail_extra"><br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div><br>
</div>
<div>If you are running lircd and a modern kernel,both could
be responding to your key presses. See section entitled, <span
style="color:black;font-family:sans-serif;line-height:1.6"><b><i>Double
presses for certain buttons</i></b>, at this</span> link
on how to verify this and write a udev rule to fix it:</div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="https://www.mythtv.org/wiki/LIRC">https://www.mythtv.org/wiki/LIRC</a><br>
</div>
<div><br>
</div>
<br>
</div>
</div>
</div>
</blockquote>
<br>
Hi Larry,<br>
<br>
I did read all this (and other) help pages, but the first problem
you encounter on the RPi, is that stuff like: <br>
/sys/class/rc/rc0/protocols<br>
<br>
don't exist. IIRC, this directory only exists up to /sys/class/rc
and then it's empty.<br>
<br>
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,<br>
<br>
cheers,<br>
-Kingsley<br>
<br>
</body>
</html>