btw: It is painfull to move the SD-card. I would prefere SSH-shell.
RTFM: Accessing LibreELEC - LibreELEC Config.txt - LibreELEC
so long,
Hias
btw: It is painfull to move the SD-card. I would prefere SSH-shell.
RTFM: Accessing LibreELEC - LibreELEC Config.txt - LibreELEC
so long,
Hias
Thanks a lot for the feedback!
You didn't have debug logging enabled when grabbing the log files so I couldn't see which button presses were received by kodi. But I assume in the case with atvclient disabled you got volume-up/down forward, back, play/pause - is this correct?
Could you also test, with atvclient enabled, if the harmony profile(s) you used before on LE 7.x are working fine with this build?
so long,
Hias
I'm not exactly sure what's going wrong with atvclient (no hardware to test, LE is shipping latest atvclient version with krypton patches), but I noticed that kernel support for the apple ir receiver was disabled in LE.
Here's a test build with CONFIG_APPLEIR enabled:
LibreELEC-Generic.x86_64-8.0-devel-20170616093132-r25705-g16fea8734.tar
Could you please test this build and report back if this works better/worse with atvclient running?
With added kernel support kodi should now receive IR events without atvclient running. To test this disable atvclient:
systemctl mask atvclient
and then reboot. (you can later re-enable atvclient with systemctl unmask atvclient and another reboot).
In both cases please post kodi debug logs where you press some buttons.
Also please post the output of the following commands:
lsmod
lsusb -v
dmesg | paste
lsof | grep /dev/input
BTW: the kernel driver only supports the remote codes of the original Apple remotes, so please test with these (maybe the Harmony configured as a Apple remote works, too). Other remote codes should be supported by running lircd, but let's leave this for later.
so long,
Hias
I had previous dropped a keymap file in ~/.config/rc_keymaps/ but now it seems I'm supposed to edit ~/.config/rc_maps.cfg to specify that I want to use the map. I made this change and now the remote is working correctly.
This seems a major change that should have been highlighted. Even the README in ~/.cinfig/rc_keymaps/ still describes the old system.
Overriding existing keymaps via files in .config/rc_keymaps still works as before, but what's changed is that LE now loads the libreelec_multi keymap for remote receivers that use the rc-rc6-mce table - instead of the rc6_mce keymap before. See /etc/rc_maps.cfg:
so long,
Hias
css could be a real bitch sometimes
That works! Thanks for all your help. Back up in post #3 I mentioned that I had removed the KEY_ prefix from the codes downloaded from lirc-remotes download | SourceForge.net.
Ah, sorry, I had missed that before...
But I'm glad you got it working, and thanks a lot for the feedback!
As for key naming: using non-standard key names is deprecated for quite some time now. Lircd still accepts arbitrary key names, but eg irrecord will refuse key names that aren't standard when creating a new lircd.conf.
The standard naming scheme makes it a lot easier for programs to support remotes, especially via lirc sockets. Before people could eg configure the volume keys to generate VOLUME_UP, VOLUMEUP, VOLUP etc which led to quite a mess
so long,
Hias
Display More
LibreELEC:~/.config # irw /run/lirc/lircd.socket
0000000000559aa6 00 UP Microsoft_Xbox
0000000000559aa6 00 UP_EVUP Microsoft_Xbox
0000000000558aa7 00 DOWN Microsoft_Xbox
0000000000558aa7 00 DOWN_EVUP Microsoft_Xbox
0000000000557aa8 00 RIGHT Microsoft_Xbox
0000000000557aa8 00 RIGHT_EVUP Microsoft_Xbox
0000000000556aa9 00 LEFT Microsoft_Xbox
0000000000556aa9 00 LEFT_EVUP Microsoft_Xbox
This is quite certainly the culprit. You should use KEY_UP, KEY_DOWN etc in lircd.conf, not only "UP", "DOWN", ...
Can you change your lircd.conf so that the keynames match the officially supported ones?
See linux/input-event-codes.h at master · torvalds/linux · GitHub
BTW: You can also get a list of supported keynames by running "irrecord -l"
so long,
Hias
In LE9 / Milhouse builds I'd recommend sticking to the stock configuration: only enable lirc in settings, and setup lircd.conf and lirc_options.conf (with driver and device) in .config, leave everything else as it is.
In general there's no need to change the lircd socket used by kodi. LE setup (with eventlircd running in background) will take care of bridging the remote events into kodi.
If something's not working as expected with that setup please report here, we'll then have a look at it and try to fix it.
so long,
Hias
Did you enable lircd in LE settings?
Just did a quick test, Milhouse build 0508 on RPi3, with some FTDI serial dongle, a lircd.conf file in .config and this lirc_options.conf and it worked fine:
LibreELEC:~ # grep -v ^# .config/lirc_options.conf
[lircd]
nodaemon = False
driver = uirt2_raw
device = /dev/ttyUSB0
output = /run/lirc/lircd.socket
pidfile = /run/lirc/lircd.pid
plugindir = /usr/lib/lirc/plugins
permission = 666
allow-simulate = No
repeat-max = 600
[lircmd]
uinput = False
nodaemon = False
Display More
lircd and lircd-uinput started up fine:
349 root 2:54 /usr/sbin/lircd -O /storage/.config/lirc_options.conf --nodaemon --release /storage/.config/lircd.conf
350 root 0:00 /usr/sbin/lircd-uinput -O /storage/.config/lirc_options.conf
But of course lircd was logging errors because there was no UIRT2 adapter connected:
LibreELEC:~ # systemctl status lircd
● lircd.service - Flexible IR remote input/output application support
Loaded: loaded (/usr/lib/systemd/system/lircd.service; disabled; vendor preset: disabled)
Active: active (running) since Mon 2017-05-08 04:36:41 UTC; 1 day 14h ago
Docs: http://lirc.org/html/configure.html
Main PID: 349 (lircd)
CGroup: /system.slice/lircd.service
└─349 /usr/sbin/lircd -O /storage/.config/lirc_options.conf --nodaemon --release /storage/.config/lircd.conf
May 08 04:36:41 LibreELEC lircd-0.9.4d[349]: Notice: lircd(uirt2_raw) ready, using /run/lirc/lircd.socket
May 08 04:36:41 LibreELEC lircd-0.9.4d[349]: Notice: accepted new client on /run/lirc/lircd.socket
May 08 04:36:42 LibreELEC lircd_helper[349]: lircd-0.9.4d[349]: Error: uirt2_raw: did not receive results
May 08 04:36:42 LibreELEC lircd-0.9.4d[349]: Error: uirt2_raw: did not receive results
May 08 04:36:44 LibreELEC lircd_helper[349]: lircd-0.9.4d[349]: Error: uirt2_raw: did not receive results
May 08 04:36:44 LibreELEC lircd_helper[349]: lircd-0.9.4d[349]: Error: uirt2_raw: No UIRT2 device found at /dev/ttyUSB0
May 08 04:36:44 LibreELEC lircd-0.9.4d[349]: Error: uirt2_raw: did not receive results
May 08 04:36:44 LibreELEC lircd-0.9.4d[349]: Error: uirt2_raw: No UIRT2 device found at /dev/ttyUSB0
May 09 18:38:04 LibreELEC lircd_helper[349]: lircd-0.9.4d[349]: Warning: Failed to initialize hardware
May 09 18:38:04 LibreELEC lircd-0.9.4d[349]: Warning: Failed to initialize hardware
Display More
so long,
Hias
Usually you have manually switch the screen to 16:9/anamorphic mode. Check the manual of your screen if there's some setting in a menu, a switch or something like that.
Automatic switching to anamorphic mode in (PAL) TVs relies on information transmitted in the video signal during vertical blank (or in one of the cut-off overscan lines, can't remember) but AFAIK RPi doesn't generate these signals.
I'm using my RPi 3 on a 16:9 CRT TV, connected via composite, and had to manually put my TV into anamorphic 16:9 mode as well.
so long,
Hias
Enable debug logging in kodi and check kodi.log if it reported errors about the keyboard.xml file. Also check if the remote presses actually show up as keyboard events. If they show up as lirc events in the log, eventlircd is still translating the events.
BTW: If you change anything it's best to reboot, this is the easiest way to make sure all new config files are picked up.
so long,
Hias
To debug I created a ./config/lirc_options.conf which was identical to the one in /etc/lirc
but changing
output = /run/lirc/lircd.socket2and only /run/lirc/lircd.socket was created (no "2").
The socket is the one thing you shouldn't change in lirc_options.conf - it's managed by systemd. Actually lircd is a socket managed service, systemd creates the socket and when the first client, lircd-uinput in this case, connects to it systemd will start lircd - that's exactly the same setup as in other linux distributions.
I'd also recommend to keep eventlircd running, this picks up the input events generated by lircd-uinput, translates these again into lirc events and feeds them to the standard lirc socket which is used by kodi.
You could change the kodi startup to use the /run/lirc/lircd.socket directly, but then kodi can't be controlled by other IR remotes (eg USB IR receivers which send out input events).
Yes, the setup is rather awkward, but as kodi doesn't play too well with linux input events it's currently the only way to support all remotes in kodi.
so long,
Hias
Just did a quick test here with my justboom remote and ran into an interesting issue, kodi didn't detect any button presses at all if eventlircd was bypassed.
lsof clearly showed that kodi was using the input event device, but nothing at all showed up in kodi log (debugging enabled)
LibreELEC:~ # lsof | grep /dev/input
1350 /usr/lib/kodi/kodi.bin /dev/input/event0
1350 /usr/lib/kodi/kodi.bin /dev/input/event1
LibreELEC:~ # evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: Logitech K400
/dev/input/event1: gpio_ir_recv
Select the device event number [0-1]: ^C
As I was pretty sure it worked with my hauppauge remote before I dug into that and could make it work if I added a (dummy) keymap entry for KEY_NUMERIC_0 - looks like this is enough to make kodi detect the remote as a keyboard (maybe kodi thinks this is a game controller otherwise - don't know for sure).
Here's the working .config/rc_keymaps/justboom I've used for testing:
# table justboom, type: RC5
0x1010 KEY_HOME
0x1011 KEY_POWER
0x1012 KEY_MUTE
0x1013 KEY_LEFT
0x1014 KEY_RIGHT
0x1015 KEY_ENTER
0x1016 KEY_MENU
0x1017 KEY_BACK
0x1018 KEY_VOLUMEDOWN
0x1019 KEY_VOLUMEUP
0x101A KEY_UP
0x101B KEY_DOWN
# dummy key so that kodi detects remote as a keyboard
0x1e00 KEY_NUMERIC_0
Display More
With this keymap longpress-OK worked out of the box with kodi, default kodi keymap contains an entry to map longpress-enter to context menu.
BTW: I needed to restart kodi after changing the keymap with ir-keytable -w ... on-the-fly, kodi only seems to test for "keyboard/non-keyboard" when it accesses the input device the first time.
Snippet from default kodi keyboard.xml:
And also visible in kodi.log
17:36:39.358 T:1962061824 DEBUG: Keyboard: scancode: 0x1c, sym: 0x000d, unicode: 0x0000, modifier: 0x0
17:36:39.891 T:1962061824 DEBUG: Previous line repeats 1 times.
17:36:39.891 T:1962061824 DEBUG: OnKey: long-return (0x100f00d) pressed, action is ContextMenu
BTW: I think you need to have both <key ...> and <key mod="longpress"...> in keyboard.xml to make longpress working in kodi. Also, the ~500ms delay for the first key-repeat showing up in evtest/ir-keytable is normal - this is the initial repeat delay:
LibreELEC:~ # ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event1) with:
Driver gpio-rc-recv, table rc-rc6-mce
Supported protocols: unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce-kbd rc-6 sharp xmp
Enabled protocols: lirc rc-5
Name: gpio_ir_recv
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
LibreELEC:~ # ir-keytable -t
Testing events. Please, press CTRL-C to abort.
1494265897.242319: event type EV_MSC(0x04): scancode = 0x1015
1494265897.242319: event type EV_KEY(0x01) key_down: KEY_ENTER(0x0001)
1494265897.242319: event type EV_SYN(0x00).
1494265897.356251: event type EV_MSC(0x04): scancode = 0x1015
1494265897.356251: event type EV_SYN(0x00).
1494265897.470204: event type EV_MSC(0x04): scancode = 0x1015
1494265897.470204: event type EV_SYN(0x00).
1494265897.584149: event type EV_MSC(0x04): scancode = 0x1015
1494265897.584149: event type EV_SYN(0x00).
1494265897.698086: event type EV_MSC(0x04): scancode = 0x1015
1494265897.698086: event type EV_SYN(0x00).
1494265897.746357: event type EV_KEY(0x01) key_down: KEY_ENTER(0x0001)
1494265897.746357: event type EV_SYN(0x00).
1494265897.812019: event type EV_MSC(0x04): scancode = 0x1015
1494265897.812019: event type EV_SYN(0x00).
1494265897.876355: event type EV_KEY(0x01) key_down: KEY_ENTER(0x0001)
Display More
so long,
Hias
Is it possible to have the buttons meaning different things depending on other processes? Like if playing something...
Yes, via customized kodi keymap
Keymap - Official Kodi Wiki
HOW-TO:Modify keymaps - Official Kodi Wiki
so long,
Hias
Is it possible to use longpress? Having an extra set of commands would be very handy.
Not as long as Kodi is using lirc input.
Currently eventlircd translates linux input events (as generated by gpio-ir) into lirc events which are then read by kodi. This is done so that button translation can be done for a few remotes and because kodi doesn't support several buttons (like KEY_OK or KEY_CHANNELUP/DOWN) in "keyboard mode".
You can disable eventlircd by creating an empty /storage/.config/udev.rules.d/98-eventlircd.rules file, then remote button presses will show up as keyboard events in kodi and longpress works.
If you do this you also have to install a custom rc_keymap and change the KEY_OK mapping to KEY_ENTER - kodi without an "OK" button won't be too much fun
so long,
Hias
This is all really strange. My MCE remote (via harmony) stopped yesterday. have been trying to get it back to work for an hour now (Hope I haven't messed up Harmony settings now). Trying a restore first, made a kodi backup two weeks ago.Running 8.0.1 on Pi2 device, did not update this last week.
Please do the checks as outlined in post #2 of this thread: thread-8016-post-48094.html#pid48094
Also please post what kind of IR receiver you are using (USB or GPIO) and in case of a GPIO receiver which driver you are using (lirc-rpi or gpio-ir).
so long,
Hias
Can you do a test with the latest Milhouse build?
LibreELEC Testbuilds for RaspberryPi (Kodi 18.0)
LE9 adds support for setting lircd options via /storage/.config/lirc_options.conf and thus make it a lot easier to configure the driver and device (just copy /etc/lircd/lirc_options.conf to the .config dir and change driver= and device=).
You might also need to create a /storage/.config/lircd.conf file, by default lircd is configured to support MCE and xbox remote codes.
BTW: with userspace lirc you won't use ir-keytable, configuration is handled by lircd.conf and lirc_options.conf.
so long,
Hias