epoch1970;340901 Wrote: > I would love to be able to query your plugin and get either an activity > status for the components (squeezecenter, squeezeboxen) or a more > synthetic active/idle indicator. I would love to be able to use your > plugin's magic on suspend/shutdown/switch to SN (is there any other way > to keep the clock to display, BTW ?) and maybe programmed alarms, if it > can delegate the actual power actions (through idle status, red pill or > blue pill ...) to that reboot-happy watchdog of mine. > What do you think ?
I really think that SqueezeCenter's CLI mechanism currently provides all this and more. Trying to make SrvrPowerCtrl a conduit for this kind of info would simply be reinventing an already extant wheel, imho. I would suggest taking a look at Max Spicer's shutdown.pl for an example of how to query SqueezeCenter via the CLI to get playback status on all connected players from a perl script: http://www.thespicers.net/shutdown.pl Max's script is intended to be run via a cron job, but there isn't any reason you couldn't incorporate his method into your monitoring script. You can always initiate a SrvrPowerCtrl action from your script, again via the CLI...e.g. to switch a particular player to SN and shutdown the server from your perl script external to SC, adapt Max's code and send: Code: -------------------- sendAndReceive("srvrpowerctrl shutdown2SN Switching_to_SqueezeNetork $playerIds[$i]"); -------------------- ..or some such. -- 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 [email protected] http://lists.slimdevices.com/lists/listinfo/plugins
