Squeezeslave on the core

From LinuxMCE
Revision as of 05:15, 20 June 2008 by Rwilson131 (Talk | contribs) (formatted for wiki)

Jump to: navigation, search

Squeezeslave Setup

Here's how to setup squeezeslave to run on the core. It's fairly straight forward. One small issue is that because squeezeslave uses the OSS interface, you will need a separate sound card for each instance of squeezeslave you want to run.

Download Source

First download a version of Squeezeslave. I'm running the latest version as it fixed some playback bugs I was having, but any version that works with you're setup should be fine.

Installing

  • You'll want to put it somewhere in you're path.
    • Example: /usr/local/bin

Modify /etc/rc.local

Next add the following to /etc/rc.local (this is my setup for two)

 /usr/local/bin/squeezeslave -m 00:00:00:00:00:01 -o 0 -s -r &
 /usr/local/bin/squeezeslave -m 00:00:00:00:00:02 -o 1 -s -r &
  • the MAC address can be whatever you want
  • the -o option specifies which OSS output device ie /dev/dsp1
  • the -s option tells squeezeslave to wait for a signal to quit rather than control-C
  • the -r option tells squeezeslave to keep retrying to connect to the server, useful if the server is not running yet.

Setting Up Alsamixer

Next make sure all the volume levels in the mixer (alsamixer) are set correctly

 aslamixer

Make sure that the settings are as desired and save (Esc button)

Setting Up LinuxMCE

Next step, manually add the squeezeslave to linuxmce as a squeezebox using the mac address you gave it.

Select Device

  • Select Device->A/V Equipment
  • Select SqueezeBox Player from the dropdown options
  • Assign it to a room and entertainment area.
  • Regen your orbiters and reload the router.

LMCE init script

Copy attached script to /etc/init.d

Download Script

Make script executable

sudo chmod +x /etc/init.d/squeezeslave

Modify Parameters

Modify parameters in the beginning of the file to suite your needs.

  • MAC address
  • slimserver host
  • binary location
  • soundcard device.

Below is the parameters you should change:

NAME=squeezeslave
DAEMON=/root/squeezeslave-0.7.1/$NAME
DAEMON_ARGS="-o 1 -m 00:04:20:00:00:01 -r -s 192.168.80.1"

Setup to Run at Start Up

  • Run from shell:
 sudo default-rd.d /etc/init.d/squeezeslave default 50
  • You should now be able to start/stop squeezeslave from shell.
sudo /etc/init.d/squeezeslave start
  • Check with ps if it is running:
 ps aux | grep squeezeslave
    • Example output:
root      9007  0.0  0.3  64116  5436 ?        Sl   Jun18   0:03 /root/squeezeslave-0.7.1/squeezeslave -o 1 -m    00:04:20:00:00:01 -r -s 192.168.80.1
  • To stop:
sudo /etc/init.d/squeezeslave stop
  • Restart your core and check if everything start as it should, including squeezeslave.

That should do it.