LinuxMCE Forums

General => Installation issues => Topic started by: rocketlynx on September 02, 2009, 06:53:00 pm

Title: Squeezeslave On The Core - Referrencing The Wiki
Post by: rocketlynx on September 02, 2009, 06:53:00 pm
First off, Thanks to all who have helped me in the past with LinuxMCE.  This is not to be taken as a Wiki bashing, just an attempt to clarify, get my Squeezeslave working and maybe to correct the wiki if necessary.


I put the squeezeslave binary in "/usr/local/bin" as per the wiki.  Here's my /etc/rc.local file:

Quote
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/usr/local/bin/squeezeslave -m 00:00:00:00:00:01 -o 1 -s -r &
exit 0

Next, I set up LinuxMCE as per the wiki. I now have a slimserver device #106 under the Core, and a child device #105, the Squeezebox Player.  The Squeezebox Player has the IP of the core, "192.168.80.1" and the matching MAC ID of "00:00:00:00:00:01".

The slimserver has NO IP address nor a MAC ID, as it was not mentioned to enter that in the wiki or the forum posts.

The next thing I did was create and customize the startup script "/etc/init.d/squeezeslave". Here is the customized area:

Quote
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/usr/sbin:/usr/bin:/sbin:/bin
DESC="Squeezeslave dameon"
NAME=squeezeslave
DAEMON= /usr/local/bin/squeezeslave
DAEMON_ARGS="-o 1 -m 00:00:00:00:00:01 -r 3 -s 192.168.80.1"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

I then made the script executable with "chmod +x /etc/init.d/squeezeslave".  No sudo at the beginning of the command because I'm already logged in as superuser in the Konsola.  I verified tha the script is now executable - OK,

This is where it all went South - I tried the following with the following results:

Quote
dcerouter_1001088:/# sudo default-rd.d /etc/init.d/squeezeslave default 50
sudo: default-rd.d: command not found
dcerouter_1001088:/# sudo default-rc.d /etc/init.d/squeezeslave default 50
sudo: default-rc.d: command not found
dcerouter_1001088:/# default-rd.d /etc/init.d/squeezeslave default 50
bash: default-rd.d: command not found
dcerouter_1001088:/# default-rc.d /etc/init.d/squeezeslave default 50
bash: default-rc.d: command not found
dcerouter_1001088:/#

The wiki stated to use "default-rd.d", Thom is quoted as stating "should be default-rc.d" and usually Thom is right!  Is this a Kubuntu or LinuxMCE 710 vs. 810 thing?  None of the above worked.

I'm Stuck!  Any suggestions anyone?

Thanks,
Charles
Title: Re: Squeezeslave On The Core - Referrencing The Wiki
Post by: phenigma on September 02, 2009, 07:57:24 pm
I believe the command you want is 'update-rc.d ....'.

J.
Title: Re: Squeezeslave On The Core - Referrencing The Wiki
Post by: rocketlynx on September 02, 2009, 08:19:44 pm
I believe the command you want is 'update-rc.d ....'.

J.

I did not mention that I found that in the forum and already tried it.  Here are the results:

Quote
dcerouter_1001088:/home/charles# update-rc.d /etc/init.d/squeezeslave default 50
update-rc.d: /etc/init.d//etc/init.d/squeezeslave: file does not exist
dcerouter_1001088:/home/charles#
Notice the double slashes (//), I did not enter that... There's a space after update-rc.d and the /etc/init.d/squeezeslave default 50.  Where's that coming from?

So I moved to the /etc/init.d dir so that I wouldn't have to enter anything but the name, squeezeslave and the defaults.
Quote
dcerouter_1001088:/# cd /etc
dcerouter_1001088:/etc# cd init.d
dcerouter_1001088:/etc/init.d#
And then executed the command again as this:
Quote
dcerouter_1001088:/etc/init.d# update-rc.d squeezeslave defaults 50
update-rc.d: warning: /etc/init.d/squeezeslave missing LSB style header
 System startup links for /etc/init.d/squeezeslave already exist.
dcerouter_1001088:/etc/init.d#

That's the result.

Title: Re: Squeezeslave On The Core - Referrencing The Wiki
Post by: sambuca on September 03, 2009, 12:08:56 pm
Hi

I think it should be:
Code: [Select]
update-rc.d squeezeslave default 50
update-rc.d itself knows to look in /etc/init.d for the <basename> which is squeezeslave.

So the last command should have installed the startup link OK.

br,
sambuca
Title: Re: Squeezeslave On The Core - Referrencing The Wiki
Post by: rocketlynx on September 03, 2009, 11:13:57 pm
Hi

I think it should be:
Code: [Select]
update-rc.d squeezeslave default 50
update-rc.d itself knows to look in /etc/init.d for the <basename> which is squeezeslave.

So the last command should have installed the startup link OK.

br,
sambuca

I got it working, however, my intentions when starting this thread was two fold.  Not only did I want to get my squeezeslave device working, but I also wanted to clarify  the wiki page on this.

Too many times everyone is told when they ask questions on this forum, to look in the wiki, and many times the wiki is correct, however, being the live document that it is, it can also be incorrect, ambiguous or just plain out-of-date.  Not many people update the wiki pages on a regular basis and I don't want to be guilty of not taking the time to help the next person.  If the wiki can be corrected and updated, time wasted installing a new device and damage to the Core's installation because some of us simply do not know enough to reverse a mistake, and have to resort to reinstalling the Core, can be avoided by providing updated and corrected procedures.  

On the subject of "Squeezeslave On The Core", this is what worked for me and I'll also note what didn't work, while installing it on LinuxMCE 810-Alpha2.31.

First, I downloaded the latest squeezeslave build, maybe that was a mistake because it never worked.  I downloaded "squeezeslave-0.9-65-lnx26-alsa-display-i686.tar.gz" only for it to never init, giving numerous alsa messages and errors.

Then I dropped back to "squeezeslave-0.8-12-lnx26-intel" which, when everything else was done correctly, worked.  There are other squeezeslave builds in between these, but I haven't tried them because I'm flat worn out getting this finally working.  Also, I believe in the old saying, "If it ain't broke, don't fix it!"  Enough of that, here's how I got it to work.


Now, as per the wiki, you have to manually add the squeezeslave to LinuxMCE as a squeezebox
Quote
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.
It did not mention also adding the IP of the Core, "192.168.80.1" with the MAC address "00:00:00:00:00:01" assigned to the squeezeslave, but I did to make it work.  Also, Why regen the Orbiters, even though it's working, I never saw any changes on any Orbiters, no new buttons, no computing entry to get to the squeezeslave player, if fact, for those of us never doing this before, we don't even have a clue where in LinuxMCE we will access the SqueezeCenter to control Squeezeslave if it installs correctly!

Well, I found it in Admin-->Advanced-->Configuration-->SLIM Server totally by poking around.  I then found that from any browser on my network, going to "http://192.168.0.191:9000", (192.168.0.191 being my router's static assigned IP for my Core), I could get to the SqueezeCenter easily.  

Should it appear anywhere else, like from an Orbiter?  Do you always have to go to Admin on the Core or from any Media Director, or the above mentioned browser address to control SqueezeCenter?  It's OK if you do.  It's great, but I just want to know if I'm missing something on the Orbiters.

Continuing the Installation:

Now the squeezeslave, squeezecenter and slim server all work and I have music out of my second sound card on the Core but it's time to update the wiki.  I'll be more than happy to handle it but I want to update it correctly.

1. Is the information on the wiki correct for earlier LinuxMCE versions, such as, 710 and only a new section needs to be added for 810?
2. Did the commands "sudo default-rd.d /etc/init.d/squeezeslave default 50" or "sudo default-rc.d /etc/init.d/squeezeslave default 50" or "sudo /etc/init.d/squeezeslave start" and "sudo /etc/init.d/squeezeslave stop"  all work in 710 but respond differently in 810 Alpha2?
3. Is there a need for the command "update-rc.d" or is it redundant because it was accomplished when editing /etc/rc.local?
4. Am I missing buttons on Orbiters for squeezeslave, squeezebox or squeezecenter, or is accessing it through Admin or a browser, as mentioned above the only way and is correct?
5. Is there a way to control other audio sources connected to the second sound card's inputs such as , external CD jukeboxes, external tuners and use them as a source for SqueezeCenter to output to the squeezeslave's 2nd. sound card?

After seeing SqueezeCenter and SqueezeSlave running, it has a lot to offer for LinuxMCE.

Maybe this seems like a lot to expect, but all I want is some confirmation on the above questions and I'll make sure the wiki is updated.  I just want to do it correctly for those who follow.
Title: Re: Squeezeslave On The Core - Referrencing The Wiki
Post by: sambuca on September 04, 2009, 07:46:43 am
I agree, we definitely need more validation of the wiki pages. Thanks for doing your part  :)

I have to admit that with some linux experience I got this working without the problems you have gotten into. But if the wiki article was better, maybe we wouldn't get that many questions...

I'll try to answer your questions:
1) I think the instructions were wrong for 710 as well
2) No, they were wrong all along
3) I'm not sure, but it might be redundant, yes
4) There is no buttons on the orbiter specific for the squeeze-stuff. If you assign your squeezeslave to an entertainment area (EA)/room, you will be able to select that room from any orbiter and play music. (you have to regenerate the orbiters to update the available scenarios).
5) LMCE does have means to control external AV equipment (via IR for instance) but I'm not sure how it would work in this case.

best regard
sambuca
Title: Re: Squeezeslave On The Core - Referrencing The Wiki
Post by: rocketlynx on September 04, 2009, 09:39:51 am

I'll try to answer your questions:
4) There is no buttons on the orbiter specific for the squeeze-stuff. If you assign your squeezeslave to an entertainment area (EA)/room, you will be able to select that room from any orbiter and play music. (you have to regenerate the orbiters to update the available scenarios).

best regard
sambuca
Hi Sambuca, and thanks for responding.  The reason I highlighted and quoted your answer to question 4, is because, maybe I'm being thick-headed, but I don't see any means or way from any of my Orbiters to send the Squeezeslave's output to any MDs.

I've got my squeezeslave setup to output to my Core's second sound card's output.  The core is in a closet, converted as the central location for all automation in my home.  For example, I've selected an internet radio station from the SqueezeCenter (on the screen's left side) and the SqueezeSlave (on the screen's right side) shows it playing.  I also can hear the music on some temporary computer speakers connected to the Core's second sound card's line out, of which will soon be feeding an amplifier connected to zoned speakers on the patio, in the gameroom, backyard and other areas for background music.

Now, I get all of that.  The squeezeslave was already assigned to the Core's entertainment area so I also assigned the squeezeslave to the other entertainment areas, reloaded the router, regenerated the Orbiters and don't see any means of any way to send the squeezeslave's output to any MD.

I already can send ripped audio to the MDs, however, I don't see any ability to send the squeeze's sources anywhere other than the default, assigned Core's second sound card's output.  What do I not understand?

Charles