Raspberry Pi, Raspbmc Media center, including Spotify

Updated: 28-04-2013, added information on version 4 instead of beta version 3. I reinstalled my PI today with the XBMC (I bricked it yesterday :-( ) And I noticed that some of the things I wrote are out of date

After my previous blog post about the Raspberry Pi I waited for a while before testing something out again with the little device. I did some smaller things like setting up a vpn-connection etc. But no big things anymore, until today.

Today I installed my Raspberry Pi again with the Raspbmc operating system. As some of you might recall, I wanted to install the pi with this OS and use it as my media streamer. I ended up with a total different setup. If you like you can read all about it over here.

The reason that I’m writing today is because I have done some testing and I came to some important conclusions. First of all, my internet connection wasn’t fast enough to deliver the content which I asked before. Secondly, the pi can’t decode DTS, so if you have an active receiver who can do this for you, you should be fine. Otherwise  you will still be able to use the pi but you will need to watch out a little bit more.

As I said before, the installation of the Raspbmc OS is very simple, as a matter of fact it’s so simple that it’s not worth writing it down in this tutorial. Please follow the guidelines from the official site.

So what am I going to explain?

Well, how to integrate your Xbmc with Spotify. I’m a dedicated premium Spotify user. I love the way it works, I pay them 10 euro a month and I can stream as much music as I want. I love the model, it’s a fair price.

So, I’ve been searching on the internet for a decent integration between Spotify and xbmc. I noticed that there are some bits and bytes on the internet but that no one explained in a decent tutorial how to do it. And this is exactly what I will  tell you today.

Once your Raspberry pi is fully booted and the xbmc is fully loaded we’re going to start by updating it again. Go to

program –> Raspbmc Settings -> Nightly

and selecting the 05/01/2013 build or later. If you have any issues, such as a ‘relax’ loop, you can revert this via SSH or keyboard with the following command. It will take a while to install, relax, have a coffee and come back.

This is no longer required, the stable has now the utilities etc that we need! :-)  

Now we’re ready to install the spotimc add on  The best thing you can do is ssh into your device. The username is pi, the password, raspberry. You will be in the home directory once you logon. Next, we will download the add on from this site.

wget https://github.com/downloads/mazkolain/spotimc/script.audio.spotimc-1.0-beta4.zip –no-check-certificate

wget http://azkotoki.org/download-file/28/script-audio-spotimc-1-0-beta4.zip

The –no-check-certificate tells wget to ignore the invalid certificate from github. Otherwise you wont be able to download from their site. 

Beta version 1.4 is available now, no need to use version 3 anymore! :-)  

Once you downloaded this we can install the add on.

 Install it under addons (install from zip).

Once you have installed it you should see the add on popping up into your screen. Wait! Don’t launch it yet! We still need to modify something before we can start it.

You will have to download a modified version of the libspotify for the arm technologie. You can watch it over here (https://developer.spotify.com/technologies/libspotify/). People have been saying that it doesn’t work anymore with the latest version. I’ve downloaded and copied the older version onto this server. You can download the lib from here.

wget http://www.linux-answered.com/download/libspotify.so

 

cp libspotify.so /home/pi/.xbmc/addons/script.audio.spotimc/resources/dlls/linux/armv6/

We don’t have to do this anymore. If we have a look at the changelog from beta3 to beta4 we see that he has added this library hardcoded now! :-)  

And that’s it. Very simple actually right? Now you will be able to start this add on. At first it will complain about the old GUI that you’re using. It will download and install (and off course reboot) a new GUI. Once this is done you should be good to go and enjoy music coming out of your Raspberry PI.

Feel free to ask questions if needed!

 

Cheers!

53 comments

  1. H Wells says:

    Hi, I seem to have a problem when it comes to running spoti mc. When o go to run it, it starts loading and then says scripts failed.
    I have installed everything your entry has said but doesnt want to run.
    Any ideas or solutions would be much appreciated!
    Thanks Harry

    • osilvab says:

      I just made the installation and it worked perfectly THANKS YORKIM!!!

      Wells, be sure you are doing the copy instruction “cp libspotify.so /home/pi/.xbmc/addons/script.audio.spotimc/resources/dlls/linux/armv6/”

      and you need a premium account.
      good luck

      Yorkim, is it possible to have it running in background?

      • Hi!

        Nice to hear that it’s working as expected!

        I didn’t take the time yet to see if I can run it in the background. As far as I know, not really.

        Feel free investite it and let us know!

        Cheers

  2. Yorkim Parmentier says:

    Hi,

    I had the same issues as you had. Are you sure you’re running one of the nightly builds?
    Did you try to restart the PI after you followed all the instructions? Did you already receive the message that your GUI is out of date?

    Cheers

    • H Wells says:

      hi i am running on the latest nightly build. I recived the message my GUI is out of date aswell and I restarted my PI when prompted and since then restarted it several times as well :/

      • Yorkim Parmentier says:

        Can you tell me which library you’re using (old vs official new one). It might be a problem with the new library from Spotify. I’ve seen a lot of people who tell on diverse forums that it stopped working the moment that they upgraded.

        Perhaps you can try this? If you like I can create a script (bash) that will setup everything as it should be. (Can you also confirm that read/write rights are OK?)

        Cheers!

        • H Wells says:

          Hi,
          First of all im 15 and a total beginner with linux etc. Secondly how do i check me libary, it goes to launch the app gets to the loading screen then reads ‘Script Failed! : script.audio.spotimc’. What do you mean by the read/writes? and if you could create some form of bash to check that would be much appreciated! Thanks Harry

          • Yorkim Parmentier says:

            I will create a script that will do the installation for you. In the meanwhile can you give me the output of the following commands:

            1. cat /scripts/upd_hist/build_info
            2. ls -l /home/pi/.xbmc/addons/script.audio.spotimc/resources/dlls/linux/armv6/ | grep libspotify

            Thanks

          • H Wells says:

            Hi yorkim!

            pi@raspbmc:~$ cat /scripts/upd_hist/build_info
            raspbmc-rls-1.0-hardfp-b20130203-u20130203

            /home/pi/.xbmc/addons/script.audio.spotimc/resources/dlls/linux/armv6/: Is a directory

      • Yorkim Parmentier says:

        I’m investigating both of the problems that you guy’s have. I will try to come back to you ASAP. I’ve send you an email as well. Feel free to answer it and we will get the discussion to solve your problem started

  3. Marcus says:

    Thank you very much for this.. Works perfectly! This is the only tutorial that worked for me as an linux newbie :) thanks again!

  4. Cloggy says:

    Thanks for this! Everything seemed to have worked, except for one major issue. I get to a log in page, and can’t log in. I have a premium subscription but it tells me I’m using a bad username or password. I’m definitely not!

    Is this something you’ve encountered?

    • Yorkim Parmentier says:

      Hi,

      I do remember having a similar problem. Have you tried to use your email address instead of your username on Spotify? Which premium subscription do you have? Could you also tell me if you’d used the library that I made available or the newest one?

      • Cloggy says:

        Thanks for the reply. I did try my email too, no help. I have the full premium account including device streaming. It’s probably worth mentioning that it’s a UK account, although that hasn’t stopped me from logging in successfully on computers in the US in the past. I initially used the library file you linked, and did try to uninstall and repeat the process with an alternative file linked on the Stm Labs forum (but I don’t think I managed a complete uninstall because I didn’t get the GUI update message).

        • Yorkim Parmentier says:

          Hi,

          This shouldn’t be the problem normally. I’m not 100% sure that there is some logging information available. I will have to look at this later tonight. You are sure that you are running the correct nightly right?

          Could you try to provide me some log information?

          • Cloggy says:

            I originally was running the nightly you specified. I have now updated to the most recent build, which also doesn’t allow me to log in. My account isn’t Facebook integrated.

          • So what I’ve learned so far is that the username does not equal the email adress.
            What username do you use to logon to your mobile device? Perhaps you should try to use the same?
            Could you provide us with some log information that might help to solve your problem?

          • Cloggy says:

            I’ve tried the same login details as I use on my mobile.

            Can you explain what info you need and how o obtain it? I’m very new to this.

      • mak says:

        I am also having the bad username or password problem. I tried email as well and it gets the same error.

        I followed the instructions above and am using http://www.linux-answered.com/download/libspotify.so.

        I have a Spotify Premium subscription.

        • Yorkim Parmentier says:

          I will find out which I used (username/email) and I will see if I have some use full log information that I might need.

          Question: do you guy’s have a real account or is it one that’s integrated with facebook? (Just checking all the path’s that are available to solve this)

  5. James van de Vyver says:

    Thanks very much for these clear instructions!!! I had almost given up with Spotify on the Pi having tried a few times with lesser instructions. I like the fact that you have provided a direct download for libspotify.so to save any confusion with downloading the wrong version. Now I am enjoying some of my favourite music as I am typing this :-)

  6. z0ltrac says:

    Thx for this! Awsome, now it works! :)

  7. Jim says:

    Hey,

    Will this also work with an unlimited account?

    Thank you,
    Jim

    • Yorkim Parmentier says:

      Hi Jim,

      According to me this should work without problems.

      I have an unlimited account as well and for me it works perfect! :-D

      Cheers!

  8. Nico says:

    Hi,

    Thanks for this very simple tuto. It almost works for me but I have a problem : each songs are played normally during 5 seconds and then stop … The track is stopped on this 5 seconds until I hit pause and play. After that, the track is played entirely until the next song and the same thing happens.

    Any idea of what might cause this ?

    • Hi!

      I have no idea to be really honest. Could it be something with your internet connection?
      Perhaps the caching goes wrong? Which class of SD card are you using?

      Cheers

  9. Alexander says:

    Perfect !!!
    I’ve tried several other “how to’s” but no one ever worked.
    This one, however … perfect!

    NOW all that’s missing is a Sonic Like control center allowing me to see the RaspBMC menu system (and SpotiMC) on my Android.

  10. snblg says:

    Hello.

    I just installed xbmc and spotify, following your notes.

    I have the same login problem as others:
    using my email adress or username: login failed.

    I get the same error with Firefox if I do not connect myself with the Facebook button.
    The email address is only for connecting with Facebook.
    And the is no Facebook button with this xbmc addon.

    We shall probably have to wait for a new realease of this spotify addon.

  11. Björn Andersson says:

    Hi,
    Great tutorial, I got it working after following these simple steps. However, no a few hours later it doesn’t work any longer. Each time I try to start Spotimc I get the loader/spinner icon and the xmbc restarts. No error message or anything. Any ideas?

    • Hi!

      Great to hear that it worked out for you!

      Honestly, I don’t have an idea. I’ve been using it for a couple of hours without problems.

      You think you could provide us with some debug and log information from the PI?

      Thanks

      • Björn Andersson says:

        Actually, it solved itself! Probably just some temporary hiccough. It might be a good idea to see if there’s failsafes in place if there’s no response from the Spotify servers?

  12. vozzemaker says:

    It works like a charm!!!
    Geweldig!! Dank is groot!

    Nog even uitzoeken hoe met een remote Spotimc op de RaspBMC aan te sturen… Als er iemand tips heeft; GRAAG!

  13. Claus Fischer says:

    Hi.
    I’m running the latest raspbmc, and the newest nightly build. I followed these instructions, but i cant play any songs.

    What to do? Are there any newer versions of spotimc?

  14. coffe says:

    Would like to be able to sort the lists.. so inbox where sorted in the other order so i could just lissen to music ppl are sending me.

    //Regards
    Coffe

  15. Jan says:

    Hi
    I installed Raspbmc today and straigt afterwards Spotimc, too. No need for an update to a nightly build anymore. It is functioning with the stable branch. Also spotimc is actually in beta4.

  16. LinuxBeginner says:

    Thanks for this tutorial! I bought my pi only to run the spotify client but when I tried to set it up, i noticed that the linux version of the client is only for x86…

    can you tell me please what I have to write into the prompt after “wget http://azkotoki.org/download-file/28/script-audio-spotimc-1-0-beta4.zip” to install the addon in the right folder?

    • Hi!

      The easiest way will be using the interface of XBMC. If you go to addons, try to add more addons, you will see .., meaning go up.
      Keep pushing this .. until you see an option called, install from zip. Use this option to install your addon

      Cheers

  17. Koos says:

    Hi, for the Spotify users with a Facebook account. You can get a device username here: https://support.spotify.com/nl/learn-more/faq/#!/article/connect-devices

    Spotify create a username for your devices…

Leave a Reply

Your email address will not be published. Required fields are marked *