Difference between revisions of "Squeezeslave on the core"

From LinuxMCE
Jump to: navigation, search
(formatted for wiki)
Line 1: Line 1:
 
[[Category: Tutorials]]
 
[[Category: Tutorials]]
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
+
{| align="right"
you will need a separate sound card for each instance of squeezeslave you want to run.
+
  | __TOC__
 
+
  |}
First download a version of [http://sourceforge.net/project/showfiles.php?group_id=105169 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
+
==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 [http://sourceforge.net/project/showfiles.php?group_id=105169 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)
 
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:01 -o 0 -s -r &
Line 13: Line 19:
 
* the -s option tells squeezeslave to wait for a signal to quit rather than control-C
 
* 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.
 
* 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
 
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.  Assign it to a room and entertainment
+
Next step, manually add the squeezeslave to linuxmce as a squeezebox using the mac address you gave it.   
area.  Regen your orbiters and reset the dcerouter.
+
 
 +
====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 ==
 
== LMCE init script ==
 
Copy attached script to /etc/init.d
 
Copy attached script to /etc/init.d
 
+
===Download Script===
[http://194.68.235.9/lmce/squeezeslave.tar.gz initscript]
+
* [http://194.68.235.9/lmce/squeezeslave.tar.gz initscript]
 
+
===Make script executable===
 
+
sudo chmod +x /etc/init.d/squeezeslave
Remember to do "sudo chmod +x /etc/init.d/squeezeslave" to make the script executable.
+
===Modify Parameters===
 
+
Modify parameters in the beginning of the file to suite your needs.  
Modify parameters in the beginning of the file to suite your needs.
+
* MAC address
 
+
* slimserver host
Like MAC addr, slimserver host, binary location, soundcard device.
+
* binary location
 
+
* soundcard device.
  
 
Below is the parameters you should change:
 
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"
  
NAME=squeezeslave
+
===Setup to Run at Start Up===
 
+
* Run from shell:
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:
+
  sudo default-rd.d /etc/init.d/squeezeslave default 50
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
+
  
 +
* You should now be able to start/stop squeezeslave from shell.
 +
 +
sudo /etc/init.d/squeezeslave start
  
To stop:
+
* Check with ps if it is running:
sudo /etc/init.d/squeezeslave stop
+
  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:
  
Restart your core and check if everything start as it should, including squeezeslave.
+
sudo /etc/init.d/squeezeslave stop
  
 +
* Restart your core and check if everything start as it should, including squeezeslave.
  
 
That should do it.
 
That should do it.

Revision as of 05:15, 20 June 2008

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.