-
-
Notifications
You must be signed in to change notification settings - Fork 538
Description
Creating a software request
Formal software information
- Software title | Plexamp headless
- Short description | use device as a Plexamp audio streaming endpoint
- Official URL (if available) | https://plexamp.com
- GitHub URL (if available) | n/a
- (Official) install documentation | https://forums.plex.tv/t/plexamp-on-the-raspberry-pi/791500
Are there similar/alternative software titles available with DietPi-Software?
Plex Media Server
What makes your requested software better than the above solutions, if available?
Plexamp headless is a dedicated remote controllable music playback app, works with Plex Media Server, which is preferably running elsewhere
How can DietPi make the installation easier or compatible, than following the install instructions or do APT installation, if available?
current instructions are general and assume Linux terminal knowledge, requires user to install/update dependencies (such as nodejs) and edit systemd service files ... Plex reps might make install easier in the future, but as of now no details/timeline have been provided ... there are community supported installers, for example this one already provides best effort support for install on DietPi, but supporting in dietpi-software might make it easier for users to install and use alongside other audio/streaming apps such as shairport-sync or roonbridge
Can you provide the installation steps that you would suggest DietPi-Software to do?
- confirm user to use for install and systemd service (default: dietpi), add to audio group as needed
- (optional ... not required for install, but helpful) show list of audio devices, have user confirm desired device (HAT, USB DAC, etc.) is available
- install nodejs (currently Plexamp headless requires node 16) ... easiest to install DietPi system version if this matches what is required by Plexamp, but required version for Plexamp might change out of sync with DietPi ... in which case it's also possible to use nvm and keep a separate version of nodejs just for Plexamp (example script below gives example of an nvm-based install)
- install other dependencies as needed (jq, bzip2, wget, tar)
- download and extract target version of Plexamp headless in user home directory
- prepare systemd service files (edit defaults provided by Plex)
- start initial Plexamp instance, user will be asked to copy/paste Plex claim code (initial install only)
- exit installer and start/restart Plexamp service as needed
- instruct user to complete app configuration at
<hostname or ip>:32500
example bash install script using nvm (this example assumes script run by non-root user with sudo) ...
#! /bin/bash
# install Plexamp headless on a Raspberry Pi or similar system
# uses nvm to install/manage node version, Plexamp currently requires node 16
# usage: from user home directory, bash ./plexamp-install.sh
#
# install nvm
cd $HOME
if [ ! $HOME/.nvm ]; then
mkdir $HOME/.nvm
fi
export NVM_DIR="$HOME/.nvm"
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
# install or update node 16
nvm install 16
NODE=$(node -v)
# bzip2 jq for current install and future upgrades
sudo apt install jq bzip2
# backup current
cd $HOME
rm -rf plexamp.last
mv -f plexamp plexamp.last
# download and extract Plexamp archive
# hardcoded version below, will update as needed
wget -O plexamp-temp.tar.bz2 https://plexamp.plex.tv/headless/Plexamp-Linux-headless-v4.6.1.tar.bz2
tar -xjvf plexamp-temp.tar.bz2
rm plexamp-temp.tar.bz2
# prepare Plexamp systemd service
cd $HOME/plexamp
sed -i "s/User=pi/User=$USER/" plexamp.service
sed -i "s/home\/pi/home\/$USER/" plexamp.service
sed -i "s/usr\/bin\/node/home\/$USER\/.nvm\/versions\/node\/$NODE\/bin\/node/" plexamp.service
sudo cp plexamp.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable plexamp.service
# start initial Plexamp session
node js/index.js
other relevant notes/info ...
[requires]
- Plex Media Server running elsewhere and a Plex Pass subscription
- system with a 64-bit compatible ARM or x86_64 CPU
- audio device attached/enabled (on-board audio, USB audio, HAT, etc.)
- DietPi OS based on Debian Bullseye or later (as of Jan '23, glibc >= 2.31)
- recommend system with >= 1GB DRAM for best performance
[app install]
- as of Jan '23, Plexamp execution requires nodejs version 16
- nodejs install/updates can use nvm (allows Plexamp nodejs version <> system)
- install and updates require jq, bzip2, wget, tar
- initial install requires manual Plex claim token entry
- Plexamp runs as non-root user with app/config/log files in user home directory
- install configures systemd system service for Plexamp autostart
[app updates]
- Plex provided update script used for most app updates
- run latest installer if updates to nodejs (and/or nvm) are needed
[app configuration and usage notes]
- adjust audio device gain setting as needed using alsamixer (Plexamp does not touch system/ALSA settings)
- :32500 for Plexamp device specific settings
- playback --> select audio device + desired settings for sample rate matching, volume leveling, preamp gain, and limiter
- advanced --> select desired settings for caching, etc. (recommend lowest 512MB cache size and Wi-Fi caching set to "Only next track")
- note: when Plexamp headless playback is paused/stopped, the audio device will be released after a short delay (about 10 sec)
[Plexamp log files]
~/.cache/Plexamp/log
Are you willing to help maintaining the software installation, e.g. in case of needed setup changes due to updates etc.? This is not needed, but could speed up our decision to implement it, as man power is always a topic 😉.
yes, I am willing and currently available to help maintain, but my bash skills are limited