mrw;593856 Wrote: 
> Yes. :)
> 
> That would be the way I'd go, if I knew how.
> 
> 
> 
> 
> I think it could be done with a small amount of some script or other,
> no telnet.
> 
> Expect itself will allow us to make direct use use of socket in the
> underlying Tcl, rather than telnet. It also has a built in timeout.
> So I'll try and have a look at it over the next week, while the script
> and Expect remain fresh in my mind.
> 
> Just to confirm that I understand your proposal, if I am working from
> the keyboard I would get into the CLI and then type:
> 
> reallypreventstandby isidle
> 
> To which the server would respond:
> 
> a) With plug-in installed
> 
> Either:
> 
> reallypreventstandby isidle 0
> 
> or:
> 
> reallypreventstandby isidle 1
> 
> b) Without plug-in installed
> 
> reallypreventstandby isidle
> 
> I checked that last one.
Yes, exactly.  I've updated ReallyPreventStandby with the proposed CLI
code.

You can experiment with it by adding
http://srvrpowerctrl.googlecode.com/svn/beta.xml to the "Additional
Repositories" on the SBS Settings->Plugins page.  Then install
ReallyPreventStandby BETA.  Or, alternately, directly download the beta
version from
http://srvrpowerctrl.googlecode.com/svn/ReallyPreventStandby_beta.zip
and manually install the plugin.

On OSX, go into the ReallyPreventStandby settings page and put in some
kind of innocuous command for the "Inhibit standby command"..something
like "ls -l".  That will keep the plugin from doing anything other than
keeping track of whether or not SBS is really idle.  Then you can test
with the:

reallypreventstandby isidle

..cli request.  While you're testing, you can edit the
ReallyPreventStandby/Plugin.pm file and change the INTERVAL value on
line 58 to a smaller number, say 2.  That way, rather than taking 20
minutes (60*20) to go from not-idle to idle, it will go to idle in 2*20
seconds.

I'm working on an OSX sleep-inhibit app that can be called directly
from the plugin.  We'll see what progress I make towards that and if I
can make it so it doesn't share the same defects as jiggler &
caffeine...i.e. keeps the monitor on when it doesn't need to be.

On linux with gnome, ReallyPreventStandby calls gsession-inhibit, a
small utility that I wrote that should prevent sleep.  The C source
code is included with the plugin.  To use this app, you'll need to run
the
/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/ReallyPreventStandby/bin/unix/debian-install.sh
script.  All that script does is update the /etc/sudoers file so that
the squeezeboxserver user has permission to execute gsession-inhibit
under the currently loged in gnome user via sudo -u username.

Finally, mrw, you might want to look at modifying your SleepWatcher
script so that it also does a CLI call to SrvrPowerCtrl.  I've added a
new CLI request to that plugin too.  Calling:

srvrpowerctrl setwakealarm

..will cause SrvrPowerCtrl to schedule a system wakeup in order to
service any pending alarms.  If your SleepWatcher script determines
that the system SHOULD sleep, then it could call srvrpowerctrl
setwakealarm to force SrvrPowerCtrl to schedule the next wakeup.


-- 
gharris999
------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=48521

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to