Skip to content

Instantly share code, notes, and snippets.

@jjok
Last active October 1, 2018 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjok/0aab7ac0481ab100877883cb4615b240 to your computer and use it in GitHub Desktop.
Save jjok/0aab7ac0481ab100877883cb4615b240 to your computer and use it in GitHub Desktop.

Set Up Mopidy on Raspberry Pi

https://discuss.mopidy.com/t/pi-musicbox-with-mopidy-2-0-0-and-jessie/1174/3 http://mopidy.readthedocs.io/en/latest/installation/raspberrypi/#how-to-for-raspbian-jessie

Install latest Raspbian

https://www.raspberrypi.org/downloads/raspbian/

Set up Wi-Fi and enable SSH:

Follow https://www.raspberrypi.org/documentation/configuration/wireless/headless.md

Mess with config:

sudo raspi-config
  • Expand Filesystem
  • Advanced Options
  • Hostname = something nice
  • Memory Split = 16

Install Mopidy

wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add -
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/jessie.list
sudo apt update
sudo apt upgrade
sudo apt install python-pip
sudo apt install mopidy

Install plugins

sudo apt install mopidy-podcast
sudo apt install mopidy-soundcloud
sudo apt install mopidy-scrobbler
sudo apt install mopidy-spotify

Needed for gmusic

sudo apt-get install libffi-dev

Install plugin from Pip

sudo pip install mopidy-musicbox-webclient

Install plugin from Git

sudo apt-get install git
sudo apt-get install python-dev
git clone https://github.com/rusty-dev/mopidy-deezer
cd mopidy-deezer
sudo pip install . --upgrade
cd ..
rm -rf mopidy-deezer

Set analog volume to 100%

amixer set PCM,0 100%

Edit Mopidy config file

nano ~/.config/mopidy/mopidy.conf

or

sudo nano /etc/mopidy/mopidy.conf

Run Mopidy as a service

sudo dpkg-reconfigure mopidy
sudo service mopidy start

Install Snapcast

wget https://github.com/badaix/snapcast/releases/download/v0.8.0/snapserver_0.8.0_armhf.deb
wget https://github.com/badaix/snapcast/releases/download/v0.8.0/snapclient_0.8.0_armhf.deb
sudo dpkg -i snapserver_0.8.0_armhf.deb
sudo apt-get -f install
sudo dpkg -i snapclient_0.8.0_armhf.deb

Install pHAT DAC

curl https://get.pimoroni.com/phatdac | bash

Disable HDMI

/opt/vc/bin/tvservice -o

Snapclient Config

SNAPCLIENT_OPTS="-d -s 1"

Snapserver Config

SNAPSERVER_OPTS="-d"

Whole thing

wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add -
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/jessie.list
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python-pip
sudo apt-get install mopidy
sudo apt-get install git
sudo apt-get install python-dev
sudo apt-get install libffi-dev
sudo apt-get install libssl-dev
sudo apt-get install mopidy-podcast
sudo apt-get install mopidy-soundcloud
sudo apt-get install mopidy-scrobbler

sudo pip install mopidy-musicbox-webclient

git clone https://github.com/rusty-dev/mopidy-deezer
cd mopidy-deezer
sudo pip install . --upgrade
cd ..
rm -rf mopidy-deezer

git clone https://github.com/mopidy/mopidy-gmusic
cd mopidy-gmusic
sudo pip install . --upgrade
cd ..
rm -rf mopidy-gmusic

sudo dpkg-reconfigure mopidy
sudo service mopidy start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment