One of the best features of the Squeezebox Boom (or any other SqueezeBox devices for that matter) is the ability to remotely control it as well as to stream your own music collection to it. But to do this, you will need to install and run a server software called the SqueezeCenter somewhere on your network. The ideal place to host it will be where you store your music library and in my case, that would be my SOHO NAS, the Dlink DNS-323.
Typically, the first question that comes to mind when you need to install and run a software is the OS platform and hardware requirements. The good news is that SqueezeCenter is written in Perl and stores its data in a MySQL database hence will run on any OS platform which supports those two dependencies; And that practically means all common platforms out there e.g. Mac, Linux and Windows.
In terms of hardware requirements, its alittle heavy but nothing a recent PC cannot handle. On the DNS-323 however, it still runs but performance does take quite a hit. In my setup, the memory footprint is around 90MB for SqueezeCenter alone plus another 20MB for MySQL and CPU utilization spikes to 100% often when using the web interface. Note that the DNS-323 has just 64MB of physical RAM and a 500MHz ARM CPU. Having said that, the web interface is still fully usable (no time outs) although you do feel the lagginess with most operations.
Luckily, the weak server hardware does not affect its streaming abilities and so far (er.. that's just a couple of hours usage since I got my box only yesterday), I have not experienced any issues on my SqueezeBox Boom. From my observations, the CPU hardly broke a sweat (>5% usage) when streaming mp3 format natively and the response on SqueezeBox Boom controls are pretty jiffy.
Here's what I did to get SqueezeCenter up and running on the DNS-323:
- Get ffp 0.5 up and running (see wiki or my post);
- Setup Pre-requisite 1 - MySQL
- If you don't already have MySQL running, see this post;
- Create a new database and an associated db user for SqueezeCenter (NOTE: db and user should be called slimserver!) :
# mysql -u root -p
Enter password: your_root_password
mysql> create database slimserver;
mysql> grant all on slimserver.* to slimserver identified by 'your_password';
mysql> flush privileges;
mysql> quit - Setup Pre-requisite 2 - Perl
- Download and install all the Perl packages found here:
# wget -r -l1 --no-parent -A.tgz http://www.inreto.de/dns323/fun-plug/0.5/extra-packages/perl/
# funpkg -i *.tgz - Setup and configure SqueezeCenter
- Download and install SqueezeCenter package (squeezecenter-7.3.2-1.tgz);
# wget http://www.inreto.de/dns323/fun-plug/0.5/extra-packages/squeezecenter/squeezecenter-7.3.2-1.tgz
# funpkg -i squeezecenter-7.3.2-1.tgz - Configure SqueezeCenter to start automatically when the box boots as well as to start it up now
# cd /ffp/start
# chmod a+x slimserver.sh
# ./slimserver.sh start - When SqueezeCenter starts up, it can take quite a few minutes before the web console becomes accessible. When it does become ready, you can access it via the URL http://[replace with your nas ip or hostname]:9000/
- Once you get into the web interface, the first thing you should do is to setup the path to your music collection. If your music collection is scattered all over, you will need create a "holding" directory and create the appropriate symlinks in there as SqueezeCenter only allows you to specify one location.
- Next trigger the scanning process to catalog your collection. Given the weak hardware of the DNS-323, the scanning process can take a long time to complete. (My 2000 odd files took 1+ hour to complete!)
- Download and install SqueezeCenter package (squeezecenter-7.3.2-1.tgz);
- SqueezeCenter Tips and Tricks
- The location of the SqueezeCenter installation files (including plugins) are found in /ffp/lib/squeezecenter/.
- The location of the SqueezeCenter configuration files (including plugins) are found in /ffp/etc/squeezecenter/.
- The location of the SqueezeCenter log files are found in /ffp/lib/squeezecenter/Logs/. Since this isn't in line with where all my other logs go, I created a symlink to it at /ffp/var/log/squeezecenter/.
- You can set SqueezeCenter to automatically rescan your music collection once a day via the Schedule Rescan function in Settings>Advanced>Rescan Music Library.
- To reduce the memory footprint of SqueezeCenter, go to Settings>Plugins and uncheck all the plugins that you do not use. For me, I turned off the following plugins:
- Amazon CD Store
- Deezer
- Digital Inputs
- MP3tunes Music Locker
- MusicIP
- Pandora
- Rhapsody
- RSS News Ticker
- SIRIUS Internet Radio
- Slacker
- SlimTris
- If you find the display only shows the time and does not show the date in the "off/Standby" state, it is most likely because of your font setting. Change it (Settings>Player>Display>Standby Font) to "Standard" to see the date information.
- The slimserver startup script provided by fonz does not guard against firing multiple instances of the slimserver process. To fix this problem, include the following chunk of code at the top of the slimserver_start() function.
# check if daemon is already running, if yes, do nothing
if proc_status $command | grep -q "running as pid"; then
echo "INFO: ${name} already running! Nothing to do."
return
fi
# check if mysqld is already running, if not, prompt user and exit
if proc_status "mysqld" | grep -q "not running"; then
echo "ERROR: mysqld has to be running before ${name} can be started!"
return
fi - The pre-configured SqueezeCenter settings uses named pipes for accessing MySQL, if you are having problems like database time-outs; e.g. you can connect to the web console but find that the scanning process did not find all your music files, check in the scanner log (/mnt/usb/ffp/lib/squeezecenter/Logs/scanner.log) for the following error messages:
Slim::Schema::forceCommit (1496) Warning: Couldn't commit transactions to DB: [DBD::mysql::db commit failed: MySQL server has gone away at /mnt/usb/ffp/lib/squeezecenter/Slim/Schema.pm line 1493.
If it exists, then you may want to change SqueezeCenter to connect to the DB via TCP/IP instead. To do that, in your server config file, change the value of dbsource to "dbi:mysql:hostname=localhost;port=3306".
]
Slim::Schema::Storage::throw_exception (70) Error: DBI Connection failed: DBI connect('database=slimserver','slimserver',...) failed: Can't connect to local MySQL server through socket '/ffp/var/run/mysql/mysql.sock' (2) at /mnt/usb/ffp/lib/squeezecenter/CPAN/DBIx/Class/Storage/DBI.pm line 652
Overall, I'm very pleased with the setup. The only gripe is that my HDDs no longer spin down when the NAS is idle due to the virtual memory swapping caused by the SqueezeCenter process (which still consumes some CPU even when no clients are active!). I contemplated putting the swap space on the USB stick where ffp lives to circumvent this but decided not to as I'm not confident that my relatively new USB stick can take that kind of abuse (flash drives have limited write cycles). Perhaps its time to go for the 128MB memory upgrade hack!
2 comments:
Is there a way to get the tiny squeezecenter 'squeezed' running? There don't seem to be any instructions anywhere and I had no success in getting this working.
Can anyone share some success stories and instructions with DNS-323 and 'squeezed' rather than the big brother squeezecenter?
A mysql update:
slimserver user needs to be setup with proper permissions:
localhost@slimserver - with empty password (which is default for squeezecenter - in /ffp/lib/squeezecenter/Slim/Utils/Prefs.pm file)
grant all on slimserver.* to slimserver@localhost identified by '';
Additionally you will need a couple of packages to be installed on top of a clean fun_pkg 0.5 in to make the squeezecenter work:
gd-2.0.35-1.tgz
gd/libgd dependiencies:
libjpeg-6b-1.tgz
libpng-1.2.29-1.tgz
libiconv-1.12-3.tgz
They're all available at
http://www.inreto.de/dns323/fun-plug/0.5/packages/
or directories within 0.5 version.
Without them (or some of them), the slimcenter.pl will quietly die with Segmentation Fault on bootstrapping GD.pm module)
After having succesfully installed the squeezecenter, I must admit it's hardly usable as it uses over 100% of physical RAM...
Cheers,
Y
Post a Comment