Kodi Community Forum

Full Version: Trouble adding custom IR commands
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been searching and reading I thought this was straightforward enough, but I just can't seem to get my custom commands to work out. The situation is that I was using an Acoustic Research remote and after going through their setup routine and getting the MCE commands loaded, there were some extra IR commands that I hadn't seen before. These were read by irw as BD1, BD2, BCF, and BC2. While setting up my new Harmony I had it learn these codes figuring that'd give me some extra keys.

So here's what I did, in .xbmc/userdata/Lircmap.xml I added the following inside <remote>
<showsubtitles1>BD1</showsubtitles1>
<nextsubtitle1>BD2</nextsubtitle1>
<fullscreen1>BCF</fullscreen1>
<updatevideo1>BC2</updatevideo1>
and in .xbmc/userdata/keymaps/remote.xml
<fullscreen2>FullScreen</fullscreen2>
<updatevideo2>UpdateLibrary(video)</updatevideo2>
<showsubtitles2>ShowSubtitles</showsubtitles2>
<nextsubtitle2>NextSubtitle</nextsubtitle2>

For the record, originally did this without the 1 and 2 suffixes, I did that for clarity to help interpret the errors in the logs. Even if I take those off, the errors show up the same, but it's ambiguous.

So at startup I see the following:
22:19:47 T:140109780305792 ERROR: Remote Translator: Can't find button fullscreen2
22:19:47 T:140109780305792 ERROR: Remote Translator: Can't find button updatevideo2
22:19:47 T:140109780305792 ERROR: Remote Translator: Can't find button showsubtitles2
22:19:47 T:140109780305792 ERROR: Remote Translator: Can't find button nextsubtitle2
22:19:47 T:140109780305792 ERROR: Remote Translator: Can't find button fullscreen2
22:19:47 T:140109780305792 ERROR: Remote Translator: Can't find button updatevideo2
22:19:47 T:140109780305792 ERROR: Remote Translator: Can't find button showsubtitles2
22:19:47 T:140109780305792 ERROR: Remote Translator: Can't find button nextsubtitle2

and then when pressing buttons I see:
22:21:49 T:140109780305792 ERROR: Remote Translator: Can't find button nextsubtitle1
22:22:13 T:140109780305792 ERROR: Previous line repeats 1 times.
22:22:13 T:140109780305792 ERROR: Remote Translator: Can't find button fullscreen1
22:22:22 T:140109780305792 ERROR: Remote Translator: Can't find button showsubtitles1
22:22:24 T:140109780305792 ERROR: Remote Translator: Can't find button nextsubtitle1

Again, I've restarted multiple times, and I just removed the suffixes to check again just to make sure I didn't foul up. What this tells me is that whatever processes Lircmap.xml is definitely seeing my IR commands but for whatever reason they can't be passed on. And then the reading of remote.xml is also screwing. I know that showsubtitles and nextsubtitle are in ButtonTranslator.cpp, so I'd think they'd work just fine, although I'm not even sure that matters because what I thought was important was that Lircmap.xml and remote.xml match up.

So is there some other place I need to be entering some sort of mapping information for these commands?
first, have you understood the process?

Lircmap maps YOUR remote to a general reference remote. thus you cannot invent buttons like fullscreen2, nextsubtitle2 aso. you have a fixed set of buttons, these are defined here https://github.com/xbmc/xbmc/blob/master....cpp#L1248

once your remote is mapped to the reference remote, remote.xml kicks in. this maps the buttons on the reference remote to actions.

alternatively, you can use an <universalremote> mapping. in this case you can invent all the buttons you want, named obcn, where n is a number. the disadvantage with this approach is that now you have to do all the button<->action mapping yourself.
OK, thanks, at one point I was using my own names, then I found a reference to that C++ file, but I pulled some values out of the wrong list there. I'll just go back and figure out which keys I don't use or have on my remote and use those.