Logitech Media Server

I think I can safely assume that all of us at least one time in ours life listened radio. It’s a great to have “something to play in background” while we enjoy other things. Let’s turn our raspi into greatest radio you’ll ever have.

Logitech back in 2001 introduced first Squeezebox device, It just played music / radio from central server over local network. One great thing about it – it is fully open source. Unfortunately logitech discontinued the line but server and a couple of players preserved and can now be installed on multitude of devices including raspi. Thanks to Allthingpi LMS installation is now painless which we’ll see in a second.

As usual, update and upgrade

Install required libraries:

Instal patch, we’ll use it later on.

Download and install LMS:

By default LMS starts arter installation but there are a couple of things to do for LMS to work properly on raspi, stop LMS.

Download package with scripts and patches prepared for raspi to temporary folder of your liking.

Patch bootstrap:

Move files into place, create symbolic links, refresh dynamic linker bindings.

Make sure that permissions are set right

Start the Logitech Media Server service.

From now on you can access LMS through your web browser at http://[raspi IP or hostname]:9000  .  Using Configure in right bottom corrner ( I have Polish “Ustawienia”)  set your library and desired preferences. But, you cannot play your music just yet, head yourself to our Squeezeslave tutorial.  There are plenty of Android/iOS apps to control squeezebox devices so if you have Android/iOS device install one of them and control whats raspi’s playing with ease.

Squeezebox on Android

Squeezebox on Android

If you have any comments you know what to do, we will be happy to help.

Logitech Media Server

Logitech Media Server

 

Here is your raspberry pi ampilight system!
  • Sham

    Hi,

    I’ve installed the latest version of Rasbian and used your tutorial to install LMS on my Pi… however it doesn’t seem to work…I didn’t get any error’s when installing.

    When i look into the logs i see..

    2013-07-13 08:15:43 Logitech Media Server died. Restarting.
    2013-07-13 08:15:48 Logitech Media Server died. Restarting.
    2013-07-13 08:15:53 Logitech Media Server died. Restarting.
    2013-07-13 08:15:58 Logitech Media Server died. Restarting.
    2013-07-13 08:16:03 Logitech Media Server died. Restarting.

    any ideas?

    • http://raspberry-at-home.pl/ Tomasz Szczerba

      Hi,

      Have LMS start at least once? Check if another instance of LMS is not running, from what I found this can be the case. Patching LMS also went without errors? Maybe user that you use to run LMS doesn’t have privs to e.g. music folder?

      Regards,
      Tomek.

  • Allison Gibson

    Hi, I am following your directions with an 8GB card, and I run out of room at “sudo dpkg -i logitechmediaserver_7.7.2_all.deb”

    error is as follows:
    “dpkg: error processing logitechmediaserver_7.7.2_all.deb (–install):
    cannot copy extracted data for ‘./usr/share/squeezeboxserver/CPAN/arch/5.14/i386-linux-thread-multi-64int/auto/DBD/SQLite/SQLite.so” to ‘/usr/share/squeezeboxserver/CPAN/arch/5.14/i386-linux-thread-multi-64int/auto/DBD/SQLite/SQLite.so.dpkg-new’: failed to write (No space left on device)
    dpkg-deb: error: subprocess was killed by signal (Broken pipe)

    — So I have to repartition the space to fill the entire card — Instructions available on google.

    • http://raspberry-at-home.pl/ Tomasz Szczerba

      Hi Allison,

      Thanks for sharing tip :) lms is a weighty app, makes up with features though.

  • Bert

    Hi, I followed your description step by step but I cannot connect to the web interface.
    Is there is known issue or a possibility to get debug messages?

    • http://raspberry-at-home.pl/ Tomasz Szczerba

      Hi,

      Have you tried running it straight from command line? Type squeezeboxserver, leave putty window open and try access web interface then.

      Best,
      Tomek.

  • Wayne

    Hi, thanks for the instructions. I am a linux newbie so please excuse my ignorance in troubleshooting.

    I managed to get LMS up and running on RaspBMC – by that I mean I can access the LMS web page – but scanning for music files does not work. The server log keeps saying the following:

    2013-10-23 22:18:18 squeezeboxserver_safe stopped.
    2013-10-23 22:18:51 squeezeboxserver_safe started.
    [13-10-23 22:19:46.7698] main::init (354) Starting Logitech Media Server (v7.7.2, r33893, Wed Mar 14 05:46:46 PDT 2012) perl 5.014002
    [13-10-23 22:19:55.9568] Slim::Utils::SQLiteHelper::postConnect (359) Optimizing DB because of missing or empty sqlite_stat1 table
    [13-10-23 22:20:16.4351] Slim::Plugin::CLI::Plugin::cli_socket_open (166) Can’t setup the listening port 9090: Address already in use
    [13-10-23 22:20:16.4553] Slim::Utils::PluginManager::load (348) Warning: Couldn’t call Slim::Plugin::CLI::Plugin->initPlugin: Can’t setup the listening port 9090: Address already in use at /usr/share/squeezeboxserver/lib/Log/Log4perl/Logger.pm line 900
    [13-10-23 22:20:22.7965] main::checkDataSource (1072) Warning: Schema updated or no media found in the database, initiating scan.
    [13-10-23 22:20:23.5126] Slim::Control::Request::execute (1889) Error: While trying to run function coderef [Slim::Control::Commands::wipecacheCommand]: [Can’t call method “scanningProcess” without a package or object reference at /usr/share/perl5/Slim/Music/Import.pm line 176.

    Do you know what the problem is?

    Many thanks

    • http://raspberry-at-home.pl/ Tomasz Szczerba

      Hi,

      Don’t worry about that, we are here to help :)

      Check if user that runs LMC has rights to read from folders you specified. By default, user is: squeezeboxserver. Should you have any questions just reply to this comment :)

      Regards,
      Tomek.

      • Wayne

        Hi Tomek,

        Thanks for the reply. I have tried everything I could find on the internet to set permissions onto my /media/PiMedia directory using chmod / chown etc. but it still doesn’t work. Could it be that my USB drive is formatted with NTFS? And if so, how can I grant access to the squeezeboxserver user?

        Regards,
        Wayne

        • http://raspberry-at-home.pl/ Tomasz Szczerba

          Hi,

          Check groups that squeezeboxserver user have with: groups squeezeboxserver

          Then, check every folder on the path to your music folder with ls -la command on each folder.

          I assume squeezeboxserver is not a owner of those folders so, check if group that they have is a one of squeezeboxserver user groups. If not, check all users permissions.

          If there is a folder/file that LMS user cannot access change its permissions or add squeezeboxserver to group that folders/files have. Example:

          pi@raspbmc:~$ ls -l
          total 808
          drwxr-x— 3 pi pi 4096 Jan 5 13:40 Downloads

          Tells me, that user pi can read/write/exec on this dir, group pi can read and exec and all users have no privs. Assume that squeezeboxserver have only group squeezeboxserver. What we need to do is to add squeezeboxserver to pi group. We can do this with: sudo usermod -a -G pi squeezeboxserver. This will add a secondary group pi to user squeezeboxserver. And then lms user should be able to read from this directory :) other option is to chmod 755 Downloads, this will add rights to read and execute on directory to all users ( not only for squeezeboxserver !). I hope that will help you :) Let me know how it goes.

          Best,
          Tomek.

          • Wayne

            Hi,

            Unfortunately this did not work. I even tried adding the queezeboxserver user to the root group but still get this error in the log:

            [13-10-23 22:20:23.5126] Slim::Control::Request::execute (1889) Error: While trying to run function coderef [Slim::Control::Commands::wipecacheCommand]: [Can’t call method “scanningProcess” without a package or object reference at /usr/share/perl5/Slim/Music/Import.pm line 176.

            Thanks,
            Wayne

          • http://raspberry-at-home.pl/ Tomasz Szczerba

            Hi,

            Don’t loose hope;) Make sure that path you provided in configuration is correct and change change user that lms is run on to pi. In etc/default/logitechmediaserver change
            SLIMUSER=squeezeboxserver

            to
            SLIMUSER=pi

            and restart LMS using init.d script:
            sudo service logitechmediaserver restart

            I hope that will solve your problem :)

            Regards,
            Tomek.

          • Wayne

            Hi,

            I managed to get the server scanning for music but only after I changed SLIMUSER=root. Even then, LMS would scan but would not find any music files in the specified location (mp3, flac). Memory usage was also pretty high with LMS running and the pi would crash when playing a 1080p movie. I eventually gave up and did a fresh RaspBMC install. I might buy another pi and install squeezeplug onto it.

            Thanks for your help.

            Regards,
            Wayne

          • http://raspberry-at-home.pl/ Tomasz Szczerba

            Hi,

            Well yeah, LMS takes a fair share of raspis horsepower. But if you don’t need server functionality and LMS and squeezeslave are on the same raspi try mpd or mopidy from our other tutorials, those are MUCH less cpu heavy applications with similar functionality:

            http://raspberry-at-home.com/mpd-music-player-daemon/
            http://raspberry-at-home.com/mopidy-spotify-client/

            Regards,
            Tomek.

  • William Santiago

    I am almost there! I have LMS up and running, can even remotely manipulate volume & settings via internet *BUT* I cannot find my music library. I cannot find my music files in either the Windows formatted nor the Linux formatted external drives. I searched numerous file locations and with my very limited Linux/Debian/Raspbian knowledge had no success. If you can help me, please remember to use small words, so I don’t get lost quickly.

    • http://raspberry-at-home.pl/ Tomasz Szczerba

      Have you tried one of solutions that I wrote below for Waynes problem? It seems similar to yours – lack of privs. However, what format does your library have? Perhaps it’s one of not supported by LMS?

      Regards,
      Tomek.

  • Michael

    I was able to get able to get everything setup but can’t access the LMS webpage. Anything I can check? Thanks.

    • http://raspberry-at-home.pl/ Tomasz Szczerba

      Hi,

      Have you verified that LMS is running? Are there any error messages when you start a service?

      Regards,
      Tomek.

  • Rasmus

    i followed the guide twice but i cant access the webbrowser.
    How do i check if program is running correctly ?
    anything else i should do?
    Can i be sure that is it using port 9000?

    Hope you can help

  • Simon prein

    i set my pi up like the tutorial everything works but my squezebox dont show me the tracks and say no tracks in folder (sory for the worse english but i’m in class 8 in germany)

    • Clifford Browning

      hey, it is better than most of the english typing people here in the united states. I can’t even speak another language except snippets of spanish and eien bier biten, and Im sure I misspelled that one.

  • perejil

    Excellent instructions!!! Very much appreciated!!!

    I installed latest available version 7.8 (instead of 7.7.2 instructed herein) without problems. Just a couple of comments if you go for 7.8:
    1) the download command would be “wget http://downloads.slimdevices.com/LogitechMediaServer_v7.8.0/logitechmediaserver_7.8.0_all.deb
    2) I did not patch the bootstrap
    3) When moving the files into place (the 9 commands block), the first line I added was “mv arm-linux-gnueabihf-thread-multi-64int arm-linux-gnueabihf-thread-multi-64int_old” and then the rest of the commands.
    An important note: it takes some time to get the LSM to respond via the web browser. You may get “page not found” during the first couple of minutes, so be patient.

  • Annamaria Cassanese

    Hello,
    is it still possibile to ask for a support?
    Thanks
    AnnaMaria