MADE MY OWN GUIDE FOR A OSMC INSTALLATION. MOST INFO IS FROM THE
ORIGINAL GUIDE AND I ADDED THE BITS AND PIECES THAT ARE SCATTERED IN
THIS THREAD. THANKS TO ALL INVOLVED.

The easiest is probably to download the linux version at
http://www.spicefly.com/article.php?page=musicip-software as Frank said,
then unpack it.
If you're not familiar with linux shell command, here is how to :
- open a terminal window
- download the file using wget, shell command

Code:
--------------------
    wget http://www.spicefly.com/files/mp/MusicMixer_x86_1.8.tgz
--------------------

- unpack :

Code:
--------------------
    tar xzvf MusicMixer_x86_1.8.tgz
--------------------


It will create a MusicIp directory

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.

Code:
--------------------
    sudo nano /etc/apt/sources.list
--------------------


So for example the line
deb http://archive.raspbian.org/raspbian stretchmain contrib non-free
would become
deb [arch=armhf] http://archive.raspbian.org/raspbian stretch main
contrib non-free

For the Max2Play installation, following two files had to be modified:

Code:
--------------------
    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 
Code:
--------------------
    sudo nano /etc/apt/sources.list.d/i386.list
--------------------
 and insert the following:

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


Then add the i386 architecture and update packages:

Code:
--------------------
    sudo dpkg --add-architecture i386
  sudo apt-get update
  
--------------------

Install binfmt, qemu and libc for i386:

Code:
--------------------
    sudo apt-get install binfmt-support qemu-user
  sudo apt-get install libc6:i386sudo qemu-i386 
--------------------


Start MMM:

Code:
--------------------
    /home/osmc/MusicIP/MusicMagicMixer/MusicMagicServer start
--------------------

It should be accessible via http://localhost:10002/server

Stop MMM: 

Code:
--------------------
    /home/osmc/MusicIP/MusicMagicMixer/MusicMagicServer stop
  
--------------------

Copy mmm.ini from the /home/osmc/MusicIP/MusicMagicMixer folder to
/home/osmc/.MusicMagic
or download a stripped version from http://spicefly.com/files/mp/mmm.ini
to /home/osmc/.MusicMagic

Code:
--------------------
    sudo cp /home/osmc/MusicIP/MusicMagicMixer/mmm.ini /home/osmc/.MusicMagic
--------------------

Make it editable: 

Code:
--------------------
    sudo chmod a+rw /home/osmc/.MusicMagic/mmm.ini
--------------------

edit mmm.ini and adjust the path for the cache, in my case to
/home/osmc/.MusicMagic/default.m3lib then save the file
Also edit in /home/osmc/MusicIP/MusicMagicMixer/mmm.ini the same way

Code:
--------------------
    sudo nano /home/osmc/.MusicMagic/mmm.ini
  sudo nano /home/osmc/MusicIP/MusicMagicMixer/mmm.ini
--------------------

If the folder /.MusicMagic isn't created, then you can add it with this:

Code:
--------------------
    mkdir .MusicMagic
--------------------


To start the server everytime when the raspberry boots: 

Code:
--------------------
    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 paths.
My version looks like:


Code:
--------------------
    #! /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=osmc
  # PATH TO THE MUSICMAGICMIXERSERVER 
  export MUSICHOME=/home/osmc/MusicIP/MusicMagicMixer/
  case $1 in
  start)
        # next line was original
        # su - $USER -c $MUSICHOME"MusicMagicServer start & > /dev/null" 
        sudo -u osmc qemu-i386 
/home/osmc/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 osmc qemu-i386 
/home/osmc/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:

Code:
--------------------
    sudo update-rc.d mmserver defaults
  sudo reboot
--------------------



Edit musicip.prefs and add: timeout: 120 at the end of the file.
Location: /var/lib/squeezeboxserver/prefs/plugin

Code:
--------------------
    sudo nano /var/lib/squeezeboxserver/prefs/plugin/musicip.prefs
--------------------


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). 



There is a Memory Leak in the Quemu emulation of Music IP and will lead
to high memory consumption over few weeks. 
Best way is to restart MusicMagic Server due to memory leak ever night,
in my case I chose at 4:00.
quick instructions using crontab:
At shell:


Code:
--------------------
    crontab -e
--------------------


Look at 2nd and third line stop at 4:00 and restart at 4:01 for adding
at your own setup, the first line was added already by max2play:


Code:
--------------------
    * * * * * /opt/max2play/start_audioplayer.sh > /dev/null 2>&1
  0 4 * * * /home/pi/MusicIP/MusicMagicMixer/mmserver stop
  1 4 * * * /home/pi/MusicIP/MusicMagicMixer/mmserver start
--------------------


save and exit and check if in crontab saved: 

Code:
--------------------
    crontab -l
--------------------

Reboot and musicIP should be restarted every night. this way it should
consume only single digit percentage of your raspberry pi memory.

When the Pi boots, LMS should be (re)started later than musicip. So do
the following:
Add this line to /etc/rc.local: 

Code:
--------------------
    sudo nano /etc/rc.local
  sleep 60;sudo /etc/init.d/logitechmediaserver restart
--------------------

Follow this guide to make it bootable:
http://www.itechlounge.net/2017/10/linux-how-to-add-rc-local-in-debian-9/


Also ensure that while scanning new music you set in the LMS GUI
settings - preferences - Database Memory Config to "normal", not high or
max. Otherwise you might run out of memory or you need to create large
swap files to cope with 1-2 GB memory consumption while importing
MusicIP info during the scan process.


Music IP Recipes work when recipes.xml is copied to
/home/pi/.MusicMagic


Music IP Filters work as well:
For adding filters: Make a backup of your library
(/home/pi/MusicMagic/default.m3lib), shutdown MusicIP server, open
default.m3lib in Musicmagic 1.8 for windows or Linux (e.g. by double
click on the library if shared with windows) add filters, do not modify
anything else save and restart MusicIP server
Do not use the 1.9 beta version, as it will destroy your library and
start your MusicIP server


Music IP moods work with some modifications of files:
Create playlist of source file for moods in LMS, save playlist as m3u.
Copy playlist to /home/pi/MusicMagic/moods/

Depending on the size of the mood source-playlist you might run into
timeouts of MusicIP. To prevent those you need to edit your
musicip.prefs:

- shut down LMS
- open plugin/musicip.prefs from your Prefs folder
- add "timeout: 120" to the end
- restart LMS


When you select a mood in the player, it might take 15-30 seconds to
load the mood, don't become impatient.


------------------------------------------------------------------------
CypherMK's Profile: http://forums.slimdevices.com/member.php?userid=62798
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