I am trying to setup an IR remote for my OSMC on RPi2. I am using a TRM1038 IR receiver, and an Xbox remote that looks like this one (but in black): OSMC Forums
I got the basic setup working, in the sense that OSMC responds to key presses. But it’s just too sensitive. Every key press is repeated what feels like dozens of times.
I have tried a number of things, but nothing has helped so far:
Any ideas what else I can try? Would logs helps somehow?
If I cannot get the repeat to settle down, I would even be willing to suppress repeats completely. Obviously this is not ideal, but at least the remote would be useable. Something like this from OpenElec: http://wiki.openelec.tv/index.php/Guide_To_lirc_rpi_GPIO_Receiver
Unfortunately, I do not know how to implement that in OSMC as I could not locate “autostart.sh” anywhere. I gather OSMC uses “/etc/rc.local” instead? How to run script at boot? [SOLVED]
Would the recommended syntax work in rc.local?
killall eventlircd
eventlircd --evmap=/etc/eventlircd.d --socket=/var/run/lirc/lircd --release=_UP --repeat-filter
The problem is that there are multiple slightly different rc6 profiles in the same file which respond to the same remote, hence you get multiple responses per button press.
I get two responses per button press on my xbox 360 universal media remote with this file. The solution is to break out each remote into a separate file, which I plan to do via an update soon.
In the meantime you could open the rc6 profile in a text editor, edit out everything except the xbox 360 profile, and save that as a new lircd.conf in your osmc home directory, then browse to that as a custom choice.
That should fix your multiple repeats.
BTW we already have eventlircd running with --repeat-filter, so it’s nothing to do with that.
I am sorry, but I am not sure what this means. Could you elaborate, please? It sounds like you are describing a dedicated lircd.conf file, which I think is what I did. I used the following approach:
After that, I had the behaviour I already described where button presses are recognized, but repeat indefinitely.
To try out the changes I had described as attempted fixes (for example, increasing gap) I ssh’d into the device and modified my custom lircd.conf in nano. Then I rebooted OSMC.
Not sure if it matters, but I get well more than two responses per press. I get dozens. In fact, I think it repeats indefinitely. I often have to physically disconnect the IR receiver to stop OSMC from going crazy (sometimes long after I have stopped pressing the button).
What other changes have you made besides the actual lircd.conf file ?
Did you try what I suggested ?
The rc6 profile I’m referring to is /etc/lirc/rc6-mce-lircd.conf. The section you want is from:
# contributed by DynaMight
#
# brand: Xbox 360 remote
# model no. of remote control:
# devices being controlled by this remote:
#
begin remote
name Xbox 360 Remote
Right through to the next end remote.
Doing this works perfectly for my xbox 360 universe remote with a standard GPIO IR receiver - no repeats at all.
None. So far I have only experimented with lircd.conf (I used the two different versions I linked before; plus the various tweaks / modifications I described).
OK, I tried this one too (including deleting all the other remotes within, as you suggested). But unfortunately it resulted in the same behaviour.
Could you tell me which IR receiver you are using? I am using a TRM1038. This OSMC reference link suggests a TSOP4838 or TSOP34138. I think mine should work fine too (given it is on the LIRC compatibility list), but might as well rule this out.
Also, is the DVD remote you are using the same as the one in my link? rc6-mce-lircd.conf includes mappings for number keys (0-9), which my remote does not have - so I wonder if you have a different style of remote?
I noticed the rc6 file you mentioned has a lot of repeat suppression (“suppress_repeats = 99”). So I even tried increasing this further up to 200, but no change in outcome. (The only difference seems to be a longer lag before the repeating start; presumably while the first 200 are ignored.)
Sounds like you probably have a problem with your IR receiver then, as the Xbox 360 profile extracted from that file works 100% for me - no repeat problems at all.
I’m using tsop38238 from here:
I have this one:
As far as I know the codes are the same for the buttons they have in common though.
I’d have to check but I don’t think the suppress repeats is necessary or makes any difference when I comment it out.
Based on what you’ve tried so far I suspect the problem might be with your tsop not being fully compatible (not all work well with the pi) or that you are running it from the wrong voltage rail. (A lot of tutorials suggest to run it off the 5v rail, but 3.3v is the correct one to use)
I think this was the winner! Performance is much improved when I switch over to 3.3V (and repeatable that it returns to “bad” operation if I switch back to 5V). I am going to experiment a little more, but I am now pretty confident this will work.
If it’s still not 100% I would try a known good model of TSOP such as the one I bought. (they’re not exactly expensive)
There are dozens of different models of TSOP that all differ somewhat in their electrical characteristics - some are more sensitive (to IR) than others, and some are more compatible electrically with the GPIO inputs on the Pi than others. Some need a resistor connecting, while others can be directly connected with no extra resistor.