Tuesday, 14 January 2014


Ever thought it would be great to stream your favorite spotify playlists to your stereo? Now you can with help of raspi and mopidy, a richer MPD alternative. Spotify Premium account is required to use mopidy, but you can try 30 day trial before subscribing.
For starters:
and then:
Above commands will add new source to your apt-get to install mopidy from.
By default, config is stored per user, edit it with:  sudo nano ~/.config/mopidy/mopidy.conf . Find below explanation for distinct sections of config file:


Standard configuration will do just fine, if you know what you are doing adjust to suit your needs.


Logging level of python modules.


Audio output, for more options read mopidy documentation, for most appliances default alsa sink will work.


Provide hostname and credentials if you use one.


Provide your spotify username and password to log on. You can choose bitrate from 160 up to 320, raspberry won’t break a sweat streaming 320 so I recommend this one (if you are not limited by internet connection).  As I mentioned before, you need a Premium account to stream to devices other than PC client and that includes raspi.


To use MPD clients to control mopidy enable mpd plugin. Hostname have to be set to to control mopidy from hosts other than localhost.


A http interface to control mopidy from browser. To enable it set enabled to true and remember to change to to access from your network.

Stream internet broadcasts

Enable or disable streaming through specific protocols.

Last.fm scrobbler

Provide your last.fm login and scrobble what you are listening to last.fm.

Media Player Remote Interfacing Specification (MPRIS)

Interface that lets you control mopidy through e.g. Ubuntu Sound Menu.

Local music collection

Of course, of what use will mopidy be if it weren’t for playing local music?
Test your setup by typing  mopidy . You can now connect to mopidy and test all its features, just don’t close putty window and don’t stop mopidy. To run mopidy at boot create startup script: sudo nano /etc/init.d/mopidy
Add execute rights:
Obligatory test:
If all works fine:
taken from - http://raspberry-at-home.com/mopidy-spotify-client/

No comments:

Post a Comment



Donate Towards More Raspberry PI's for Projects