07-09-2022, 09:56 PM
(This post was last modified: 11-18-2022, 04:14 PM by pjv14.
Edit Reason: Updated for Plexamp v 4.5.3 and moOde 8.2.2
)
[NOTE: Updated 11/18/2022 for version 4.5.3 of Plexamp & version 8.2.2 of moOde]
Plex has recently released an all-new headless 64-bit RPi version of Plexamp. It’s been long-awaited by certain Plex gearheads (including me). With the new 64-bit moOde I’ve been itching to put them together on one Pi.
At some point I may have time to attempt a cleaner integration with Plexamp acting like an external renderer much like the roonbridge component (and throw Tim some PRs), but having looked at it, I have to admit two things:
1. It would be a lot of work (and I’m short on spare time right now)
2. It actually works OK side-by-side with the only real kludgy part being that when you stop playing something via moOde / MPD you have to wait a few seconds before you can start playback via Plexamp and vice versa. Each one takes a little time to let go of the alsa device. In practice it’s not that bad in my opinion.
So here is a step-by-step guide to installing Plexamp (v. 4.5.0) side-by-side with 64-bit moOde v. 8.2.2+ on a Pi (I have this running on a 3B+).
NOTE: you do need to have a Plex Media Server and be a Plex Pass subscriber to use Plexamp (but this is probably not an interesting topic for you if you are not).
First you need to get SSH access to your moOde install. All of the following commands take place starting in the /home/pi directory (which is where you should be when you access your moOde install via SSH). If you don’t know how to SSH into moOde, check the first part of the setup guide.
Next we’re going to install nvm which allows us to install specific versions of node:
and then use nvm to install node version 16.18.1:
Next we download headless Plexamp v 4.5.3:
And then untar it into a ‘plexamp’ directory:
Then go into the plexamp directory
Then we are going to make some adjustments to the file called ‘plexamp.service’
We need to add a line that gives time for moOde to start up completely and also change the line that starts with ‘ExecStart’ so that it uses the new version of node that we installed above. Substitute in the following two lines for the existing line 9 so that it reads like this:
Here’s what the whole plexamp.service file should look like when you are done with this edit:
Next we will copy that file into the right place in the systemd file structure so that the Pi will start the Plexamp service automatically and keep it running for you.
Then tell systemd about that new plexamp service file:
Then tell systemd that it should start plexamp whenever the system boots:
Next you need to do an initial run of plexamp from the terminal to register the device with Plex (hat tip @tpavey on plex forum):
Follow the prompts in the terminal which include registering your plexamp install via a visit to a web page.
Finally, tell systemd to start plexamp up right now:
Congratulations. You now have headless plexamp running side-by-side with moOde on your Pi. You configure Plexamp via a web app (just like moOde). The Plexamp app is on port 32500, so if you connect to moOde at http://192.168.1.10, you would connect to Plexamp’s interface at http://192.168.1.10:32500 (substitute in your own moOde IP address). You want to do some basic configuration for your Pi under settings (little gear icon) then “Playback”.
Documentation for headless Plexamp is kind of scattered through many posts tagged Plexamp on the Plex Forum.
Plex has recently released an all-new headless 64-bit RPi version of Plexamp. It’s been long-awaited by certain Plex gearheads (including me). With the new 64-bit moOde I’ve been itching to put them together on one Pi.
At some point I may have time to attempt a cleaner integration with Plexamp acting like an external renderer much like the roonbridge component (and throw Tim some PRs), but having looked at it, I have to admit two things:
1. It would be a lot of work (and I’m short on spare time right now)
2. It actually works OK side-by-side with the only real kludgy part being that when you stop playing something via moOde / MPD you have to wait a few seconds before you can start playback via Plexamp and vice versa. Each one takes a little time to let go of the alsa device. In practice it’s not that bad in my opinion.
So here is a step-by-step guide to installing Plexamp (v. 4.5.0) side-by-side with 64-bit moOde v. 8.2.2+ on a Pi (I have this running on a 3B+).
NOTE: you do need to have a Plex Media Server and be a Plex Pass subscriber to use Plexamp (but this is probably not an interesting topic for you if you are not).
First you need to get SSH access to your moOde install. All of the following commands take place starting in the /home/pi directory (which is where you should be when you access your moOde install via SSH). If you don’t know how to SSH into moOde, check the first part of the setup guide.
Next we’re going to install nvm which allows us to install specific versions of node:
Code:
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
and then use nvm to install node version 16.18.1:
Code:
nvm install v16.18.1
Next we download headless Plexamp v 4.5.3:
Code:
wget https://plexamp.plex.tv/headless/Plexamp-Linux-headless-v4.5.3.tar.bz2
And then untar it into a ‘plexamp’ directory:
Code:
tar xjf Plexamp-Linux-headless-v4.5.3.tar.bz2 plexamp/
Then go into the plexamp directory
Code:
cd plexamp
Then we are going to make some adjustments to the file called ‘plexamp.service’
Code:
nano plexamp.service
We need to add a line that gives time for moOde to start up completely and also change the line that starts with ‘ExecStart’ so that it uses the new version of node that we installed above. Substitute in the following two lines for the existing line 9 so that it reads like this:
Code:
ExecStartPre=/bin/sleep 30
ExecStart=/home/pi/.nvm/versions/node/v16.18.1/bin/node /home/pi/plexamp/js/index.js
Here’s what the whole plexamp.service file should look like when you are done with this edit:
Code:
[Unit]
Description=Plexamp
After=network.target
[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi/plexamp
ExecStartPre=/bin/sleep 30
ExecStart=/home/pi/.nvm/versions/node/v16.18.1/bin/node /home/pi/plexamp/js/index.js
Restart=on-failure
[Install]
WantedBy=multi-user.target
Next we will copy that file into the right place in the systemd file structure so that the Pi will start the Plexamp service automatically and keep it running for you.
Code:
sudo cp plexamp.service /lib/systemd/system/
Then tell systemd about that new plexamp service file:
Code:
sudo systemctl daemon-reload
Then tell systemd that it should start plexamp whenever the system boots:
Code:
sudo systemctl enable plexamp
Next you need to do an initial run of plexamp from the terminal to register the device with Plex (hat tip @tpavey on plex forum):
Code:
node js/index.js
Follow the prompts in the terminal which include registering your plexamp install via a visit to a web page.
Finally, tell systemd to start plexamp up right now:
Code:
sudo systemctl start plexamp
Congratulations. You now have headless plexamp running side-by-side with moOde on your Pi. You configure Plexamp via a web app (just like moOde). The Plexamp app is on port 32500, so if you connect to moOde at http://192.168.1.10, you would connect to Plexamp’s interface at http://192.168.1.10:32500 (substitute in your own moOde IP address). You want to do some basic configuration for your Pi under settings (little gear icon) then “Playback”.
Documentation for headless Plexamp is kind of scattered through many posts tagged Plexamp on the Plex Forum.