Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 31
  1. #11
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,515

    Modified for Slimserver 7.0a (trunk)

    Here is Tenwiseman's PowerCtrl plugin modified to work with Slimserver 7. Unzip the file into the server\Slim\Plugin folder. (The files need to end up in server\Slim\Plugin\PowerCtrl)

  2. #12
    Senior Member gharris999's Avatar
    Join Date
    Apr 2005
    Location
    Santa Fe, NM
    Posts
    3,515
    And here is a modification which makes this plugin work with Slimserver 7 on linux. This version is linux only and won't work with Win32.

    Install the contents to /usr/local/slimserver/Plugins/PowerCtrl

    Manually delete the /usr/local/slimserver/Cache/plugin-data.yaml file.

    As root, add the slimserver user to the /etc/shutdown.allow file:
    touch /etc/shutdown
    echo "slimserver" >>/etc/shutdown

    edit the /etc/sudoers file:
    Comment out the line with: Defaults requiretty

    Add:

    %slimserver ALL=NOPASSWD:/sbin/shutdown -h now
    %slimserver ALL=NOPASSWD:/sbin/shutdown -r now

    restart slimserver and voilÓ!
    Last edited by gharris999; 2007-04-10 at 18:27.

  3. #13
    Junior Member tenwiseman's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    12

    I've just popped in!

    Thanks everyone for the feedback, glad to see some folks have found 'Server Power Control' useful and thanks Gordon for the 7.0/Linux update. I've now added it to the wiki plugins list and all cuts to my website.

    --
    Adrian C
    www.adrianonline.net

  4. #14
    Senior Member
    Join Date
    May 2006
    Posts
    116
    Sorry, I must be doing something dim while trying to install this for Linux (Suse 10.0, Slimserver 6.5.1). The files (install.xml, plugin.pm, strings.txt) are now in the /usr/local/slimserver/Plugins/PowerCtrl directory but the server doesn't show the plugin. I can't find the /usr/local/slimserver/Cache/plugin-data.yaml file to delete, whether this affects the server's rescanning of the Plugins directory or not I'm not sure. All other plugins I've added seemed to work OK.

    Thanks in advance for any help.
    Last edited by hellesangel; 2007-05-15 at 04:07.

  5. #15
    Senior Member
    Join Date
    May 2006
    Posts
    116
    Ah, I think I've found an explanation for why this doesn't work... Is there by any chance a big difference between plugins for the not-yet-stable Slimserver 7 and the version I'm using, the current newest stable, 6.5.1 release? And if this plugin is released for 7 it won't work on 6.5.1?

    It's amazing the progress that can be made by carefully reading the instructions...

  6. #16
    Junior Member
    Join Date
    May 2007
    Posts
    6

    Hibernate?

    Hello,
    I'm a newbie after just having purchased a Squeezebox 3 and downloading/running the stable release SlimServer 6.5.2
    I have installed the Server Power Control plugin and it works fine for Shutdown and Restart of my physical server.
    As I am ignorant of plugin coding syntax etc., is there an easy way to add a third option to this plugin of "Hibernate" that hibernates Windows XP e.g. maybe with a call to the Windows command line method of...
    rundll32.exe powrprof.dll,SetSuspendState
    Hope somebody can advise me, JTee.

  7. #17
    Junior Member
    Join Date
    Jun 2007
    Posts
    11

    How to hibernate

    This is the line I use in my shutdown plugin to hibernate my PC. If you combine it with a bit of 'intelligent cut & paste' then you can customise this plugin for yourself.

    my $status = system "rundll32", "PowrProf.dll", "SetSuspendState";

    The power button on your Squeezebox remote will then restart your PC.

    However, when I first wrote this my PC would go back to sleep after a few minutes. I think this is an XP feature when it responds to 'Wake On Lan' and I couldn't find a way to turn it off.

    In the end I modified my plugin to setup a timer that periodically calls SetThreadExecutionState to keep the PC alive. This seemed to fix the problem. The attached plugin shows how I did it (works with Slimserver 6.5.x).
    Last edited by Flipze; 2007-06-02 at 09:28.

  8. #18
    Junior Member
    Join Date
    May 2007
    Posts
    6

    Hibernate now works fine...

    Many thanks - I have literally just tried your plug-in and it does exactly what I wanted anyway - and very slick too. Thanks for the information - a very well commented plug-in so maybe when I have some more time I will try my hand at modification just to learn a bit how these things work :-)

  9. #19
    Junior Member
    Join Date
    Jun 2007
    Posts
    11

    Glad to be of Service

    Quote Originally Posted by JTee View Post
    Many thanks - I have literally just tried your plug-in and it does exactly what I wanted anyway - and very slick too. Thanks for the information - a very well commented plug-in so maybe when I have some more time I will try my hand at modification just to learn a bit how these things work :-)
    Thanks for the compliment :-) - it is the first (and so far only) Perl application I wrote: all it took was someone else's example, a good book and some patience!

  10. #20
    Junior Member
    Join Date
    Jun 2007
    Posts
    19
    I can't seem to get your plugin to work.

    I try and select Windows Shutdown, then Start Shutdonw, but it says "windows shutdown disabled".

    I tried "susped PC" but it bounces back to the Windows Shutdown menu item.

    All I want is a plugin to Hibernate my pc using

    rundll32 powrprof.dll,SetSuspendState

    I have no programming experience, so I am relying on you guys for help!

    Thanks,

    Shaun

Posting Permissions

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