If you're running SqueezeCenter on your NAS (courtesy of Andreas/ Omega) then you might also want to integrate MusicIP with SqueezeCenter (again, courtesy of Andreas/ Omega). What follows is a guide explaining how to go about it. This guide is written for Linux users, but the principles apply equally in Windows and can easily be accomplished using a free GUI SSH client such as WinSCP.
Configuring the NAS
As your NAS runs Linux, you're only interested in obtaining the Linux version of MusicIP. Download the latest version of MiP from http://www.musicip.com/mixer/index.jsp. The current version at the time of writing is 1.8, and the filename is MusicMixer_x86_1.8.tgz
Open a terminal window in the folder you've saved the download to and type the following:This should copy the tar archive to a pre-existing folder called /raid/data/module/ on your NASCode:scp MusicMixer_x86_1.8.tgz email@example.com:/raid/data/module/
Now login to your NAS as follows:Extract the tar archive (this will create a MusicIP/MusicMagicMixer directory) and create the necessary folders:Code:ssh firstname.lastname@example.orgNow modify SqueezeCenter's startup script to start MiP prior to starting SqueezeCenter and also to terminate MiP when disabling the SqueezeCenter module. This is the unpleasant part (working in vi), but I'll guide you through it. If at any time you feel you've made a mistake and want to quit vi without saving changes, press <Esc>, type :quit! and press <Enter>Code:cd /raid/data/module/ gzip -dc MusicMixer_x86_1.8.tgz | tar xf - rm MusicMixer_x86_1.8.tgz cd MusicIP mkdir config log
Ok, let's get started:Using the down arrow on your keyboard, position the cursor one line BEFORE the start function. Tap the 'i' key on your keyboard to put vi into edit mode. Paste the following into the script at the cursor:Code:vi /raid/data/module/SQUEEZECENTER/Shell/module.rc
Using the down arrow on your keyboard, position the cursor one row ABOVE the line that reads 'export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SLIM_HOME/addlibs"'. Paste the following into the script at the cursor:Code:## BEGIN define MusicIP variables MM_CONF_DIR=/raid/data/module/MusicIP/config MM_LOG_DIR=/raid/data/module/MusicIP/log MM_EXE=/raid/data/module/MusicIP/MusicMagicMixer/MusicMagicServer ## END define MusicIP variablesUsing the down arrow on your keyboard, position the cursor one row BELOW the line that reads 'ProcKillall squeezecenter/Bin/i386-linux/mysqld'Code:## BEGIN Launch MusicIP server in headless mode if [ -x $MM_EXE ] ; then mkdir -p $MM_CONF_DIR $MM_LOG_DIR [ -d /.MusicMagic ] && mv /.MusicMagic $MM_CONF_DIR/SavedMusicMagicFromRootDir rm -f /.MusicMagic ~root/.MusicMagic ln -sf $MM_CONF_DIR /.MusicMagic ln -sf $MM_CONF_DIR ~root/.MusicMagic $MM_EXE -verbose start &>$MM_LOG_DIR/$(basename $MM_EXE).log & sleep 5 fi ## END Launch MusicIP server in headless mode
Paste the following into the script at the cursor:Exit vi's edit mode by pressing the <Esc> key on your keyboard, then type in the following to save your changes and quit vi:Code:## BEGIN kill MusicIP headless if [ -x $MM_EXE ] ; then $MM_EXE stop &>/dev/null fi ## END kill MusicIP headlessYou should now be back at the terminal command line.Code::wq
change directories to the config directory and create an mmm.ini file as follows:Once again, tap the 'i' key on your keyboard to enter edit mode, then paste in the following, changing MiP settings to suit your needs:Code:cd config vi mmm.iniOnce again exit vi's edit mode by pressing the <Esc> key on your keyboard, then type in the following to save your changes and quit vi:Code:[mix] mixsize=35 tracks restrict=25 tracks style=180 variety=1 seed=1 [server] proxy=0 host= proxyport=0 authentication=0 user= password= [services] key= cache=/raid/data/module/MusicIP/default.m3lib port=10002 tivo=0 upnp=0 api=1 readonly=0 refresh=15You should now be back at the terminal command line. It's now time to reboot the NAS to give effect to the changes you've made. Exit the ssh session (type exit, enter) and reboot the NAS via the web interfaceCode::wq
After rebooting the NAS you should be able to access MiP's HTTP API. Have it scan your NAS library by typing in the path to your music library in the text field next to the 'Add Music' button, then click the button to have MiP traverse your library and create /raid/data/module/MusicIP/default.m3lib. To be sure the m3lib file is committed to disk after the scan operation, open a browser window and flush the cache by pointing your browser to http://126.96.36.199:10002/api/flush.
Finally, open SqueezeCenter on the NAS and select Settings/Plugins and make sure MusicIP is ticked. At this point you should disable and then re-enable the SC module on the NAS to be able to access the MiP options in SqueezeCenter and to enable the integration scan to happen. Once you've restarted the SC module, go to Settings/Plugins/MusicIP settings and select Use MusicIP. SC should initiate a rescan, and you're done.
Enjoy, and don't forget to thank Andreas without whom this wouldn't have happened.
Results 1 to 1 of 1
2008-04-29, 00:47 #1
Installing and configuring MusicIP headless on your Thecus N5200/N5200PRO NAS
Last edited by egd; 2008-06-06 at 13:01.