Remote LAN Music Player:
Raspberry Pi and Rasplex

Remote LAN Rasplex Raspberry Pi music player

An amazingly simple solution to what could have been a big headache!

I wanted a way of playing music in my kitchen via some ceiling speakers. The player and amplifiers are to be hidden away in a kitchen cupboard, but I needed some sort of remote control.

Design Considerations

Remote Control Options

The undesirable option:

Use a screen in the cupboard and IR / RF remote to operate some media centre.

This is undesirable, as you need to have the cupboard door open to see the screen, or mount the screen on view, so you can see what you're doing with the remote. You'd also need to be stood near the screen to see it, which defeats the point of it being remote - this was not an option.

The desirable option:

To leave the cupboard closed, and control the music form my phone / tablet / laptop / device with screen where I can select the music, and instruct the player to get on with it.

I wanted to avoid "Casting" or "Air Playing", as this would rely on my wireless device steaming the content across the network to the device, taking up valuable bandwidth. I wanted a device that could read the files directly across Ethernet from my Plex Media Setver (PMS), after having wirelessly just been given the instruction to do so, saving clogging up my WiFi.

Remote LAN Rasplex Raspberry Pi music player

Solution using Plex Media Server and Rasplex

I use Plex Media Server (PMS) at home and away to play my Music, films and TV. I also use OSMC and Kodi for other devices in the house, so am familiar with both approaches.

With a little guidance form the Plex.tv forum I found it was possible to remotely control a Plex Client, and "Fling" media at it using another client via "Plex Companion". I had a spare Raspberry Pi 2 available to use as a Plex Client, so gave it a go using RasPlex.

Testing the idea

Software Installation

The Rasplex installer made it easy to install the OS straight to micro SD card with no bother.

Configuration gave a little hassle, as the OS comes with no Timeservers set, but once I realised and got these set using pool.ntp.org servers, setting the system time, it talked happily to my Plex Media Server!

Then it's just a case of logging in, and on you go!

Time to go Headless

Unplugging the screen and keyboard meant it was on it's own, independent, flying the nest...

And to my amazement, it worked like a dream... I had the ability to control flung media using a phone, tablet and PC using the web app, it was amazing.

Remote LAN Rasplex Raspberry Pi music player

Connected literally by Power, Ethernet and Analogue Audio Out, it played, paused, shuffled, and did everything my phone told it to do!

Controlling it

It was very easy to control using other Plex clients, such as my phone below:

Remote LAN Rasplex Raspberry Pi music player

Once the RasPlex option is set in the controlling client, any media selected to play will not play from the controlling client, but will play through the target client.

You can use several clients at the same time to control the media, starting playback from a phone, changing the album with your computer, and stopping it later with a tablet.

System build

As I was happy with the system architecture ideas, it was time to start making... This was a bit of a rush job, as the target date was Christmas day 2017 as we were entertaining the family!

HiFiBerry

To greatly improve the audio output quality, I added a HiFiBerry DAC+ board to the Raspberry Pi.

Amplifiers

I picked up some cheap Class D amplifier boards from Ebay. They are not the best quality in the world, but for background music, were worth trying.

3 x amplifier boards were purchased as I'd previously installed ceiling speakers and wiring for 3 zones of the kitchen diner.

Volume control

Each zone has its own potentiometer for volume control. I installed 4 as there is future provision for speakers in the garden.

From a mobile device it is possible to control the volume of the Raspberry Pi / RasPLEX output, but having control over the individual zones is critical to balance the system.

Amplifier power

The system is running from a 24V power supply unit, which is the top end of the amplifier supply voltage specification.

I will try using a 12V supply as the speakers are plenty loud enough with the volume controls turned down low. This will give me better volume control, and also will be less wasteful.

Adjacent to each volume control is a small double-pole switch to activate each amplifier (and hence, zone). One pole of each switch simply interrupts power to each amplifier, turning it on or off. The other poles of each switch are connected in parallel, taking 5V from the Raspberry Pi power, and using it to control a relay, which in turn controls the mains 230Vac to the amplifier PSU. This way, when any switch is on, the PSU will provide DC to the switches, but only the amplifier who's switch is on will be energised.

Chassis

My intention was always to make this a compact unit to hide in a kitchen cupboard. So, as these amplifiers were quite flat, as is the Raspberry Pi, I constructed a flat plate chassis to mount the boards, with angle section making the sides where needed. I installed the potentiometers and switches along the front edge angle section. the whole thing could then be hung under a cupboard shelf.

The height limitation of this chassis meant modifying the HiFiBerry board, as the RCA sockets were too high, so off they came. To take audio from the board (in a compact manner) I installed a 90 degree "mini Molex" kk series 3-way header to 3 very convenient via holes provided by the nice people at HiFiBerry! I then crimped the mating connector to some screened cable to go to the volume control potentiometers.

Conclusion

Overall it is fantastic. Simply fantastic. But as of time of writing, there is one area for improvement, volume control... Adjusting the volume via phone app changes the phone's ringer volume, not the remote player. By web interface on a PC, the volume slider works, but is quite coarse.

Big thanks to the PLEX and RasPLEX developers - it's great!