Building a player - terba/slimmer GitHub Wiki
First of all, you will need an installation of Logitech Media Server on your network. You can also install this on the player itself, but it is advisable to have a separate computer for that (a NAS for example).
Using the following components you can build a high quality & low-cost network audio player with a slick interface:
Hardware components
- a Raspberry PI board with a power supply and SD card
- a DAC (sound card)
- a character LCD supported by lcdproc (for example a 2004 HD44780 compatible)
- an incremental rotary encoder with switch
- two momentary switches
- and some basic electronic components (one trimpot and some resistors)
Software components
- piCorePlayer 2.06 or newer
- Pikeyd
- LCDProc
- Slimmer
Setup
If you are not familiar with the text editor vi, you can download nano with
tce-load -w nano
. Just replacevi
withtce-run nano
in the following steps.
Set up the piCorePlayer image on your Raspberry Pi. You can find its documentation here. Use piCorePlayer 2.06 or a newer version!
It may be a good choice to resize the SD card partition using the piCorePlayer web interface before installing Slimmer.
If piCorePlayer is working on the Pi, you can follow the steps below to create a user interface for the player.
-
Connect the LCD, the rotary encoder and the momentary switches to the pins of the Pi. You can find many good tutorials on the net on those topics. Be careful when connecting a 5V LCD! Backlight control is available from Slimmer 2.0, so you can connect a switching component to the Pi to allow Slimmer to switch on/off the backlight of the LCD.
-
Turn on the Pi and log in over ssh with the tc user.
-
Download the latest Slimmer binary bundle:
cd /tmp && wget https://github.com/terba/slimmer/releases/download/v1.2.1/slimmer-bundle.tar.bz2
-
Extract it:
tar jxvf slimmer-bundle.tar.bz2
-
Copy the extracted files to the SD card:
cp slimmer-bundle/* /mnt/mmcblk0p2/tce/optional/
-
Download the required libraries:
tce-load -w curl icu libftdi
If You encounter the problem of missing ipv6 kernel module, you should use your players web page to install this from the piCorePlayer repository or use the following commands:
echo "http://picoreplayer.sourceforge.net/tcz_repo/" > /opt/tcemirror tce-load -w ipv6-X.X.X-pcpCore echo "http://repo.tinycorelinux.net/" > /opt/tcemirror
Replace X.X.X with the version the error message was complaining for. After that You will be able to install the libs, so please repeat this step.
-
Install the bundle:
tce-load -i lcdproc-server pikeyd slimmer
-
Configure LCDd:
sudo vi /usr/local/etc/LCDd.conf
See my HD44780 config. -
Start LCDd. You should see the welcome text on the display:
sudo /usr/local/etc/init.d/lcdproc-server start
-
Configure Pikeyd:
sudo vi /usr/local/etc/pikeyd.conf
See my config. -
Start Pikeyd:
sudo /usr/local/etc/init.d/pikeyd start
-
Configure Slimmer.
sudo vi /usr/local/etc/slimmer.conf
My config isOPTIONS="--lmshost 192.168.1.2 --lmsport 9002 --input /dev/pikeyd --volume 100 --encoding ISO-8859-2"
Executeslimmer --help
to see the possible options. -
Start Slimmer:
sudo /usr/local/etc/init.d/slimmer start
Slimmer should be working now. -
Add the config files to the backup list:
cat >> /opt/.filetool.lst << EOF usr/local/etc/pikeyd.conf usr/local/etc/LCDd.conf usr/local/etc/slimmer.conf EOF
-
Enable install at boot:
cat >> /mnt/mmcblk0p2/tce/onboot.lst << EOF lcdproc-server.tcz pikeyd.tcz slimmer.tcz EOF
-
Enable start at boot:
cat >> /opt/bootlocal.sh << EOF /usr/local/etc/init.d/lcdproc-server start /usr/local/etc/init.d/pikeyd start /usr/local/etc/init.d/slimmer start EOF
-
Save the config files:
sudo filetool.sh -b
-
Reboot:
sudo reboot
Do not turn the power off without rebooting after configuration changes!
Troubleshooting tips
Testing pikeyd and the connected encoder and buttons
With evtest you can monitor the generated keyboard events:
tce-load -iwl evtest
evtest /dev/pikeyd
Slimmer watches only the following keys: KEY_BACKSPACE, KEY_LEFT, KEY_RIGHT, KEY_ENTER and KEY_SPACE.
Rotary encoder is working in reverse
Just swap the key codes (KEY_LEFT, KEY_RIGHT) in pikeyd.conf.