HTPC Experiments - Part 2

With the base OS installed, it was time to get other bits and pieces installed. Kodi was fairly easy to install and I set it up as a standalone service Install Kodi as a standalone-service

The most frustrating part was up next.... Getting my TV Remote to work with the LIRC so that I could control Kodi from the remote. Definitely beats twiddling around with the Kore app. Don't get me wrong, the app is great. It's just that from a usability and familiarity perspective, the TV remote is a lot easier. I wasn't anticipating any headaches because in an earlier attempt, I had openelec/kodi working on a raspberry Pi hooked to the same setup and TV just working fine out of the box.

The RPi has a HDMI CEC adapter built in and the openelec/Kodi setup was using that to hook up the remote. The NUC doesn't have a CEC adapter built in but comes with a Nuvoton IR controller, so I figured I would use that with LIRC to control Kodi.

What followed next was a bit of a nightmare given that most of what LIRC used to do has gone into the kernel and there are 3-4 different pathways between the IR controller getting a key press from the remote to an application receiving it through the devinput driver, the kernel, LIRC and finally the application. This is to say nothing of how the remote codes are interpreted by LIRC and then key mapped by Kodi.

The biggest problem I ran into was that the irrecord program kept segfaulting and dumping core. It has been a long time since I fired up gdb and was loath to do so now, so googled around for a bit and saw that the problem was with the lirc_options.conf file in /etc/lirc. The default device names seem to have changed between versions and irrecord was crashing because of that. So the old options for device and driver need to be set to the below lines in /etc/lirc/lirc_options.conf

driver    =   default

device   =  /dev/lirc0

That stopped irrecord from crashing but every time I tried, irw and irrecord would terminate with a message similar to "partial input..."

I gave up and tried to find a shortcut by using one of the pre-recorded remote files. There is very little documentation out there on which remote file to use for the Sony Bravia TVs. By trial and error, I stumbled on the RM-ED035 as the closest map. Copied that into /etc/lirc/lircd.conf.d directory with the name RM-ED035.lircd.conf. Restarted the LIRC daemon and Kodi and was up and running with the remote.

One small  niggle persists. Every time I press the home button on the remote, both LIRC and the TVs sensor pick up the keypress and respond to it. Still haven't figured out how to solve that but was pretty near the end of my tether by this point, so I'm living with that minor annoyance for now. If I figure out how to solve it, will post that here....

So that's Kodi + LIRC for video playback over HDMI out of the way. In Part 3, I will cover getting DSD playback to work correctly... and thereby hangs a tale!!

Comments

Popular posts from this blog

Quick and Dirty WiFi-Ethernet Bridge - Arch Linux - ASUS Router and Apple Airport Extreme

Android File Transfer and Samsung SmartSwitch Conflict

HTPC Experiments - Part 3