Hi, There are plenty of preconfigured packs for Raspberry Pi with MPD https://www.musicpd.org/ and Last.fm like RuneAudio for example. I used RuneAudio for some time, but I had problems with connecting RPi through wifi (device was connected, but I was unable to ping that IP from mikrotik). Wifi card is TP-LINK TL-WN725N that normally should work out of the box with RPi. There were also problems with web-gui... I decided that it should be much easier to install and configure everything by hand on Raspbian. I chose Raspbian but You can choose other OS for RPi like Arch Linux ARM
Pros & cons Pros of that solution:
no gui -> less resources used
wifi works without issues
you can update Your device like normal OS and have more control
Cons of that solution:
You need to do something Yourself (but it could be also pros :P)
How to achieve it: It is not 1:1 HOWTO but if somebody will need additional information I can provide it. For example there is no info how to set static IP or how to use putty from windows to connect by ssh to Linux box.
- Download Raspbian and install it to your sd card https://downloads.raspberrypi.org/raspbian_lite_latest
- Connect RPi to monitor (using hdmi), attach wifi card, keyboard and boot it.
- Default username is "pi" with password "raspberry". You should change it. I suggest to change also root password sudo passwd and enable root ssh access for easier access edit /etc/ssh/sshd_config and set PermitRootLogin yes.
- Edit /etc/wpa_supplicant/wpa_supplicant.conf with nano or vi and add ssid, password and Your country code. Next ifdown wlan0, ifup wlan0 and that's it. You can disconnect monitor and keyboard.
- Run raspi-config for easier change of password, hostname, locale settings, default audio output etc:
- Run commands: apt-get update, apt-get upgrade and reboot. Upgrade will take a while. Go for some coffee or tea.
- You need to mount music folder on every reboot. crontab -e and add:
@reboot (sleep 30; /bin/mount -t cifs //server/share /media/music -o user=user,pass=pass,dom=domain,ro)&
- Now You can install mpd: apt-get install mpd mpdscribble
- Last.fm support: edit /etc/mpdscribble.conf and insert you login and password.
- Edit /etc/mpd.conf and set it like below (of course do not delete other settings :P):
user "root"
#to avoid permissions problems
bind_to_address "any"
music_directory "/media/music"
#point it to location where you have Your music mounted
audio_output {
type "alsa"
name "My ALSA Device"
}
It is easy :).
My small update regarding spotify and possible solutions [https://wojtek.gustowski.pl/raspberry-pi-spotify/].