Difference between revisions of "Squeezeslave on the core"

From LinuxMCE
Jump to: navigation, search
m
Line 21: Line 21:
 
Copy attached script to /etc/init.d
 
Copy attached script to /etc/init.d
  
[[link to squeezeslave init scriptsqueezeslave]]
+
[http://194.68.235.9/lmce/squeezeslave.tar.gz initscript]
 +
 
  
 
Remember to do "sudo chmod +x /etc/init.d/squeezeslave" to make the script executable.
 
Remember to do "sudo chmod +x /etc/init.d/squeezeslave" to make the script executable.

Revision as of 13:13, 19 June 2008

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.

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. You'll want to put it somewhere in you're path. I have mine installed in /usr/local/bin

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.

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

Next step, manually add the squeezeslave to linuxmce as a squeezebox using the mac address you gave it. Assign it to a room and entertainment area. Regen your orbiters and reset the dcerouter.

LMCE init script

Copy attached script to /etc/init.d

initscript


Remember to do "sudo chmod +x /etc/init.d/squeezeslave" to make the script executable.

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

Like MAC addr, 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"


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.