Plexamp Music Streaming with Raspberry Pi Zero

ElectronicsHardwareLinuxMedia CenterSelf Hosted

Written by:

I’ve been a Plex user for a very long while. They’ve recently put a lot of effort into the re-vamped Plexamp music player and it’s quickly become my primary means of listening to my music library. I wanted to be able to stream Plexamp to my hi-fi stereo the same way I do other music, and of course this is a problem that can be solved with a Raspberry Pi.

MATERIALS

This is stuff I had laying around in my electronics bin, any Pi with any type of soundcard (whether a hat or USB).


SETTING UP THE PI

First step to any Pi project, flash the latest version of Raspberry Pi OS (formerly known as Raspbian). I use Etcher to do this.

Before booting the Pi up I like to go ahead and configure it so I won’t have to connect it to a monitor.

Enable SSH by default by creating an empty file /boot/ssh

touch /boot/ssh

Then set up the WiFi connection by creating /boot/wpa_supplicant.conf with the following:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=<Insert 2 letter ISO 3166-1 country code here>

network={
 ssid="<Name of your wireless LAN>"
 psk="<Password for your wireless LAN>"
}

Just fill out your WiFi information there at the bottom.

Now the Pi is ready to boot up. This step will be specific to your audio DAC or soundcard, but if you bought that same one I linked above you run it’s setup script:

sudo wget -O - script.raspiaudio.com | bash -

Reboot and test your DAC

speaker-test -l5 -c2 -t wav 

SETTING UP PLEXAMP

The official instructions for this are here on the Plex forums, but they’re a little dated.

The first problem is Plexamp depends on an outdated version of NodeJS 9.11.2, and this version is not available for the Pi Zero in the Debian repository. So we’re going to have to install it manually. The NodeJS archive of tarballs is here and for the Pi Zero we want ARM6L version.

wget https://nodejs.org/download/release/v9.11.2/node-v9.11.2-linux-armv6l.tar.gz

To install, extract it to /usr/local

sudo tar -C /usr/local --strip-components=1 -xzf node-v9.11.2-linux-armv6l.tar.gz

Now download Plexamp

wget https://files.plexapp.com/elan/Plexamp-v2.0.0-rPi-beta.2.tar.bz2

Unpack it

bunzip2 Plexamp-v2.0.0-rPi-beta.2.tar.bz2
tar -xvf Plexamp-v2.0.0-rPi-beta.2.tar

Open the plexamp.service file and change the ExecStart line to read /usr/local/bin/node instead of /usr/bin/node

Copy the service file and enable it

sudo cp /home/pi/plexamp/plexamp.service /lib/systemd/system/plexamp.service
sudo systemctl daemon-reload
sudo systemctl enable plexamp
sudo systemctl start plexamp
sudo systemctl status plexamp

You can now cast to your Plexamp from the Plex Web UI!

RELATED >>  Flashed CC2531 Zigbee Sticks for zigbee2mqtt Available


I hope Plex continues to improve upon this beta – Plexamp has changed the way I listen to my music library. There is obviously a lot of demand for DIY audio streaming solutions – the number of projects dedicated to this exact problem – Volumio, Roon, Logitech Media Server, Mopidy, etc. etc – is huge. Plex is a great self hosted solution, but it needs more DIY solutions to make sure all that media can be streamed to all devices.


Leave a Reply

Your email address will not be published. Required fields are marked *