So, with RuneAudio running on my Raspberry Pi, I had an audio player that I was fairly happy with. However, there were a couple of ways in which it was still in need of improvement. In my previous post on the subject, I noted that I was keen to set it up to use an IR remote for basic controls like play/pause, skip forward & backwards, etc. But also I wanted to be able to try and transfer music onto the player via the network, rather than by un-mounting the USB drive (or shutting down the RPi) taking the USB drive out, plugging it into the computer, copying the files over, ejecting the drive, putting it back in the Pi and re-mounting it (or starting the RPi up again). I briefly considered getting a second Raspberry Pi, setting that up as a dedicated NAS controller, and then using that to store the music, with the RuneAudio machine reading the files remotely. However, this seemed like overkill, so I decided instead to try and get the RuneAudio to share its storage over the network instead.
I rapidly proceeded to completely foul up my entire RuneAudio installation, to the point where it was completely non-functional. Humbled, I downloaded the latest RuneAudio image and prepared to reinstall from scratch.
However, at this point I discovered that the current install image has been significantly updated from the (quite old) one I had previously used to install the software from. And one of the improvements in the current version is that it comes with Samba installed, so that its storage is already shared on the network. By simply upgrading to the latest version, I had added the functionality that I was after. Hurrah!
Now that I had started tinkering with the Pi again, I decided that it was time to see about getting a remote set up. I started out following this handy guide. There were a few ways that it wasn’t completely accurate, possibly due to being out-of-date. There was no need to install the
lirc package, as it was already installed, and the lines in
/boot/config.txt that needed to be uncommented began
#dtparam, rather than
#device_tree_param. There was also no need to uncomment the
#dparam=gpio_out_pin=xx line, as it wasn’t used, nor the
#dparam=gpio_in_pull=down, as down is the default anyway.
Otherwise, though, all went well until I came to stage 9: finding or generating a configuration file for my specific remote. The guide is correct that the
irrecord utility doesn’t work on the RPi version of Arch Linux (on which RuneAudio is based), although it doesn’t output incorrect information; it just fails to work. So I had two options. I could install another Linux distribution on my RPi, set up
lirc on that, use
irrecord to generate a suitable config file and copy that across. Alternatively, I could go to lirc-remotes.sourceforge.net and see if I could find one there. The former seemed like a huge ballache, so I tried the latter.
Unfortunately, the remote I was trying to use was a cheap no-name item for which I had no chance of getting a pre-prepared config. Even if such a thing existed, there was no brand or model number to identify it. So I began to consider giving up on this particular remote and getting a better (or, at least, better-known) one.
Surprisingly, of all the widely available remote controls, the Apple Remote best fitted my requirements. Most remotes that were available by themselves were clearly designed for use with home cinema setups and had vast numbers of buttons, most of which would be superfluous in this context. Apple’s offering, conversely, had a mere 7, covering all of the functions I needed with few left spare.
So, for the first time in my life, I ordered an Apple product. I’m not a huge fan of Apple. The biggest turn-off for me is one of the things that has made them so successful: the fact that their products double up as fashion accessories and status symbols. To be seen with an Apple device is to announce to the world that I am a Dedicated Follower of Fashion. And while this is a huge part of their appeal for many, I find it off-putting.
Other than that, I’m not actually that anti-Apple. I’ve enough experience with other people’s iOS devices to know that I would find them frustrating and annoying to use myself, but there’s a lot that they do well and for other people they may well be great. I use a Mac at work and while it still wouldn’t be my choice of machine for use at home, as a work machine it’s pretty decent. I’m not keen on the aggressive way that Apple shuns interoperability to tie you exclusively into its ecosystem, and it’s all overpriced. But otherwise Apple makes pretty decent stuff: just not, until now, stuff that suits me or meets my personal requirements.
But in this case, the Apple remote was the best option for what I needed. So I went for it.
The remote arrived this afternoon. I downloaded the appropriate config file, copied it onto my RPi, and tried it out with the
After some time spent troubleshooting, eliminating various possible reasons why it might not be working, I began to suspect that the problem lay with the config file I had downloaded. I would have to generate my own config using the Raspbian distro after all.
Fortunately, I had a spare MicroSD card, so I didn’t have to erase my RuneAudio installation, I just put Raspbian on the spare card and swapped them over. Installing
lirc was easy enough, and it wasn’t too hard to get it configured, although some files were in different places from where they had been in Arch/RuneAudio. This time the
irrecord utility worked just fine. Armed with my new lirc.conf, I swapped my RuneAudio SD card back in and gave it a try.
From there on, it was just a case of following the rest of the guide; everything else worked perfectly. I had to change a few lines in the example
/etc/conf.d/lircrc to match the buttons on my specific remote. I also added a stop option (mapped to the ‘menu’ button on the remote), and set the ‘OK’ button to start playing from the beginning of the current queue rather than the currently selected track.
With everything now up and working, all that remained was to modify the remote slightly. I painted over the text on the ‘MENU’ button and replaced it with a little white stop icon.
So now I have pretty much exactly the setup that I want. If I want to edit the playlist to add or remove files or albums, I can do this easily via the web interface. If I am sitting at my computer, this is a trivial effort, if not then doing it via my phone is still slightly less of a faff than finding a CD, getting it out and putting it in the drive. Once the music that I want is loaded, I can start and stop playback and navigate through the playlist by remote control just as I would with any other player. Hurrah!