I managed to get MusicIP (headless), sugarcube, and the MusicIP plugin
on raspberry pi LMS working with the help of Qemu. This is a inexpensive
and simple setup without requiring an intel processor architecture.

For my 25k track collections, a new mix keeps one core of the raspberry
pi 2 busy for approximately 10 seconds, while LMS continues to play in
the background.
Basically all is working so far. I have not tested validation of music,
as all my tracks have been validated and fingerprints archived using the
Windows version of MusicIP. Scanning / adding 25k tracks to MusicIP
takes approximately 30 minutes
High Level tutorial (I used a Max2Play installation of LMS):


Download and unpack MusicIP 1.8 for linux
(http://www.spicefly.com/article.php?page=musicip-software)


You have to edit your /etc/apt/sources.list file and every file in
/etc/apt/sources.list.d, adding [arch=armhf] behind each occurence of
deb.
So for example the line
-deb http://archive.raspbian.org/raspbian jessie main contrib non-free-
would become
-deb [arch=armhf] http://archive.raspbian.org/raspbian jessie main
contrib non-free-

For the Max2Play installation, following two files had to be modified:
sudo nano /etc/apt/sources.list
sudo nano /etc/apt/sources.list.d/raspi.list


Next, we have to add package sources for i386 packages to our apt
configuration. We'll do it the obvious way and take the official Debian
repositories.
Of course you are free to choose other mirrors, if you prefer.
To do that, you create the file /etc/apt/sources.list.d/i386.list via
sudo nano /etc/apt/sources.list.d/i386.list and insert the following:

deb [arch=i386] http://ftp.debian.org/debian/ jessie main contrib
non-free
deb [arch=i386] http://ftp.debian.org/debian/ jessie-updates main
contrib non-free
deb [arch=i386] http://security.debian.org/ jessie/updates main contrib
non-free


Then add the i386 architecture and update packages:
sudo dpkg --add-architecture i386
sudo apt-get update



Install binfmt, qemu and libc for i386:
sudo apt-get install binfmt-support qemu-user
sudo apt-get install libc6:i386

Ignore warnings about certificates


You can start the MusicMagic server (in my case installed in the pi
home-directory):
sudo /home/pi/MusicIP/MusicMagicMixer/MusicMagicServer start
It should be accessible viahttp://localhost:10002/server

ignore warnings about ERROR: ld.so: object
'/usr/lib/arm-linux-gnueabihf/libarmmem.so' from /etc/ld.so.preload
cannot be preloaded (cannot open shared object file): ignored, the
server runs anyway.


To start the sever everytime when the raspberry boots: 
sudo cp /home/pi/MusicIP/MusicMagicMixer/mmserver /etc/init.d
cd /etc/init.d
sudo nano mmserver 

Edit the file and add the header for the init daemon, adapt the pathes.
My version looks like:

-
------------
#! /bin/sh

### BEGIN INIT INFO
# Provides:          mmserver
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start MusicIP daemon at boot time
# Description:       Enable service provided by daemon.
### END INIT INFO



# NON-PRIVIELEGED USER TO RUN MUSICMAGICSERVER.
USER=pi
# PATH TO THE MUSICMAGICMIXERSERVER 
export MUSICHOME=/home/pi/MusicIP/MusicMagicMixer/
case $1 in
start)
# next line was original
#       su - $USER -c $MUSICHOME"MusicMagicServer start  & > /dev/null" 
sudo -u pi /home/pi/MusicIP/MusicMagicMixer/MusicMagicServer start & >
/dev/null 2>&1
        echo "Running MusicMagicServer"
        exit
        ;;
stop)
# next line was original
#       su - $USER -c $MUSICHOME"MusicMagicServer stop  & > /dev/null" 
sudo -u pi /home/pi/MusicIP/MusicMagicMixer/MusicMagicServer stop & >
/dev/null 2>&1
        echo "Stopped MusicMagicServer"
        exit
        ;;
*)
echo "Usage: /etc/rc.d/init.d/mmserver { start | stop }"
        exit
        ;;
esac


---------


Then register the start script and reboot:
sudo update-rc.d mmserver defaults
sudo reboot


The MusicIP plugin should run out of the box (may require restart of LMS
to recognize the MusicIP server in case LMS is started to early). 



Spicefly Sugarcube requires some modifications to prevent timeouts
(maybe C Parker can create a new version with these extended timeouts
included):

Modifications in plugin.pm (line number for version 4.75 of sugarcube):

Original Plugin.pm line 666:-
my$http=Slim::Networking::SimpleAsyncHTTP->new(\&ScalarLoop,\&gotErrorViaHTTP,{caller=>'Spicefly',callerProc=>\&ArrayLoop,client=>$client});-

New modified line 666:
-my$http=Slim::Networking::SimpleAsyncHTTP->new(\&ScalarLoop,\&gotErrorViaHTTP,{caller=>'Spicefly',callerProc=>\&ArrayLoop,client=>$client,timeout=>60});-

Original line 887:
-if($sugarcube_activefilter eq '0'||$sugarcube_activefilter eq
'(None)'){$log->debug("Genre Filter is not
set\n");}else{$mypageurl=($mypageurl.'&filter='.$sugarcube_activefilter);}}my$http=Slim::Networking::SimpleAsyncHTTP->new(\&ScalarLoop,\&gotErrorViaHTTP,{caller=>'SpiceflyAutoMix',callerProc=>\&AutoStartMix,client=>$client});-

New line 887:
-if($sugarcube_activefilter eq '0'||$sugarcube_activefilter eq
'(None)'){$log->debug("Genre Filter is not
set\n");}else{$mypageurl=($mypageurl.'&filter='.$sugarcube_activefilter);}}my$http=Slim::Networking::SimpleAsyncHTTP->new(\&ScalarLoop,\&gotErrorViaHTTP,{caller=>'SpiceflyAutoMix',callerProc=>\&AutoStartMix,client=>$client,timeout=>60});-

original line 925:
-my$http=Slim::Networking::SimpleAsyncHTTP->new(\&ScalarLoop,\&gotErrorViaHTTP,{caller=>'SpiceflyAlarm',callerProc=>\&AlarmFired,client=>$client});
-
New line 925:
-my$http=Slim::Networking::SimpleAsyncHTTP->new(\&ScalarLoop,\&gotErrorViaHTTP,{caller=>'SpiceflyAlarm',callerProc=>\&AlarmFired,client=>$client,timeout=>60});-

Old 166:
-my$http=Slim::Networking::SimpleAsyncHTTP->new(\&ScalarLoop,\&gotErrorViaHTTP,{caller=>'SpiceflyONE',callerProc=>\&sc_one_off,client=>$client});-

New 166: 
-my$http=Slim::Networking::SimpleAsyncHTTP->new(\&ScalarLoop,\&gotErrorViaHTTP,{caller=>'SpiceflyONE',callerProc=>\&sc_one_off,client=>$client,timeout=>60});-


Changes in Sugarcube's Common.pm 
Old line 94:
                        -timeout  => 5,-
                        
New line 94: 
                        -timeout  => 60,-



Restart LMS and Sugarcube should be running.


------------------------------------------------------------------------
frankd's Profile: http://forums.slimdevices.com/member.php?userid=52885
View this thread: http://forums.slimdevices.com/showthread.php?t=106958

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to