Suggestions for the future: Headless RPi support!

@vuckozagi ReplayGain is great feature. The idea is that you increase the volume control on your amplifier until it is the loudness you want, and then all the music will be played at that loudness regardless of the mastering of the music.

Definitively love the ReplayGain I just could not figure out why is the level lower.
However I cannot control the volume from iOS Plex app.

Is it possible to use Icecast2 as output? So you could stream directly to a Sonos.

Forgive my ignorance here as I do enjoy these “passion” projects.

What would this give me versus using a Chromecast audio? I do realize that the pi hat could allow for higher quality audio output (assuming you buy the correct hat) but is there anything else?

@johnny15 Chromecast audio won’t do gapless playback (especially of hi-res). Also there are a limited set of audio codecs supported for Chromecast audio. For example I have much of my library in apple lossess m4a, and it won’t play back without transcoding. If you don’t care about those things, the Chromecast is a great device.

@christopherru Thanks for the reply and insight. I wouldn’t say I “don’t care” about those things but I don’t have any lossless audio in my library and unfortunately, I don’t have the audio equipment that I’d probably be able to tell the difference with when listening to if I did have any lossless audio. :s

The instructions provided by @elan are spot on, thanks! I have a bluetooth sound bar configured using Pulseaudio (it’s a hack to put it together, I’ll admit) however I’m not sure of how to update the mapping in the mpd.conf file as @plexerix has with the USB DAC to utilize the bluetooth device as an audio output option. Has anyone had luck using a bluetooth audio device?

Thought I had all the right ingredients but can’t start the plexamp service.

pi@raspberrypi:~ $ systemctl status plexamp
● plexamp.service - Plexamp
   Loaded: loaded (/lib/systemd/system/plexamp.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2018-05-07 15:58:59 UTC; 3min 19s ago
  Process: 484 ExecStart=/usr/bin/node /home/pi/plexamp/server/server.prod.js (code=exited, status=203/EXEC)
 Main PID: 484 (code=exited, status=203/EXEC)

I copied the contents of my Mac’s server.json file and pasted them into a new server.json file at /home/pi/.config/Plexamp/

I installed node.js using a different guide (the PiZero hardware isn’t supported with the command in the instructions) - http://eddielee.me/running-node-js-on-a-raspberry-pi-zero/ - the script references a setup file for node v9, but I installed the latest (is that my problem?)

pi@raspberrypi:~ $ node -v
v10.0.0
pi@raspberrypi:~ $ npm -v
5.6.0

extracted the app

pi@raspberrypi:~ $ ls /home/pi/plexamp/
resources  server

copied the service file to /lib/systemd/system/

pi@raspberrypi:~ $ cat /lib/systemd/system/plexamp.service 
[Unit]
Description=Plexamp
After=network.target

[Service]
Environment=
Type=simple
User=pi
ExecStart=/usr/bin/node /home/pi/plexamp/server/server.prod.js
Restart=on-failure

[Install]
WantedBy=multi-user.target

pi@raspberrypi:~ $ 

Did everything to try to start the service, even rebooted. No profit? Do I just need to get on a lower version of node, or am I missing something else?

@cdlenfert I had to downgrade my node to v9 to get plexamp running on my pi zerow.

Thanks for the feedback @christopherru . Just downgraded. Made sure to run through the whole setup as Pi users (previously I did sudo su to save time). Still no love starting the service. Back to the drawing board I suppose.

pi@raspberrypi:~ $ node -v
v9.11.1
pi@raspberrypi:~ $ npm -v
5.6.0

@cdlenfert If you run node /home/pi/plexamp/server/server.prod.js you should be able to view any relevant errors in the console.

@christopherru thanks again. I realized I didn’t have node or npm folders in /usr/bin/ but rather /usr/local/bin, so I moved them and updated my path in .profile. That didn’t seem to change anything however.

I ran your command to see the errors.

error: CODEC: Error reading device identifier Error: ENOENT: no such file or directory, open '/home/pi/.local/share/Plexamp/Codecs/.device-id'

error: [MPD] Error connecting:Error: connect ECONNREFUSED 127.0.0.1:36600

error: Unhandled Rejection! EACCES: permission denied, open '/home/pi/.config/Plexamp/resources-server.json'
error: Error: EACCES: permission denied, open '/home/pi/.config/Plexamp/resources-server.json'
    at Object.fs.openSync (fs.js:660:18)
    at e.save (/home/pi/plexamp/server/server.prod.js:1:15580)
    at /home/pi/plexamp/server/server.prod.js:1:9853
    at Generator.next ()
    at r (/home/pi/plexamp/server/server.prod.js:1:8128)
    at /home/pi/plexamp/server/server.prod.js:1:8222
    at 
    at process._tickCallback (internal/process/next_tick.js:182:7)

error: Uncaught Exception! EACCES: permission denied, open '/home/pi/.config/Plexamp/resources-server.json'

On the last error there is no resources-server.json file. Only server.json

It does reference all of my servers and my devices, so some connection seems to be made. Not sure what to try next.

@cdlenfert EACCES error sounds like permission issues. Check that user pi has ownership of all relevant folders.

I had asked about icecat and plexampp. Now I found the following configuration for MPD:

    audio_output {
    	type		"httpd"
    	name		"My HTTP Stream"
    	encoder		"vorbis"		# optional
    	port		"8000"
    #	quality		"5.0"			# do not define if bitrate is defined
    	bitrate		"128"			# do not define if quality is defined
    	format		"44100:16:1"
    	always_on       "yes"			# prevent MPD from disconnecting all listeners when playback is stopped.
    	tags            "yes"			# httpd supports sending tags to listening streams.
    }

Unfortunately, this does not work, it depends on the used mpd version together?

Sorry for my bad english.

@christopherru said:
@cdlenfert EACCES error sounds like permission issues. Check that user pi has ownership of all relevant folders.

I went back through and ensured the pi user had permissions on all relevant (i hope) directories and files. Then the EACCESS errors all cleared out but MPD errors remained.

I am also running forked-daapd service which has an MPD server built in, so I disabled that, and finally the status of Plexamp became active. I’m using a USB sound card and tried changing the mpd.conf file as @plexerix outlined and restarted the plexamp service.

From my iPhone using the Plex app, I’m able to see the Raspberry Pi as a device to send to (or remote control) but when I try to play a song to it (which is really telling the pi to go get the song from my server right?) the iOS app just shows infinite loading. My PMS is definitely online and working as the mac version of plexamp pulls a stream immediately.

Double post (sorry). But I was able to get Plexamp running first try on my Pi3 and it’s running simultaneously with forked-daapd (not to mention I’ve got the Pi running PMS as well). I’ll see if I can get the Zero running well and share.

While deciding if I should even run Plexamp on the Pi3 (I don’t have it physically connected to any speakers) it occurred to me that I might be able to output Plexamp’s audio to a pipe. Forked-Daapd can pick up and audio pipe and stream it to multiple airplay receivers simultaneously for whole house audio. I very much want this! Anyone know how to set Plexamp to output audio to a pipe??

I seem to have gotten mpd to work on Debian in the version 20.19. and plexamp appears to be connecting to it just fine.
But now I keep getting the following error when trying to start the playback of a song.

error: Got exception playing media:  [5@0] {} unknown command "addidwithloudness"
error:  Error:  [5@0] {} unknown command "addidwithloudness"
    at r.receive (/opt/plexamp/server/server.prod.js:1:1647571)
    at Socket.<anonymous> (/opt/plexamp/server/server.prod.js:1:1647294)
    at Socket.emit (events.js:180:13)
    at addChunk (_stream_readable.js:274:12)
    at readableAddChunk (_stream_readable.js:257:13)
    at Socket.Readable.push (_stream_readable.js:218:10)
    at TCP.onread (net.js:581:20)

Does anyone have any suggestions?

Is there an ISO available for the Raspberry pi and/or a coherent set of instructions for installing it?

1 Like

@“robert.paisley@hotmail.co.uk” said:
Is there an ISO available for the Raspberry pi and/or a coherent set of instructions for installing it?

You can use my docker instructions they are pretty solid.

Thanks very much for that. Could you please post or send over the latest version to try out?