My home music system - Logitech Media Server & Squeezelite


Since RaspberryPi was released I have been testing how it could be used as home media center. I had quite good results with XBMC but I also realized the limited performance of RaspberryPi.

I bought a new TV last summer and since then I have not needed a separate media player for video. I still needed good audio player. I first tested RaspyFi distribution. The software is controlled via web gui or via client software on Android or Apple phone or tablet. Only problem I had was that the indexing of music was really slow and adding new content took too much time to index.

Logitech Media Server and Squeezelite

Then I found Logitech Media Server (LMS). LMS was originally built as backend for Logitech Squeezebox players but today there are also software clients available. LMS can run on most operating systems.

Squeezelite is a squeezebox software emulator. I can run on Windows or Linux and there is also RaspberryPi version available. Squeezelite supports 192KHz playback.

Things that I like in LMS:
-very good free client for Android phones, iPhone and iPad
-plays all my files (wav, mp3, flac, alac)
-supports Spotify via 3rd party plugin
-plays web radios out of the box, found all local stations automatically
-lot of plugins available
-supports Digital Room Correction with BruteFir plugin
-can act as Airport server


Lacie 2Big 6TB NAS
- Storage for my files, all music is stored here

Asus Eee Box B206
- Logitech Media Server ... ox_b206/

- Squeezelite music player

- 24Bit/192kHz I2S DAC ... lator.html

HD44780 4x20 character LCD
- Display for raspberryPi ... cts_id=207


Logitech Media Server (LMS)

Setting up LMS is quite straightforward. I first installed 32-bit version on Ubuntu Server 13.04 to Asus Eee Box. During the install I selected to install OpenSSH Server. When installation was ready I logged in to the server with SSH.

I followed this install guide: ... erver.html

Here are the steps I did:

First, edit /etc/apt/sources.list:
sudo nano /etc/apt/sources.list

Add this line to the end of the file, save and exit:
deb stable main

Get updates:
sudo apt-get update

Install Logitech Media Server:
sudo apt-get install logitechmediaserver

To start LMS you can just reboot or type:
sudo service logitechmediaserver restart

After that you can access to your server from web browser:
(where MyMediaServer is IP or dns resolvable hostname of the LMS server)

Web configuration part of the server is quite self explaining.

Cifs install (if you want mount you media library from windows file share):

On CIFS install I mostly followed this guide:

Install Cifs utils :
sudo apt-get install cifs-utils

Update the unmount order to prevent CIFS from hanging during shutdown.
sudo update-rc.d -f remove
sudo update-rc.d stop 15 0 6 .

Make folder for mount:
cd /mnt
sudo mkdir /mnt/nas
sudo chmod 777 /mnt/nas

Making permanent mounts was described here: ... box-server

Permanent mount:
sudo nano /etc/fstab

I added line:
//x.x.x.x/Public /mnt/nas cifs guest,iocharset=utf8 0 0

(where x.x.x.x is my Lacie NAS box IP-address)

Squeezelite player and RaspberryPi

Raspbian Linux image can be downloaded from

I used Win32DiskImager to copy Raspbian image to SD card.

When Raspberry Pi is powered on for the first time it starts raspi-config automatically.

You can run it later from command line:
sudo raspi-config

Changes I made:
-Expand filesystem, this allows you to use whole SD-card
-Change User Password
-Advanced Options:
--Change hostname, I used hostname “livingroom”
--Memory Split, I set GPU mem to 16MB
--Enable SSH
-Internalization Options
--Set ISO8859-15 or UTF-8 character set

First update system to use latest kernel:
sudo rpi-update
sudo reboot

I followed installation guide on Rapsberry Pi forum: ... mp;t=25778

Download necessary libraries:
sudo apt-get install libflac-dev libfaad2

Make new folder and download squeezelite:
mkdir squeezelite
cd squeezelite

Move it to /usr and make it executable:
sudo mv squeezelite-armv6hf /usr/bin
cd /usr/bin
sudo chmod u+x squeezelite-armv6hf

Enable modules that are required for I2S. Add the following lines to the file /etc/modules:

(I found I2S enabling instructions from here: ... -software/)

Reboot RaspberryPi to enable I2S.

To get list of available sound cards type:
sudo squeezelite-armv6hf -l

And you should see this output:

Output devices:
null - Discard all samples (playback) or generate zero samples (capture)
pulse - PulseAudio Sound Server
default:CARD=ALSA - bcm2835 ALSA, bcm2835 ALSA - Default Audio Device
sysdefault:CARD=ALSA - bcm2835 ALSA, bcm2835 ALSA - Default Audio Device
default:CARD=sndrpihifiberry - snd_rpi_hifiberry_dac, - Default Audio Device
sysdefault:CARD=sndrpihifiberry - snd_rpi_hifiberry_dac, - Default Audio Device

Starting Squeezelite with I2S support:
/usr/bin/squeezelite-armv6hf -o default:CARD=sndrpihifiberry -n Livingroom

When this was working, I followed the guide and made Squeezelite to start automatically:

cd /home/pi/squeezelite
sudo wget
sudo mv /etc/init.d/squeezelite

cd /etc/init.d
sudo chmod u+x squeezelite

sudo update-rc.d squeezelite defaults

Then edit settings:
sudo nano squeezelite

Modify the following lines:


Then save the file. Squeezelite will not start automatically on next reboot.
Use this command to reboot:
sudo shutdown -r now

You can also manually start, stop and update squeezelite:
sudo /etc/init.d/squeezelite start
sudo /etc/init.d/squeezelite stop
sudo /etc/init.d/squeezelite update

Adding LCD support

To get LCD display working with Rpi I first tested pyLCD:

I had to do some changes to get all four lines of the display working properly. I was going to write some own code to get information to display but then I found SqueezeBerry: ... ayer-based

I was able to get squeezeberry working, but it was not suitable for my use. Squeezeberry updates the display only when it is controlled via it’s own control buttons.

LCDProc + lcdlms

After some googling I found out script from this page: ... g-lcd.html

lcd_lms is a perl script that communicates with Logitech Media Server and output information to LCDProc.
To get this working I first installed LCDProc using this guide: ... spbian.txt

First I installed LCDProc using apt to get it start automatically::
sudo apt-get install lcdproc

LCDProc needs to be built from sources to support HD44780 display.
I started by downloading the source and extracting it:

sudo wget
tar xvfz lcdproc-CVS-*.tar.gz
cd lcdproc

To install needed build tools I had to do this:
sudo apt-get install cvs autoconf automake

Build LCDProc:

sudo sh
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-drivers=hd44780

Modify /etc/LCDd.conf:
sudo nano /etc/LCDd.conf

Here are the lines I modified:





Save file and test if LCDProc works:
server/LCDd -f

Install it:
sudo make install

After LCDProc was working I continued with lcd_lms install. First download the file and make it executable:

chmod u+x

Lcd_lms need URI::Escape Perl library. Install it with these commands:
perl -MCPAN -e shell

In Perl Shell type:
install URI::Escape

Exit when installation is done:

sudo nano

Edit LMS server address:
my $LMS = "x.x.x.x";

Then save and exit.

Run lcd_lms by typing:
./ Livingroom

To make lcd_lms start automatically I followed this guide: ... rt-up.html

Create startup file:
sudo nano /etc/init.d/lcd_lms

Paste this into it:
#! /bin/sh
# /etc/init.d/lcd_lms

# Provides: lcd_lms
# Required-Start: $remote_fs $syslog LCDd
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Lcd_lms
# Description: Start lcd_lms at startup. Wait that LCDProc is running first.

# If you want a command to always run, put it here

# Carry out specific functions when asked to by the system
case "$1" in
echo "Starting lcd_lms"
# run application you want to start
/home/pi/ Livingroom &
echo "Stopping lcd_lms"
# kill application you want to stop
echo "Usage: /etc/init.d/noip {start|stop}"
exit 1

exit 0

Then save and exit

Make script executable, start it and make it start automatically:
sudo chmod 755 /etc/init.d/lcd_lms
sudo /etc/init.d/lcd_lms start
sudo update-rc.d lcd_lms defaults

Fixing äö and å characters

Lcd_lms was working fine, but I still had problems with scandinavian characters. I tried to configure LCDProc settings but I was not able to make conversion happen automatically. I ended up to modify lcd_lms script to change UTF-8 charecters to characters supported by HD44780 character set.

I wrote this conversion function:

sub map_ascends {
my $string = shift;
$string =~ s/\xC3\xA4/\x84/g;
$string =~ s/\xC3\xA5/\x86/g;
$string =~ s/\xC3\xB6/\x94/g;
$string =~ s/\xC3\x84/\x8E/g;
$string =~ s/\xC3\x85/\x8F/g;
$string =~ s/\xC3\x96/\x99/g;
return $string;

And used it here (# lines are replaced with new):

sub playlist {
my $cmd = shift;
switch ($cmd) {
case "clear" { clear_track; }
case "stop" { set_playing 0; set_status $cmd; }
case "pause" { lms_query_send "mode"; }
# case "title" { shift; set_title uri_unescape(shift); }
case "title" { shift; set_title map_ascends(uri_unescape(shift)); }
# case "album" { shift; set_album uri_unescape(shift); }
case "album" { shift; set_album map_ascends(uri_unescape(shift)); }
# case "artist" { shift; set_artist uri_unescape(shift); }

I used these character maps to make the string conversions:


Spotify addon can be installed directly from LMS gui. Official Spotify plugin does not work, but verion on Recommend third party plugins is working fine.


Will be updated...

Airplay support

Will be updated...

Connecting Display and DAC to RaspberryPI

Will be updated...