Page 1 of 1
Best remote definition to use with Kodi/CoreELEC on Odroid?
Posted: Thu Oct 06, 2022 9:35 am
by Nocturnal IR Emission
I'm running the Kodi media center app on an Odroid N2+. Out of the box, these set top boxes support a massive (even daunting) number of remotes:
Code: Select all
kodi:~ # ls -1 /usr/lib/udev/rc_keymaps/*toml
/usr/lib/udev/rc_keymaps/a95x.toml
/usr/lib/udev/rc_keymaps/adstech_dvb_t_pci.toml
/usr/lib/udev/rc_keymaps/af9005.toml
/usr/lib/udev/rc_keymaps/alink_dtu_m.toml
/usr/lib/udev/rc_keymaps/allwinner_ba10_tv_box.toml
/usr/lib/udev/rc_keymaps/allwinner_i12_a20_tv_box.toml
/usr/lib/udev/rc_keymaps/anysee.toml
/usr/lib/udev/rc_keymaps/apac_viewcomp.toml
/usr/lib/udev/rc_keymaps/astrometa_t2hybrid.toml
/usr/lib/udev/rc_keymaps/asus_pc39.toml
/usr/lib/udev/rc_keymaps/asus_ps3_100.toml
/usr/lib/udev/rc_keymaps/ati_tv_wonder_hd_600.toml
/usr/lib/udev/rc_keymaps/ati_x10.toml
/usr/lib/udev/rc_keymaps/avermedia.toml
[...]
/usr/lib/udev/rc_keymaps/odroid.toml
[...]
/usr/lib/udev/rc_keymaps/xbox_360.toml
/usr/lib/udev/rc_keymaps/xbox_dvd.toml
/usr/lib/udev/rc_keymaps/xbox_one.toml
/usr/lib/udev/rc_keymaps/zotac.toml
/usr/lib/udev/rc_keymaps/zx_irdec.toml
My first attempt was to use the Odroid remote definition from
https://www.hifi-remote.com/forums/dload ... e_id=14514 which corresponds to odroid.toml. This worked, however it only supports a couple of keys. In particular, play/pause/rewind/fastforward are all missing. So the user experience isn't exactly ideal.
Can anyone recommend another JP1-supported remote definition file to try?
I see a similar thread here, but the problem was never resolved:
https://www.hifi-remote.com/forums/viewt ... p?t=101194
When I look at the documentation from CoreELEC, they basically say: use whatever remote you happen to have lying around, and manually learn each key code. I think this is kind of a waste, if I can just program my JP1 remote to be compatible with whatever IR codes that the STB is already expecting to see. The most future-proof solution is to program my remote with a known good definition file.
Re: Best remote definition to use with Kodi/CoreELEC on Odro
Posted: Thu Oct 06, 2022 9:49 am
by The Robman
Nocturnal IR Emission wrote:When I look at the documentation from CoreELEC, they basically say: use whatever remote you happen to have lying around, and manually learn each key code. I think this is kind of a waste, if I can just program my JP1 remote to be compatible with whatever IR codes that the STB is already expecting to see. The most future-proof solution is to program my remote with a known good definition file.
Do I take it from this that you have an OEM remote that works this device? If so, I would agree with CoreELEC, learn the signals from the OEM remote using your JP1 learning remote and then build an upgrade to handle it. That's what we've done for every other device file that's in the file section.
Posted: Thu Oct 06, 2022 11:12 am
by Ed
Apologies in advance if this is off-topic. I use Kodi all the time. It is integrated into my AV setup in my living room. I have it running on a Raspberry Pi 3B+ and I use FLIRC to translate IR signals from any remote to Kodi keyboard commands for all Kodi functions. The FLIRC consumes a USB port on the Pi. I'm not sure if it is supported on the Odroid.
I don't know anything about the Odroid, so, again, this may be off-topic. I am curious, though, is the Odroid "hard wired" to generate Kodi keyboard commands based on IR signals it receives?
Re: Best remote definition to use with Kodi/CoreELEC on Odro
Posted: Thu Oct 06, 2022 2:50 pm
by Nocturnal IR Emission
The Robman wrote:Do I take it from this that you have an OEM remote that works this device?
No. Apparently you can buy an ODROID remote (
https://ameridroid.com/products/ir-remote-control ), and I was able to program my OARUSB04G with RMIR to send these IR codes. However as I noted above, it doesn't have
play/pause/rewind/fastforward keys, so I'm wondering which other .toml profile(s) I should be considering instead.
ODROID is a semi generic single board computer. It
happens to be a good choice as a media center device, so it's common for users to run CoreELEC on their ODROIDs. But its OEM remote apparently isn't designed around that use case. CoreELEC supports 100+ other remotes, so I need some help picking a suitable one.
Ed wrote:I use Kodi all the time. It is integrated into my AV setup in my living room. I have it running on a Raspberry Pi 3B+ and I use FLIRC to translate IR signals from any remote to Kodi keyboard commands for all Kodi functions. The FLIRC consumes a USB port on the Pi. I'm not sure if it is supported on the Odroid.
With CoreELEC on the Odroid, you can control the UI with USB HID devices so I suspect this would work similarly. IR seems to be handled by the "ir-keytable" and "eventlircd" programs (I haven't yet figured out how they work; in the past I've only used lircd).
Right now though I just want to get familiar with Kodi / CoreELEC using a standard IR remote. Once I'm more comfortable with basic usage then I'll probably switch to controlling it over the JSON-RPC API from my existing home automation setup.
Re: Best remote definition to use with Kodi/CoreELEC on Odro
Posted: Thu Oct 06, 2022 6:24 pm
by The Robman
How did you program the OARUSB04G? Did you use learning or did you create an upgrade? Either way, can I see what you did? By that I mean, can I see your RMIR file?
If you used learning, I can convert those into an upgrade. Once we have an upgrade and can see the OBC codes for the buttons that work, we can test the rest of the unused OBCs to see if the rest of the functions that you need are in there.
Re: Best remote definition to use with Kodi/CoreELEC on Odro
Posted: Fri Oct 07, 2022 11:18 am
by Nocturnal IR Emission
The Robman wrote:How did you program the OARUSB04G? Did you use learning or did you create an upgrade? Either way, can I see what you did? By that I mean, can I see your RMIR file?
I downloaded this file:
https://www.hifi-remote.com/forums/dload ... e_id=14514
Then I opened up my pre-existing .bin file for the OAR (which has a bunch of other custom stuff in it already), navigated to Devices -> New -> Open, imported the definition, messed around with the button->function mappings a bit, and then assigned it to the STB device.
This doesn't really matter though, since the ODROID remote is so limited in what functions it supports. We can see exactly which OBC codes CoreELEC will accept from the ODROID remote, and there are no surprises in there:
Code: Select all
kodi:/usr/lib/udev/rc_keymaps # cat odroid.toml
[[protocols]]
name = "odroid"
protocol = "nec"
variant = "nec"
[protocols.scancodes]
0xb2dc = "KEY_POWER"
0xb288 = "KEY_MUTE"
0xb282 = "KEY_HOME"
0xb2ca = "KEY_UP"
0xb299 = "KEY_LEFT"
0xb2ce = "KEY_OK"
0xb2c1 = "KEY_RIGHT"
0xb2d2 = "KEY_DOWN"
0xb2c5 = "KEY_MENU"
0xb29a = "KEY_BACK"
0xb281 = "KEY_VOLUMEDOWN"
0xb280 = "KEY_VOLUMEUP"
What I really want is a recommendation for a different rmdu/toml combo to use, which supports a richer set of features on CoreELEC. We have 100+ toml files to choose from, so I was hoping someone could point out another one that has a corresponding rmdu file posted here which is known to be a good starting point.
Posted: Fri Oct 07, 2022 5:04 pm
by The Robman
Ah, so you can see inside those docs? Have you found one that contains all of the buttons that you're looking for? If so, post its contents and I might be able to make an upgrade from it, especially if it uses NEC like this one does.
Or, if you know the names of the rest of the buttons (ie, like "KEY POWER", etc) if you can edit these docs, we could add additional buttons that way.
Just FYI, take one of those entries like 0xb2dc = "KEY_POWER" and focus on the 0xb2dc code:
0x - this just means it's hex
b2 - this hex converts to 178 in decimal
dc - this hex converts to 220 in decimal
Now go look at the RMDU file that you downloaded and you'll notice that the device code is 178 and the OBC for the POWER button is 220.
Posted: Sat Oct 08, 2022 10:10 am
by Nocturnal IR Emission
The Robman wrote:Ah, so you can see inside those docs? Have you found one that contains all of the buttons that you're looking for? If so, post its contents and I might be able to make an upgrade from it, especially if it uses NEC like this one does.
I know how to do that too

I have written my own IR transmitter firmware and lirc config files based on remote definitions from this forum.
What I don't know is: which of the 161 files found in CoreELEC is a good choice, based on experience from other CoreELEC/Kodi users?
I'm familiar with RMIR/JP1. I'm not very familiar with the Kodi UI or CoreELEC. I don't actually know which buttons are essential / most useful on this platform.
Posted: Sat Oct 08, 2022 2:59 pm
by The Robman
Right, but I'm trying to offer you a different approach. Rather than looking for a CoreELEC file that is ready to go, you could make your own. But you'd need to know the official button names for the rest of the buttons. If you're able to open and read the various CoreELEC files, can you find one that has all of the buttons defined? If so, I can probably make you an upgrade that would work it. And if I can't tell what protocol it uses, I can at least get the official button names from it, which would let us re-build the Odroid file that you used previously so that it includes all the buttons.
Posted: Sun Oct 09, 2022 1:00 pm
by Barf
Continuing (sort-of) where Rob left off: I wrote a CoreELEC exporter for IrScrutinizer. This generates the *.toml file directly from (e.g.) a girr file (provided it uses the NEC* protocol with default S). Since RM can export girr files , this means that we can automatically generate a toml file that directly matches the rmdu file, and Odroid will handle it accordingly.
I have only implemented support for NEC* protocols, using the default S ("no subdevice").
So, given a rmdu file, export as Girr (File -> Export as Girr or IrScope file), import in IrScrutinizer, and export it as "CoreELEC". Transfer that file to the Odroid, and that device should understand the rmdu remote.
I have uploaded
here a zip archive consisting of an rmdu file, a girr file and a corresponding toml file. It also comes with the export format source file (CoreELEC.xml).
To reproduce, first drop the export format file CoreELEC.xml in the exportformats.d directory of IrScrutinizer. Restart IrScrutinizer if it was running. Then, in RM, export your remote as a Girr file (File -> Export as Girr or IrScope file). In IrScrutinizer, import said file (Import pane -> Girr, Load File/url, select the just generated file, and click Import all/param). Then go to the Export pane, select "CoreELEC" as export format, and click "export param. remote". This generates a .toml file, either at a position you select, or in a standardized location.
Posted: Sun Oct 09, 2022 3:04 pm
by The Robman
I found the following site that appears to have all of those .toml files:
https://git.linuxtv.org/v4l-utils.git/t ... rc_keymaps
The following file has 50 buttons defined and uses NEC1 dev 8:
https://git.linuxtv.org/v4l-utils.git/t ... nysee.toml
I created the following upgrade that replicates the Anysee file. As it didn't have arrow buttons or FFWD or REW, I added those using unused OBCs.
https://www.hifi-remote.com/forums/dload ... e_id=26613
If the file works for the other buttons and you want those, you'd have to add them to the Anysee.toml file, like this:
0x0826 = "KEY_UP"
0x0827 = "KEY_DOWN"
0x0828 = "KEY_LEFT"
0x0829 = "KEY_RIGHT"
0x082A = "KEY_FASTFORWARD"
0x082B = "KEY_REWIND"
Here's a list of key names that I was able to derive from the first few files:
"KEY_A"
"KEY_AB"
"KEY_AGAIN"
"KEY_ANGLE"
"KEY_AUDIO"
"KEY_AUX"
"KEY_B"
"KEY_BACK"
"KEY_BACKSPACE"
"KEY_BLUE"
"KEY_BOOKMARKS"
"KEY_C"
"KEY_CAMERA"
"KEY_CD"
"KEY_CHANNEL"
"KEY_CHANNELDOWN"
"KEY_CHANNELUP"
"KEY_CLEAR"
"KEY_D"
"KEY_DOT"
"KEY_DOWN"
"KEY_DVD"
"KEY_E"
"KEY_EDIT"
"KEY_END"
"KEY_ENTER"
"KEY_EPG"
"KEY_EXIT"
"KEY_F"
"KEY_FASTFORWARD"
"KEY_FAVORITES"
"KEY_FN"
"KEY_FORWARD"
"KEY_GOTO"
"KEY_GREEN"
"KEY_HOME"
"KEY_INFO"
"KEY_KPMINUS"
"KEY_KPPLUS"
"KEY_LANGUAGE"
"KEY_LAST"
"KEY_LEFT"
"KEY_LIST"
"KEY_MENU"
"KEY_MUTE"
"KEY_NEXT"
"KEY_NUMERIC_0"
"KEY_NUMERIC_1"
"KEY_NUMERIC_2"
"KEY_NUMERIC_3"
"KEY_NUMERIC_4"
"KEY_NUMERIC_5"
"KEY_NUMERIC_6"
"KEY_NUMERIC_7"
"KEY_NUMERIC_8"
"KEY_NUMERIC_9"
"KEY_OK"
"KEY_PAGEUP"
"KEY_PAUSE"
"KEY_PLAY"
"KEY_PLAYPAUSE"
"KEY_POWER"
"KEY_POWER2"
"KEY_PREVIOUS"
"KEY_PRINT"
"KEY_PROPS"
"KEY_RADIO"
"KEY_RECORD"
"KEY_RED"
"KEY_REFRESH"
"KEY_REWIND"
"KEY_RIGHT"
"KEY_SAVE"
"KEY_SCREEN"
"KEY_SEARCH"
"KEY_SELECT"
"KEY_SETUP"
"KEY_SHUFFLE"
"KEY_SLEEP"
"KEY_STOP"
"KEY_STOPCD"
"KEY_SUBTITLE"
"KEY_SWITCHVIDEOMODE"
"KEY_TEXT"
"KEY_TUNER"
"KEY_TV"
"KEY_UP"
"KEY_VIDEO"
"KEY_VOLUMEDOWN"
"KEY_VOLUMEUP"
"KEY_WWW"
"KEY_YELLOW"
"KEY_ZOOM"
Posted: Wed Oct 12, 2022 2:47 pm
by The Robman
@Nocturnal IR Emission, have you done any further experiments with this?