Pi MusicBox¶
Pi MusicBox is the Swiss Army Knife of streaming music on the Raspberry Pi. With Pi MusicBox, you can create a cheap (Sonos-like) standalone streaming music player for Spotify and other online music services.
Features¶
- Headless audio player based on Mopidy. Just connect your speakers or headphones - no need for a monitor.
- Quick and easy setup with no Linux knowledge required.
- Stream music from Spotify, SoundCloud, Google Music and YouTube.
- Listen to podcasts (with iTunes and Podder directories) as well as online radio (TuneIn, Dirble and Soma FM).
- Play MP3/OGG/FLAC/AAC music from your SD card, USB drives and network shares.
- Remote controllable with a choice of browser-interfaces or with an MPD-client (e.g. MPDroid for Android).
- AirTunes/AirPlay and DLNA streaming from your smartphone, tablet or computer.
- Support for all kinds of USB, HifiBerry and IQ Audio soundcards.
- Wi-Fi support (WPA, Raspbian supported Wi-Fi adapters only)
- Last.fm scrobbling.
- Spotify Connect support.
Installation¶
- Download the latest release.
- Write the image to your SD card. See here for details.
- Customise the /boot/config/settings.ini file.
- Boot your Raspberry Pi and wait for PiMusicbox to start.
- Finish configuring the system using the web settings.
Creating an image¶
If you want to build an image from source, note that the current v0.7 image is an incremental update of v0.6 and can be generated as follows:
# 1. Install prerequisite packages (probably not an exhaustive list, sorry....)
sudo apt-get install git coreutils e2fsprogs zerofree util-linux qemu-user-static
# 2. Download and unzip very latest project source files (use master.zip for current release)
wget https://github.com/pimusicbox/pimusicbox/archive/develop.zip
unzip develop.zip && mv pimusicbox-develop src
# 3. Download and unzip base v0.6 image
wget https://github.com/pimusicbox/pimusicbox/releases/download/v0.6.0/pimusicbox-0.6.0.zip
unzip pimusicbox-0.6.0.zip && mv musicbox0.6.img musicbox.img
# 4. Enlarge image so there is free space to work in
./src/makeimage.sh musicbox.img bigger
# 5. Run update script within base image (requires sudo).
./src/chroot.sh musicbox.img create_musicbox0.7.sh
# 6. Go have a cup of tea/coffee while you wait...
# 7. Shrink the image and other finishing touches
./src/makeimage.sh musicbox.img finalise
Project resources¶
- Website
- Discussion forum
- Source code
- Changelog
- Issue tracker
- Twitter: @PiMusicBox
- Facebook: raspberrypimusicbox
License¶
Copyright 2013-2017 Wouter van Wijk and contributors.
Licensed under the Apache License, Version 2.0. See the file LICENSE for the full license text.
Pi MusicBox v0.7 manual¶
What is it?¶
Pi MusicBox lets you listen to your music through your HiFi. Supporting Spotify, Google Music, Soundcloud, YouTube, Podcasts, Apple Airplay, UPnP/DLNA, Internet Radio, not to mention your vast mp3 collection. A music player which you can operate from your couch using a tablet, smartphone, notebook or desktop computer.
Connect your Raspberry Pi to your speaker system, install the software and enjoy listening to all your music!
Possibilities¶
Pi MusicBox is designed to be controlled over your home network from another computer, tablet or smartphone. In fact, any device with a modern web browser (Chrome 14+, Safari 6+, Firefox 11+, Internet Explorer 10+) can be your remote. You could also attach a keyboard or buttons for local operation if you wanted.
Connect your speakers directly via line out, HDMI or through an external USB or HAT soundcard. Play music from your SD Card or USB hard drive and use WiFi/ethernet to access music on network shares, internet radio as well as music from a number of supported streaming services. The software will detect as much of the configuration as possible at startup and configure the system for you automatically.
Requirements¶
The main requirements are a Raspberry Pi with a ‘good’ 5V power supply, a network connection for it and a 1GB or larger SD card. The latest, faster Raspberry Pis are the best choice but models A, B and B+ will still work. You’ll also need a way to listen using either a HiFi system, headphones (with pre-amp), a set of USB speakers or the speakers on a HDMI television. If you want to listen to Spotify you will need a Spotify Premium account.
A monitor/television is not necessary but might come in handy if you need to troubleshoot startup problems.
Networking¶
Pi MusicBox is designed to be controlled over your home network and needs to have a working network connection. If you can use an ethernet cable, you just need to plug it in and you’re done. Connecting via WiFi using a USB dongle, or the Raspberry Pi 3 / Zero W onboard WiFi, is also possible (see Wifi Network). Most USB WiFi dongles are supported but not all. If you are buying one, make sure it works in Raspbian. You’ll need to enter your WiFi network details before you start (see Initial Config).
Note
If you want to use a static IP address, you need to login and configure that yourself (see Getting Your Hands Dirty).
Installation¶
Download and unzip the latest “ready to eat” image available here and use Etcher to easily copy it to your SD Card (more information. The image has been tested on a 1GB SD card but a larger card will leave you with more free space and is preferable.
Initial Config¶
If using a WiFi connection you must enter your network details in
settings.ini
before you boot the system. You can also set other config
options at this point but it’s generally a good idea to start with the minimum
config required when booting for the first time. It’s easy to change other
options later via the settings web page once you are up and running.
To do this, insert the SD Card into a computer (Windows, Mac, Linux),
and open it in the file manager. It will contain a folder called config
and
within that will be a file called settings.ini
. The file is structured
as an ini file and should be opened in a text editor. All lines starting with a
#
are comments designed to help you and will be ignored by Pi Musicbox.
Avoid changing the order or formatting of the non-commented out lines.
For details on specifically what WiFi settings you need to set, see Wifi Network.
Booting¶
Insert the SD Card in your Pi and then connect the speaker (turn the volume right down), network, and power cables. You may also wish to connect a monitor/television to the HDMI connector to follow the boot process but it’s not required.
Note
The system will reboot a few times during startup and, depending on which model Raspberry Pi you are using and what initial config you have set, this may take a few minutes. Please be patient.
Web Interface¶
Once the system is ready for use, the web interface will be available in your web browser at one (or more) of the following addresses:
* http://musicbox.local/
* http://musicbox/
Most modern web browser will require you to explicity enter the http://
part
of the address or the trailing /
as otherwise they will unhelpfully try to
search the internet for what you’ve typed!
Note
Windows computers might require the installation of Apple Bonjour/iTunes for mDNS to work correctly.
Note
Linux computers might require the installation of Avahi fir mDNS to work correctly.
Warning
Android does not support mDNS and you might have to access your Pi MusicBox using it’s IP address rather than it’s hostname. This address is different on every network but will look something like http://192.168.1.5/ or http://10.1.100.2/. You will have to either look it up using a network utility, find it from your router status page, or just plug in a screen and you’ll see it displayed after startup. You can also install one of the many mDNS helper apps such as Zentri Discovery.
If, after waiting a few minutes, the web interface is still not responding, there might have been a problem during startup. The easiest thing to do at this point is plug in a screen and see the error message displayed. See Troubleshooting for more help.
Once your Pi Musicbox is running and accessible on the network, you’ll want to customise it and enable some music sources. The easiest way to do this is using the Settings web page which you’ll find listed in the navigation menu on the left side of the main page. Below that you’ll also find a link to the System page where you can safely shutdown and restart the system. Avoid just removing the power cable unless you enjoy SD card corruption.
Web Radio¶
To play streams from radio stations you like, you have to use a so called stream url. You cannot use container files like M3U, XSPF or PLS (yet), which are commonly available, you have to add the real stream. This stream url is hidden inside the .M3U or PLS file. To find this url, open the container file in a text editor.
A PLS file looks like this:
[playlist]
numberofentries=1
File1=http://vprbbc.streamguys.net:8000/vprbbc24.mp3
Title1=BBC World Service
Length1= 1
version=2
The stream url would be:
http://vprbbc.streamguys.net:8000/vprbbc24.mp3
M3U and XSPF files look different, but the stream url is always clearly visible.
You can find radio stations (PLS and M3U) using services like http://dir.xiph.org/ or http://listenlive.eu/ or http://dirble.com/.
Just add the stream url and the name of the station and press the Play button. The last 25 stations are saved locally using a browser cookie (not on the server yet, so you need to do it on every client you use).
MPD¶
Though the web based interface is recommended, you can also use native software which support the MPD (Music Player Daemon) protocol to control Pi MusicBox.
Apps and applications are available for all sorts of devices and operating systems. Not all of them work great with MusicBox though. For Android, MPDroid is recommended. On OS X, Theremin works (without search). On Linux, you can use the great working and wonderfully named console app ncmpcpp. On a Linux Desktop, GMPC and Sonata work well. On iOS, mPod and mPad. For Windows, clients are either not working great or untested.
More settings¶
A lot of things can be configured on Music Box. Edit the configuration file according to your needs. You have to reboot the Box to see the changes.
Wifi Network¶
If you connect a supported wifi dongle to your Pi, the MusicBox software should be able to detect and use it instead of a cable connection. Most dongles are supported, but not all. If you buy one, make sure it’s supported by Raspbian, the Linux distribution on which MusicBox is based. To make wifi work, you have to fill in the network name (SSID) and your password in the config file. Add these lines to the basic configuration above, or edit the default file supplied with MusicBox:
WIFI_NETWORK = 'mywifinetwork'
WIFI_PASSWORD = 'mypassword'
Substitute the mywifinetwork
and mypassword
with the correct values of
your own network. For now, the wifi on Pi MusicBox only supports WPA(2)
encrypted networks, configured via DHCP. As with a wired network, if you want
to use a static address, WEP encryption or no encryption, you need to get into
the console and configure it yourself (see Getting Your Hands Dirty).
Better Quality¶
The Pi can play the music from Spotify in different types of quality. The better the quality, the more data needs to be downloaded from Spotify. It’s called bitrate. Higher quality means a higher bitrate and a bit more use of your internet connection. Typical broadband connections should be able to support the highest bitrate easily. If you have a good connection to the internet, you can set the quality to high, but if your connection is slow or unstable, or you have usage limits on your connection, you can it lower and use less data. Possible rates are 96 (low, but acceptable quality, FM like), 160 (default) or 320 (highest quality, CD like).
Set the bitrate to high like this in the configuration file:
SPOTIFY_BITRATE = 320
Or set the bitrate to low like this:
SPOTIFY_BITRATE = 96
Sound Configuration¶
By default Pi MusicBox will send the sound to the analog headphone output on the Pi. This sound is good enough, but due to hardware constraints, not always great. If you want to have better sound, use the HDMI to connect the Pi to an amplifier, or connect an USB soundcard (also called USB DAC, Digital Audio Converter), USB speakers or USB headphones. Almost all types of USB speakers, headphones and DAC’s are supported, but if you buy one, make sure it’s Linux compatible. DAC’s with digital outputs are also available in many web stores.
When booting, Pi MusicBox will autodetect what is connected to the device and configure it accordingly. If you connect multiple devices, USB will be selected first as a sound output, HDMI after that, and lastly the analog output of the Pi itself. You can override this in the configuration file using the following line:
OUTPUT = 'analog'
If you include this, the default output will be the analog headphones jack of the Pi, even if you connected an USB device or an HDMI cable.
The options are: analog
, hdmi
, usb
Last FM¶
Another service supported by Pi MusicBox is Last FM. It collects the tracks you play, so you can discover new music. Go to http://www.last.fm/ to create an account if you don’t already have one. To let Last FM collect the tracks you play, fill in the credentials of this service:
LASTFM_USERNAME = 'lastfmuser'
LASTFM_PASSWORD = 'lastfmpassword'
SoundCloud¶
Another service supported by Pi MusicBox is SoundCloud, the service which lets you “Hear the world’s sounds”. To configure it, you need a special ID, a token. Get this token from http://www.mopidy.com/authenticate/ You have to login with your SoundCloud id to get the token. This information is not shared with the mopidy.com site. When you login, you’ll see a token appear on the page. Add this token to the ini file like this:
SOUNDCLOUD_TOKEN = '1 1111 111111'
SOUNDCLOUD_EXPLORE = 'electronic/Ambient, pop/New Wave, rock/Indie'
Where you replace the example 1 111 111111
by your token. Using the
SOUNDCLOUD_EXPLORE
configuration, you can configure the playlists you want
to see in the interface.
Multi Room Audio¶
Pi MusicBox supports so called Multi Room Audio. You can have multiple Raspberry’s on your network, for example in different rooms. The devices need to have their own names to be accessible. Use this option to give your MusicBox a different name:
NAME = 'Kitchen'
The name you choose should be no longer than 9 characters and only contain normal characters and numbers in the name (no spaces, dots, etc).
After a new boot, the webinterface for playing music will be accessible via a new address. Where the default would be http://musicbox.local from devices that support Bojour/Avahi, when you change the name, it becomes http://newname.local. In the example above it would be:
http://kitchen.local/
It’s not possible to play different music on multiple devices using the same Spotify account at the same time. This is a limitation of Spotify. If you have multiple accounts, it of course is possible.
Security¶
Pi MusicBox is not totally secure and not intended to run outside a firewall, only in the cosy environment of your local network. The heart of MusicBox, is not protected enough to do that. Also, the passwords of Spotify and wifi are stored in plain text on the SD Card. This might be fixed in the future.
For more security, change the default password by setting this line:
MUSICBOX_PASSWORD = 'mypass'
where mypass
is your new password. This will change the passwords of both
the user musicbox
and the user root
. The password will be removed from
the configuration file after it’s updated.
If you want, for more security to change the root
password to something
else, use this line:
ROOT_PASSWORD = 'mypass'
where mypass
again is your new password.
Playing your own Music Files¶
Though Spotify boasts a library of over 20 million tracks, not all artists and songs are represented. So it would be nice to be able to play MP3 files for the missing songs, wouldn’t it? Well the good news is that Pi MusicBox supports playing local or networked MP3, FLAC or OGG files. The bad news is that it’s a tiny bit complicated in the current version (0.4). Also, the songs are not easily available in the webinterface. They are not in the playlists, you have to search for them to play them.
Networked Music¶
The easiest way to play your own music files, is via the Windows Network. To do that, edit the configuration file, so that MusicBox knows where your files are. This address could be a bit cryptic to a first time user. This is an example:
NETWORK_MOUNT_ADDRESS = '//192.168.1.5/musicshare'
or:
NETWORK_MOUNT_ADDRESS = '//mynasserver/shared/music'
The first part //
is the way shares in the Windows Network are created.
Just add it and forget it. The next part (mynasserver
or 192.168.1.5
)
is the name or ip address of the server which hosts the file, and the last part
/musicshare
or /shared/music
, tells MusicBox which share to mount.
When your server is protected, you need to set the username and password for
the Network share using the following configuration lines:
NETWORK_MOUNT_USER = 'username'
NETWORK_MOUNT_PASSWORD = 'password'
Scan Music¶
MusicBox will not see the files immediately. The music files needs to be scanned at boot, every time you add or remove files. This process can slowdown the boot of the MusicBox, so use it with care. MusicBox will scan the files using the following configuration lines:
SCAN_ONCE = 'true'
or:
SCAN_ALWAYS = 'true'
The names speak for themselves. Using SCAN_ONCE
, the music files will only
be scanned, yes, once. Use this if you don’t change the music files often. Use
SCAN_ALWAYS
if you change your music files a lot. This will enable you to
change the files and reboot MusicBox. It will recognize the new files after the
boot. But, again, the scanning process can slowdown the booting of MusicBox
considerably.
Local Music¶
Pi MusicBox also has an option to store music files on the SD Card. This process is also a bit more complicated. Since MusicBox is created for a 1GB SD Card, or larger, the file system is also less than 1 GB. If you put MusicBox on a larger SD Card, the rest of the space on the card won’t be used, unless you resize the file system.
You can do this manually, on a computer using a partition manager, or you can let MusicBox try to resize it automatically. This process is tested, but not guaranteed to work. You could end up with a non working musicbox if the process fails. That’s most of the time no problem, since you can put the original MusicBox image on the SD Card again and start over. If you did a lot of customization, it’s recommended to backup your card first.
Using this line in the settings, Pi MusicBox will automatically resize the filesystem to the maximum size of the SD Card:
RESIZE_ONCE = 'true'
Put Files on the Card¶
Putting music files on the SD Card is only recommended on cards with a size larger than 1GB. MusicBox needs the 1GB for caching and other storage. After resizing an SD card with more storage, you can put your own music files on the Pi using either the Windows Network, or by mounting the root filesystem of the card on a Linux computer and copying the files. Leave at least 200MB of free space on the device.
To use the Windows Network, you have to have the workgroup name of the Windows
Network set to the default name, WORKGROUP
. If you want another name, you
have to change it by hand in the file /etc/samba/smb.conf
(see Getting
Your Hands Dirty). Remember to let MusicBox scan the files at boot (see Scan
Music)
Getting Your Hands Dirty¶
If you are willing to get your hands ‘dirty’, there are a lot more options to explore in Pi MusicBox. For this, you have to login to the box on the console, or via SSH. To login remotely via SSH, you will need to enable the SSH service. Do that by adding this line to your configuration file:
SSH_ENABLED = 'true'
Reboot. After that, you can connect to MusicBox via SSH.
Mopidy¶
The main ingredient of MusicBox is Mopidy, an open source music server developed by people from all over the world. It can be extended in a number of ways. By default, Pi MusicBox is set up using the best working extensions. But it can be extended to play music from e.g. SoundCloud, Google Music and Beets Music. More extensions are developed as you read.
How to add these extensions is beyond the scope of this document, but a lot of resources and documentation can be found on http://www.mopidy.com/. The developers can be reached on the mail list of Mopidy, https://groups.google.com/forum/?fromgroups=#!forum/mopidy, or via IRC Chat on the #mopidy channel on Freenode.
rc.local¶
Another important piece of Pi MusicBox is the file /etc/rc.local
. It’s
a shell script. This is where the (sound) hardware is setup and the
configuration is done. For example, the configuration file of Mopidy is created
from rc.local
. Edit this file is you want to add, change or remove
features.
Working at Midnight¶
For Linux novices, a nice utility called Midnight Commander could be of use to browse the filesystem and edit files. It works like the age old DOS utility Norton Commander and it’s included in MusicBox. Start it using the command:
mc
Static Network¶
To use MusicBox in a network with static IP addresses, you have to edit the
file /etc/network/interfaces
.
The lines that configure the wired network, look like this:
allow-hotplug eth0
iface eth0 inet dhcp
An example file for a static wired network, you should change it to something like this:
iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
gateway 192.168.1.1
Fill in the correct ip addresses for your network.
Updating¶
When a new version of MusicBox is released, the only way to update it, is to do
a new installation. You can update the kernel and other packages of the system
manually, but changes in the files specific for MusicBox will not be updated,
so it could eventually break things. Generally it’s not needed to update
things, but if you really want, you could issue the command: rpi-update
to
get the latest kernel. This will take a while. Another command is apt-get
update && apt-get dist upgrade
. These commands take a while to run, so grab a
coffee!
Fun & Questions¶
Enjoy your new way of listening to music! If you have questions, don’t be afraid to ask them at The mailing list of Mopidy/MusicBox, or via chat. Addresses and instructions are on http://www.pimusicbox.com/.
Frequently Asked Questions¶
Where can I ask my own questions and get further support?
You can discuss features and problems on the forum. Please search before creating a new topic as your question may have already been answered. You can also try the #mopidy channel on Freenode. For more general Raspberry Pi questions you may find better answers on the official Raspberry Pi forum.
What hardware is supported?
All Raspberry Pi models are supported but you’ll find the system is noticeably faster and more responsive on a Raspberry Pi 2 or 3.
What are the default login credentials?
Username:root
, password:musicbox
You should change this password as soon as possible.
Can I use the free version of Spotify?
No, you must have a Spotify Premium account. Spotify does not allow free users to stream using third party clients.
Can I use Spotify Connect?
YES! There is support for Spotify Connect in the latest release provided by the brilliant librespot software. This reverse engineered implementation provides most Connect functionality but should still be considered experimental. Please direct any frustrations regarding the state of affairs at Spotify as they are responsible for not making the Connect API available.
Can I use Spotify radio?
Unfortunately Spotify’s current libspotify SDK does not support this functionality.
Is there a way to upgrade the system?
There is currently no real upgrade path. The only way to upgrade is to download the latest image and copy over yoursettings.ini
file.
I tried to upgrade my installation with apt-get/pip and now I’m having issues. what should I do?
This is not supported (see above) and it’s not advisable unless you know what you are doing. If you don’t know what you are doing then reinstall the latest version and then try to ask for support on the forum where someone may be able and willing to help you.
What happened to streamuris.js? How do I change the saved stream list?
Radio stations are now stored in/music/playlists/[Radio Streams].m3u
and will appear in a playlist called ‘Musicbox Favourites’. You can modify this playlist using the webclient’s Streams page or by editing the underlying playlist file. Any modifications you make will be visible to all clients.
Can I edit my playlists from Pi Musicbox?
You can save the current track queue as a ‘local’ playlist but note it will only be available on your Pi Musicbox system. Some webclients, such as mopidy-mobile, also provide an interface to edit these local playlists. For now, Spotify playlists can only be modified using the official Spotify apps/website.
Can I use my HiFiBerry/IQAudio/PhatDAC/USB/JustBoom soundcard?
Yes, but you must specify the particular soundcard insettings.ini
or the settings webpage. Most soundcards are supported but if you find yours isn’t then please request it on the forum.
Can I use my Bluetooth speaker?
No, unfortunately we don’t support this (yet). If you are able to get it working please share your findings on the forum.
How do I make my random USB device work with Pi Musicbox?
Pi Musicbox is based on Raspbian Wheezy but includes all drivers from the very latest Raspbian Jessie release. Any USB device that works with a regular Raspbian installation should also work with Pi Musicbox. If you encounter any problems then search the forum for help.
Can I use a different user interface?
Yes, you can use your favourite MPD client or choose from any of the available webclients. Note that webclients generally perform better than MPD clients and provide a richer user experience. A list of installed webclients can be found at http://musicbox/mopidy/ and the default webclient can be specified on the settings webpage.
Can I have several Pi Musicbox systems streaming content to one another?
Not yet, but I’m hoping to get it implemented one day.
Can I access the Pi remotely via terminal/command line?
Yes, enable SSH access insettings.ini
or the settings webpage.
Where can I find the source files and submit improvements to Pi Musicbox?
Can Pi Musicbox stream to my Airplay device?
No, this functionality is not supported.
Can Pi Musicbox output to several devices via a multi-channel USB audio device?
No, this functionality is not supported.
Can I use my Spotify account on several different Musicboxes at once?
No, this is a Spotify restriction.
Can I get Pi Musicbox to play a song, playlist or radio station on startup?
Yes, configure the autoplay functionality insettings.ini
or the settings webpage. Search the forum for examples.
Will you add support for XYZ streaming service?
Support for additional streaming services in Pi MusicBox depends on support in Mopidy which may or may not be available yet. Please search the forum for more information regarding the streaming service you’re interested in.
Why isn’t http://musicbox.local working on my Android device?
Even the very latest version of Android does not have support for using .local names on your home network. Most home routers should allow you to access http://musicbox instead. Alternatively, you’ll need to configure an IP address reservation (or similar) on your router to ensure the IP address of your Pi Musicbox system does not change between reboots and simply bookmark that particular IP address.
Troubleshooting¶
Note
The first boot may take a few minutes while the filesystem is expanded and configured for the first time, especially on Models A, B, B+ and Zero. If you have enabled media scanning and have a lot of music files, this will take even longer. Please be patient.
If you experience problems with Pi Musicbox your first port of call should be the discussion forum. Please search before creating a new topic as your question may have already been answered. Otherwise feel free to ask any questions, suggest features or report bugs.
When you’re debugging yourself or asking for help, you should check the following things first:
SD card
Not all SD cards are created equal and even expensive branded cards are sometimes faulty. Try rewriting the image to a different memory card, preferably one you know definitely works. Always buy your SD cards from a trusted seller - beware of fakes! Card speed is not usually an issue and is only really noticeable when writing the image. The minimum card size is 1GB but a larger card is preferable as it leaves you with more free space. When powering off or restarting Pi Musicbox please make sure you shutdown the system first to avoid SD card corruption.
Power supply
Some cheap unbranded 5V power supplies have been reported to cause problems, especially with the RPi Model 3B and/or power-hungry USB devices. If you’re also connecting a USB harddisk ensure it has sufficient power; desktop drives must be connected via a powered hub or have their own dedicated power brick. Refer to the Raspberry Pi website for further guidance.
Wireless dongle
If you are having wireless network problems then connecting an ethernet cable will allow you to get up and running and make further debug easier. When using USB wifi devices, the problem is often with the dongle itself so try a different one.
Startup errors
Most errors occuring during startup will print an accompanying error message to help you identify the underlying problem. Attaching a computer monitor or TV screen via HDMI will allow you to view these error messages. This is particularly useful when network problems are preventing you from gaining remote access to the system via SSH (see below).
Enable SSH remote access
Being able to connect to the system from another computer will make debugging much easier. To enable SSH in Pi Musicbox, setenable_ssh = true
insettings.ini
or use the settings webpage. Help on how to connect from your Windows computer is available here. You must have a working network connection to do this but if you don’t, you can still login locally by attachng a USB keyboard. In either case, the username isroot
and the default password ismusicbox
.
Log files
Once logged in, you can view the various log filesfor more hints. The startup log can be found at/var/log/musicbox_startup.log
and the Mopidy log can be found at/var/log/mopidy/mopidy.log
. If you enable Mopidy’s more detailed debug logging (via the settings webpage) you’ll find that log file at/tmp/mopidy-debug.log
. Note that this debug log will be lost when Pi Musicbox is powered off or restarted. When posting in the forum please try to provide all relevant log files.
Config file
If there is a typo, error or corruption in yoursettings.ini
config file then usually the system will still boot but the Mopidy music server will not start. When this occurs you may find you’ll be able to connect via SSH, use Airplay, Spotify Connect etc. but you’ll be unable to access the settings webpage, the webclients, or use your MPD client. If this happens, login and check/var/log/mopidy/mopidy.log
for config errors. To display the current active config runservice mopidy run config
; this output has all sensitive information such as passwords removed so it is suitable for sharing on the forum.
Authors¶
Pi MusicBox was created by Wouter van Wijk and includes contributions from the following people:
- Simon de Bakker <simon@simbits.nl>
- Matthias Strubel
- Ulrich Lichtenegger <ulilicht@googlemail.com>
- Nick Steel <kingosticks@gmail.com>
- Remco Brink <remco@rc6.org>
- Amit Kotlovski <amitbk@gmail.com>
- John Cass <john.cass77@gmail.com>
- Bastien Nocera <@hadess>
- Stian Conradsen <@conradsen>
Pi MusicBox makes use of the following great projects:
- Raspbian (based on Debian)
- Mopidy
- Mopidy-Dirble
- Mopidy-GMusic
- Mopidy-HTTP-Kuechenradio
- Mopidy-InternetArchive
- Mopidy-Local-SQLite
- Mopidy-Moped
- Mopidy-MusicBox-Webclient
- Mopidy-Podcast
- Mopidy-Scrobbler
- Mopidy-SomaFM
- Mopidy-SoundCloud
- Mopidy-Spotify
- Mopidy-Spotify-Tunigo
- Mopidy-Subsonic
- Mopidy-TuneIn
- Mopidy-WebSettings
- Mopidy-YouTube
- Shairport Sync
- upmpdcli
- monit
We would also like to thank:
- All the projects that are used to create the these projects
- All the projects that are used to create the projects that are used to create these projects
- All the projects that …
- A lot of people giving solutions on forums…
- And of course the work of the guys ‘n girls who brought you the Raspberry Pi
Big thanks to all the authors of these projects, testers, bug fixers, reporters.
Changelog¶
v0.7.0RC6 (2018-03-20)¶
- Raspberry Pi 3 B+ support
- Librespot updated up v20180313-9d9c311 and added logging
- Updated Linux kernel to v4.14.26
- Fixed missing Allo Boss DAC firmware files
- Added support for Audioinjector soundcards
- Fixed boot loop when soundcard not found
- Removed Mopidy-Subsonic
- Backported OAuth functionality for Mopidy-Spotify to fix search
v0.7.0RC5 (2017-07-28)¶
- Firewall is now optional and is DISABLED by default
- Added Spotify Connect functionality (librespot v20170717-910974e)
- Includes mpd-watchdog for restoring stream playback following connectivity loss
- Ability to configure the WiFi country and use region specific channels
- Updated Shairport-Sync to v3.0.2
- Support for 64 character hex keys
- Fixed blocked Airplay ports (broken in v0.7.0RC4)
- OPML podcast file now available in /boot/config/
- Support for SD card friendly Mopidy debug logging
- Currently broken Spotify browse features disabled/hidden
- Updated Spotify-Tunigo to latest version
v0.7.0RC4 (2017-03-21)¶
- Updated Linux kernel to v4.9.16 and support Device Tree module loading
- Full support for Pi3 and Pi0W on-board WiFi
- Support JustBoom audio cards
- Fixed mDNS support (broken in v0.7.0RC3)
- Fixed default webclient redirect for Firefox (broken in v0.7.0RC3)
- Improve startup script output
v0.7.0RC3 (2017-03-15)¶
- Updated upmpdcli to v1.2.11
- Fixed Shairport-Sync support
- Updated mopidy-dirble, mopidy-soundcloud, mopidy-musicbox-webclient
- “Fixed” mopidy-youtube preferring m4a streams
- “Fixed” slow MPD connection creation
- Removed streamuris. Favourite streams now stored in an m3u playlist in /music/playlists/
v0.7.0RC2 (2017-03-09)¶
- Updated Shairport-Sync to v3.0
- Fixed support for HiFiBerry Digi
v0.7.0RC1 (2017-02-23)¶
- Raspberry Pi 3 and Zero compatability (using updated kernel)
- Compatible with Mopidy v1.1.2
- Mopidy extensions updated
- “Fixed” spotify playlists not appearing
- Added mopidy-spotify-web
- Disabled alsamixer by default
- Implemented 2 minute timeout while waiting for network
- Removed wireless-ng package
- Limit overclocking settings to Raspberry Pi 1 hardware only
- Log startup to /var/log/musicbox_startup.log
- Add support for webapp type webclients
- Applying settings via websettings restarts Mopidy (not system) when possible
v0.6.0 (2015-04-06)¶
- Raspberry Pi 2 compatability (using updated kernel)
- Enhanced support for local/networked files
- New version of the MusicBox-Webclient (2.0)
- Stability fixes
- Many other bugfixes
- Compatible with Mopidy 0.19.5
v0.6.0rc1 (2015-03-29)¶
- Added support for HiFiBerry AMP
- Fixed USB soundcard detection
- Removed some entries for extensions in settings.ini where using defaults.
- Compatible with Mopidy 0.19.5
v0.5.4 (2015-02-25)¶
- Initial Raspberry Pi 2 compatability
v0.5.3 (2015-01-18)¶
- Mopidy 0.19.5 with bugfixes
- New version of Shairport-sync to fix problems
- Filesystem check settings changed, also to fix fsck problems
v0.5.2 (2014-12-18)¶
- Wifi not coming up bug fixed
- Resize bug fixed
- Webinterface stops streams instead of pause
- Button to easily save current stream to favorites
- Fixed Spotify stuttering
- Fixed Spotify Browse
- Changed default settings of audio, SomaFM and others
v0.5.1 (2014-12-07)¶
- Monitoring of crashed services enhanced
- Small bugfix in html
v0.5.1rc2 (2014-11-24)¶
- No more slow loading of Spotify playlists
- Added audioaddict extension
- Other bugfixes
v0.5.1rc1 (2014-11-07)¶
- Shairport-sync instead of Shairport. AirPlay audio now syncs to e.g. a video
- Webclient enhancements
- Mopidy-ALSAMixer extension included for hardware mixers (no gui, only in ini file)
- Removed fastclick to prevent accidental clicks in the webinterface
- Updated mopidy extensions
- Bugfixes
v0.5.1b1 (date unknown)¶
- Replaced gmediarender with upmpdcli for better and more stable upnp streaming support.
- Less stuttering of Spotify at the start of a track
- Bugfixes for webclient interface (popups work better now)
- Enable/disable Shairport and DLNA streaming
- Sound detection fixed
- SSH/Dropbear enhancements
- Bugfixes
v0.5.1a2 (2014-10-06)¶
- Mostly bugfixes
- Better support for albumart in webclient
v0.5.1a1 (date unknown)¶
- Google Music Works a lot better now, including search, albums, artists, coverart, browsing
- Support for cards from IQ Audio, newer HifiBerry, model B+
- More responsive Mopidy, version 0.19.4
- Youtube integration
- Nicer webclient with new homescreen
- Play streams from youtube, spotify, soundcloud, radio by pasting an url
- Search music per service
- SoundCloud search won’t block other services anymore
v0.5.0 (2014-07-08)¶
- Updated Google Music, SoundCloud
- Added missing webclient fonts
- Playing files from the network enhanced
- Disabled Samba printing
- Small changes, bugfixes
- Faster USB, no more stuttering for some DACs
- HifiBerry Digi support is not complete :( See pimusicbox#100
- SoundCloud can break searching
v0.5.0b2 (date unknown)¶
- Google Music works again!
- Fixed bugs in webinterface
- Networking bug fixed
- Icons for media sources in webinterface
- Search fixed
- Added codecs for internetradio (gstreamer-plugins bad and ugly)
- Hifiberry Digi supported
- More wifi-usb sticks supported, I hope
- Bigger package (because of gstreamer plugins)
v0.5.0b1 (date unknown)¶
- Best release evah! Way less stuttering of sound!
- DLNA/UPNP streaming works out of the box (gmediarender-resurect)
- Fixed settings page, webclient, search bugs
- Added Internet Archive and Soma FM support
- Wifi will autoconnect to an open network if found
- Reverted back to old MusicBox system, new kernel (with better USB support). And thanks to that:
- Smaller package
- Monitoring of crashed daemons Shairport, Mopidy, Gmediarender
- Detection of crashed Pi (watchdog)
- Latest kernel (with a lot of fixes for USB)
- Whoosh backend for local files (should be faster)
- Updated Podcast
- Gmusic does not work reliable (yet)
- Upnp/Airplay/Mopidy cannot play at the same time. Don’t do that, it can crash the services and this could need a reboot!
v0.5.0a4 (date unknown)¶
- Better mopidy performance
- Bugfixes
v0.5.0a3 (date unknown)¶
- New Settings page for easily selecting most settings of MusicBox!!
- Based on kernel from Volumio. Works nicely!
- Mopidy is more reliable now (thanks to new kernel?)
- Webclient updated to (way) better support browsing
- Podcast working, including browsing podcasts from iTunes, gpodder
- UPNP/DLNA Streaming using gmediarender-resurrect
- Seperate webserver (lighttp) on startup
- Jukebox functionality included with aternative webclient JukePi. Great for the office!
- Also included alternative webclient Moped
- Larger image. Only fits on a 2G SD for now :(
- Google Music All Access working again
- TuneIn, Dirble, Podcasts enabled by default
- Firewall disabled for now
- Mopidy extensions Radio-de/somafm/internetarchive not working (yet)
- Upnp/Airplay/Mopidy cannot play at the same time. Don’t do that, it can crash the services and you need to reboot!
v0.5.0a2 (2014-03-07)¶
- Fix for networking problems (I hope!)
- Automatically play a stream at startup
- Webclient: Easier to add radiostations from Dirble/TuneIn browsing to the favorites in the radio section
- Webclient fixes
- Bugfixes (like samba/cifs mount, wifi, settings.ini)
- Disbled login for musicbox user. No need anymore
- Soma FM works
- Fixed partition size
- motd ascii art
- Resize bug fixed
- Check added for fat partition
v0.5.0a1 (2014-03-01)¶
- Mopidy 0.18.x, with lots of enhancements
- Browsing support for local media files, Spotify, Dirble, etc
- Dirble, Subsonic, Internet Archive Sound, TuneIn Radio support
- First steps to support Podcasts, SomaFM, Rad.io/Radio.de/Radio.fr (does not work (fully) yet)
- Better webradio (Mopidy can read m3u and asx files now!)
- Quick hack to easily edit default radio stations in webinterface (use radiostations.js)
- Better USB Sound, better i2s
- Settings.ini and mopidy.conf merged to one file, so you can configure Mopidy specific settings yourself easily
- Mopidy runs as a service
- More reliable networking
- Logging on startup (not totally there yet)
- Newer kernel
- Bugfixes
v0.4.3 (2014-01-08)¶
- USB disks mounted at boot and scanned for music
- Better recognition of USB Dacs (Simon)
- Better scrolling on iOS
- Start SSH before filescan
- Slightly smaller image file (did not fit on all cards)
v0.4.2.1 (2013-12-31)¶
- Fix for bug in setting default volume
- Fix for bug in setting spotify bitrate
v0.4.2 (2013-12-30)¶
- Best sounding Pi MusicBox ever! No hiccups, no unwanted noises, just music!
- Shutdown/Reboot from interface
- Font-icons for shuffle/repeat in interface
- Disabled power management for wireless dongles
- Better hdmi support (hotplug, force open)
- Newer Kernel: 3.10.24+ (i2s included)
- Split startup script into multiple files for better management
- Initial i2s support by Simon de Bakker/HifiBerry
- Set default volume in config file (Simon again)
- Log file viewable via webinterface ( http://musicbox.local/log )
- Initial work to support a settings page in the webinterface (not working yet)
- No hamsters were harmed during the production
v0.4.1 (2013-12-21)¶
- Bugfix for SoundCloud in webinterface
- Bugfix for distorted sound on some webradiostations
v0.4.0 (2013-12-15)¶
- Bugfixes: setting passwords, webclient inputfields in Safari
- Info: Uses Mopidy 0.15, Linux 3.6.11+ (updated Moebius Linux), Shairport 0.05, Mopidy Webclient 0.15 (JQuery Mobile 1.3 + flat client)
v0.4.0b1 (date unknown)¶
- Much nicer interface, thanks to Ulrich Lichtenegger
- Small bugfixes
v0.4.0a2 (date unknown)¶
- A lot of smaller and bigger bugfixes
- Support for Google Music All Access
v0.4.0a1 (date unknown)¶
- Use multiple Pi’s on the same network (Multiroom Audio)
- Webradio support
- SoundCloud support (beta!)
- Google Music support (alpha!)
- Windows workgroup name configuration
- Completely refreshed system
- Big updates to web interface (faster, cleaner, more stable, more options)
- Big updates to Mopidy music server
- Optimizations to have less services running, less logging, less writes to SD-Card, no unwanted noises
- Security
- Better security trough a simple firewall
- Mopidy runs as a normal user now
- SSH service disabled by default
- Automatically change passwords of musicbox and root users
v0.3.0 (date unknown)¶
- All configuration is done in one ini-file
- HDMI output supported
- Autodetection of HDMI at start (next to autodetection of USB)
- Override output setting in ini-file
- LastFM scrobbling enabled
- Webinterface updated (speedier)
- Local music files supported, accessible via windows network (but not yet in webinterface)
v0.2.2 (date unknown)¶
- Windows finds the musicbox.local address by itself now (samba).
v0.2.1 (date unknown)¶
Removed ugly sounds on analog port when changing tracks (pulseaudio). An USB-soundcard is still recommended.
v0.2.0 (date unknown)¶
- Based on Raspbian for better performance
- Nicer Webinterface
- Turbo
v0.1.4 (date unknown)¶
- Enabled Medium Turbo mode to speedup everything, usb sound works automagically, bugs fixed.
- Login screen isn’t cleared anymore.
- Set sound volume on boot.
- Reset network config, clear logs, etc.
- Script to create image.
v0.1.3 (date unknown)¶
- New kernel, added raspberry packages.
v0.1.1 (date unknown)¶
- Updates, fixed some small bugs, updated webclient
v0.1.0 (date unknown)¶
- Initial release
\ Sort by:\ best rated\ newest\ oldest\
\\
Add a comment\ (markup):
\``code``
, \ code blocks:::
and an indented block after blank line