Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 209 FirstFirst 12341252102 ... LastLast
Results 11 to 20 of 2083
  1. #11
    Senior Member
    Join Date
    Aug 2006
    Posts
    181
    My PC is only a few years old with the NIC being a chip or 2 on the motherboard, so shouldn't require the cable option. According to the manufacturer's on-line manual, implementing the "magic packet" WOL is a matter of setting a bit in a register. I guess I will have to look into that. In the mean time, I have a work around whereby I have set the bios to wake up the PC on application of power. The PC is plugged into a receptacle that can be turned on and off with a radio remote. Not elegant, but, along with your plug-in, saves me the trips upstairs to the PC when I want to use SC. I'm embarrassed to say how many times I have opted to use SN rather than climb the stairs;

  2. #12
    Hey this looks very nice!

    I have a Debian server running Etch, but run into some problems.

    First I had to put the Plugin into /usr/share/squeezecenter/Plugins/ instead of /var/lib/squeezecenter/Plugins (I guess the Debian squeezecenter package manages differently than the rpm ).

    I could not get the svrpowerctrlsetup file to execute, a error with the shell interpretation on my Debian system, so I proceeded manually.

    I could not find the /etc/sudoers file on my system, and I guess this is the main problem... what would be equivalent file on Debian? , I already did the touch /etc/shutdown

    I can see the menu on my SB3, but when I try to Shutdown the Server, after 15 seconds it just stops playing and shows the Now Playing text on the screen, it doesn't shut down. The same with the other 2 options. Changing to Squeezenetwork worked well, but of course it could not shut down the server.

    Any help would be appreciated.
    rip (eac) > convert (flac) > tag (musicbrainz/mp3tag) > normalize (replaygain/foobar2000) > albumart (www/firefox) > transport (winscp) > store (debian) > manage (squeezecenter) > control (ipodtouch/ipeng-app) > play (squeezebox) > preamplify (zpre2) > amplify (zampv3) > listen (axiomm2/sennheiser-hd595) > scrooble (last.fm) > enjoy (me :)

    http://www.last.fm/user/pichonCalavera

  3. #13
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    1,509

    Are you missing sudo ?

    Quote Originally Posted by pichonCalavera View Post
    Hey this looks very nice!
    I have a Debian server running Etch, but run into some problems.
    I could not find the /etc/sudoers file on my system, and I guess this is the main problem... what would be equivalent file on Debian? , I already did the touch /etc/shutdown
    My etch box has /etc/sudoers but I wonder if it came with sudo by default.
    Perhaps "apt-get -s -f install sudo" could help ?
    (With "-s" apt switches to the "dry run" mode, spitting out all commands but actually not taking action. If the output looks good, then remove "-s" and run again the command)

    I will take a look at the plugin. I have made the original script work on my box, here are a few hints:
    - /etc/shutdown is of no relevance as far as I understand. I have not created it.
    - You could add the squeezecenter user to the "sudo" users group to allow it to run the shutdown command : "usermod -a -G sudo squeezecenter". Normally this is supposed to slice bread but since my /etc/sudoers file had no definition for a "%sudo" group, it had no effect.
    I ended up adding **using the visudo command** the following line to /etc/sudoers:
    "squeezecenter ALL = NOPASSWD: /sbin/shutdown*"
    Only type "visudo" (as root) then add this line (without quotes).
    - Last I had an issue because of the 'lecture' option of sudo. First time you use it, sudo lectures you on how dangerous using sudo is. There is no logon shell defined for the squeezecenter system user, and I think this is a problem for the lecture thing. Sudo never works.
    I did this to make it work:
    + as root edit /etc/passwd and on the squeezecenter line, replace ":/bin/false" at the end of the line with ":/bin/sh".
    + then still as root change to the squeezecenter user with "su squeezecenter" and the type something like "sudo ls"; get lectured.
    + then reverse the edit in /etc/passwd and the plugin should work.
    (there is certainly a better way specifying how to handle the lecture option but I am not aware of it.)

    HTH

    PS : WRT making WOL work on linux, I highly recommend reading this german wiki page which I think is a great resource, even translated by google.
    Personally I had WOL enabled in BIOS, then enabled WOL on magic packets using ethtool in the /etc/network/interfaces file (with "post-up /usr/sbin/ethtool -s eth0 wol g" in the relevant section), but still no results.
    As explained on the wiki page, I needed to coax ACPI in listening to the wake-up event with this (that I added to rc.local or another boot script) :
    Code:
    if (/bin/grep NMAC /proc/acpi/wakeup | /bin/grep disabled 2>&1 >> /dev/null) ; then
        /bin/echo -n NMAC > /proc/acpi/wakeup
    fi
    (NMAC is the name of my integrated ethernet device. Yours is probably different, see the page.)
    Last edited by epoch1970; 2008-06-22 at 07:05.

  4. #14
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,339
    epoch1970: would you be willing to add your debian-specific instructions to the readme file and post it back here? I'd like to add your info to the release version. I'm wondering if I should include distro-specific setup helper scripts.

    Also: does your sudoers file contain the "Defaults requiretty" line? Did you comment that out? I never had to modify my passwd file to remove the nologin for the squeezecenter user.

    I appreciate any help you guys can give me with other distros. Fedora is the only thing I've got running here. Thanks.

  5. #15
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    1,509

    Debian SrvPowerControl...

    Gharris999,
    I'll setup a clean debian etch (as a VirtualBox), install Squeezecenter and SrvPowerControl, and take precise notes of what's needed to get it running. I don't think it'll take too long.
    Then I'll add the info the the Readme.

    (I believe sudoers under debian comes empty or so. I completely overlooked the "requiretty" thing, that might be the -honorable- solution to the shell problem.)

  6. #16
    Quote Originally Posted by epoch1970
    My etch box has /etc/sudoers but I wonder if it came with sudo by default.
    Perhaps "apt-get -s -f install sudo" could help ?
    (With "-s" apt switches to the "dry run" mode, spitting out all commands but actually not taking action. If the output looks good, then remove "-s" and run again the command)
    Hey thanks!, your suggestions did the trick.

    First I had to apt-get the sudo package, and then do your other instructions. Afterwards everything worked fine.

    Quote Originally Posted by gharris999
    I appreciate any help you guys can give me with other distros. Fedora is the only thing I've got running here. Thanks.
    Just a little question... how does the shutdown procedure work?. And to make my point a little clearer I'll explain a bit...

    In Debian I have the squeezecenter initscript under /etc/init.d/ and I modified the stop routine, so that when the squeezecenter service is stopped, I first send a "Power Off" command to squeezecenter (you see... I have IRBlaster plugin installed, and I have configured IRBlaster to send a Off command to my Preamplifier when the Squeezebox is turned off).

    So for example if I do a /etc/init.d/squeezecenter stop on the command line, the Preamplifier turns off, then Squeezebox turns off, and then Squeezecenter turns off.

    Continuing further... I have a cronjob that runs late at night, that has the purpose of shutdown my server (no point for me keeping it on if I fall asleep). So at the end, the command that this cronjob executes is this one:

    Code:
    /sbin/shutdown -h -t secs now
    And this puts a series of actions that in the process, executes the /etc/init.d/squeezecenter stop command, thus shutting down my Preamplifier, Squeezebox, Squeezecenter and Server (and saving the planet :P )

    So returning to my original question, when I select the Shutdown Server option of this plugin, it does shutdown my server, but it doesn't seem to execute the /etc/init.d/squeezecenter stop command (becuase I see the Squeezebox stays in a "On" state and in effect the Preamplifier stays on), so here is when my curiosity enters.

    Thanks for the effort!
    rip (eac) > convert (flac) > tag (musicbrainz/mp3tag) > normalize (replaygain/foobar2000) > albumart (www/firefox) > transport (winscp) > store (debian) > manage (squeezecenter) > control (ipodtouch/ipeng-app) > play (squeezebox) > preamplify (zpre2) > amplify (zampv3) > listen (axiomm2/sennheiser-hd595) > scrooble (last.fm) > enjoy (me :)

    http://www.last.fm/user/pichonCalavera

  7. #17
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    1,509
    Quote Originally Posted by pichonCalavera View Post
    So returning to my original question, when I select the Shutdown Server option of this plugin, it does shutdown my server, but it doesn't seem to execute the /etc/init.d/squeezecenter stop command (becuase I see the Squeezebox stays in a "On" state and in effect the Preamplifier stays on), so here is when my curiosity enters.
    I still haven't looked at the plugin but I'd be more than disappointed if it does anything else but send the shutdown command the normal way.
    So I guess the behaviour you experience is due to a latent race condition activated by the plugin, such as the squeezecenter server or the network are already gone when your script tries to shut off the squeezebox. (edit: in fact, I've seen the original script make squeezecenter 7.1 die quite systematically; I'd say it looks like bug or rather an incompatibility between the old script and sc7.1)

    Whatever the reason, I think that for a robust process you want to create your own shutdown script, and link it in the /etc/rc0.d and /etc/rc6.d directories (traversed respectively in shutdown and reboot conditions) in order to send your specific squeezebox/amp shutdown commands before squeezecenter or the lan go away.
    Recommended read: Debian admin Guide, init section.

    I'll soon have a clean slate etch box with SC and the plugin, in any case.
    Last edited by epoch1970; 2008-06-23 at 05:53.

  8. #18
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,339
    Quote Originally Posted by pichonCalavera View Post
    So returning to my original question, when I select the Shutdown Server option of this plugin, it does shutdown my server, but it doesn't seem to execute the /etc/init.d/squeezecenter stop command (becuase I see the Squeezebox stays in a "On" state and in effect the Preamplifier stays on), so here is when my curiosity enters.
    Heh! This shortcoming occurred to me a couple of days ago too. I'm working on adding a feature so that all connected clients get turned off at shutdown time. I'll post the new version today or tomorrow (I hope.)

    Would that do the trick for you? I don't use the IRBlaster stuff myself, so I don't know if just turning off the SB3 will send the requisite IR.

    I'm using PeterW's PowerControl plugin to turn off my amps via an x10 command. This "turn off squeezeboxen at shutdown time" feature seems to interact reliably with his plugin so that my amps do get turned off.

    Personally, I'm not sure how a plugin would go about stopping the squeezecenter service. Perhaps there is an API for this. But if the plugin's shutdown routine turns off the connected players, would that be enough?

  9. #19
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    1,509

    SrvPowerControl+SC7.1 install trace under Debian

    Gharris999,
    Attached is my contribution to your fine project. I am glad to say installing is really simple, and furthermore the plugin seems to work very well. I have tested from Softsqueeze 3.5 and a Duet.

    I have one remark, though: when switched in Squeezenetworks.com mode, and the server appropriately dead, my Controller still shows the PowerControl menu under Extras, but it is empty.
    I have high hopes you're considering adding a WOL feature right there ?

    pichonCalavera: The strange behaviour of the original script (killing immediately the server) I referred to in my last message to you was certainly coming from version incompatibility. For me SrvPowerControl works absolutely flawlessly with the current SC7.1, I didn't even need to take a peek at the plugin code.
    Attached Files Attached Files

  10. #20
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,339
    epoch1970: thanks for your Debian instructions. I've included them in the zip file.

    A new version of the plugin is now posted in the message at the head of this thread: http://forums.slimdevices.com/showpo...28&postcount=1

    New features include:

    A warning message now appears on all the attached players when a shutdown/restart/etc. is initiated.

    There is a option (enabled by default) on the plugin's settings page that specifies if all attached players get turned off when shutting down/suspending/hibernating. This feature allows other plugins, like PowerControl or IRBlaster to do their work and turn off attached devices.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •