pydPiper icon indicating copy to clipboard operation
pydPiper copied to clipboard

Re1.x install (RuneAudio 0.5 Rern editon)

Open Alien8ions opened this issue 5 years ago • 0 comments

Hi

I just like to inform anyone interested : the latest versions of RuneAudio (Rern's images) no longer make use of the redis server for sending status messages so the 'normal' Rune0.5 install script is no longer working Additionally I personally chose to go back to the dockerized version for now

That means a couple of changes have to be made. I'll try to outline them so anyone can follow the steps

  • Change (or create) the install script from the code below (don't run it immediately, some more changes need to be made to 2 other files)
#!/bin/bash

# use pacman manager to install docker
pacman -Sy docker
#
# Run pydPiper configure script

python2 configure.py
#
# Place pydpiper.service file into systemd directory
cp pydpiper.service /usr/lib/systemd/system/
#
# Enable and start the pydpiper service
systemctl daemon-reload
systemctl enable pydpiper.service
systemctl start pydpiper.service

echo "Wait a quite a few minutes on first load, docker pull needs to complete"
  • modify the configure.py file to reflect the docker settings for the rune installation : line 373 and following should now be (take care of proper indentation)
    elif config.get('SOURCE', 'source_type') == 'rune':
        serviceconfig.set('Unit', 'Requires', 'docker.service')
        serviceconfig.set('Unit', 'After', 'network.target')
        serviceconfig.set('Service', 'ExecStart', '/usr/bin/docker run --rm --network=host --privileged -v /var/log:/var/log:rw -v /root/pydPiper:/app:rw dhrone/pydpiper:v0.31-alpha python /app/pydPiper.py')
  • The mpd can be used as a source for the status/song info, but an old oversight hasn't been changed so change the file pydPiper/sources/musicdata_mpd.py lines 161 and following to (take care of proper indentation)
		if self.musicdata[u'uri'].split(u':')[0] == u'http':
			stream = u'webradio'
			encoding = u"webradio {0}".format(self.musicdata[u'bitrate'])
		elif self.musicdata[u'uri'].split(u':')[0] == u'https':
			stream = u'webradio'
			encoding = u"webradio {0}".format(self.musicdata[u'bitrate'])
		else:
			encoding = self.musicdata[u'uri'] 
			encoding = encoding[-4:].strip(u'.')
			stream = u'not_webradio'

		self.musicdata[u'encoding'] = encoding
		self.musicdata[u'stream'] = stream

(Yes I know, these changes are a bit more than strictly necessary) but for now, the 'stream' variable is used in all other 'sources' to differentiate between a webradio and a music file, this solves that issue, otherwise compatibility is compromised

  • now you can run the abovementioned install script it'll install the docker files, and run the pydpiper configuration script now select mpd as the 'source' instead of rune, all other settings are the same for eg. volumio or older RuneAudio versions As indicated, it'll take some time the first time you run the main script as the docker files need to download

I'll leave this issue open for a while as there seems no option to keep it 'visible' and the closed issues probably won't get noticed that easily (but for me obviously this 'issue' could be closed) maybe dhrone could incorporate this into the main branch

I hope this can help fellow pydPiper users along A8

Alien8ions avatar Oct 07 '19 15:10 Alien8ions