Philip Meyer;437251 Wrote: > Your plugin covers all bases, I believe, when I am using a SB3 in the > bedroom and want to suspend and wake up server in the morning. > > However, I often suspend the server by pressing a Suspend key on my > keyboard (or hibernate via Start > Turn Off Computer or using > WakeOnStandby Tasktray icon > Perform Now > Hibernate). Pressing > suspend key is also convenient for my wife. > > It would be useful if this also sent all players to SN and switched > back on resume, such that the players continue to show a clock, internet > radio is available on demand, etc. I've got some other fish to fry first, but perhaps I can start work on a windows power management helper app next month. Let's call it "SCPMMonitor.exe" for now.
Give me some ideas as to what you think it ought to be able to do. At the vary least, I think it ought to: ..on recipt of a particular system power management message, send a user configurable CLI request. I'll need to do some research in terms of what sort of system messages it ought to monitor. But at first glance, the two easiest system messages to intercept and interpret will be WM_QUERYENDSESSION (system shutting down) and WM_POWERBROADCAST, wParam == PBT_APMSUSPEND (system sleeping or hibernating). I'll make the first version very bare bones: no UI...just a INI file that you can hand configure...something along the lines of: Code: -------------------- #SCPMMonitor.ini [SCPMMonitor] CLIip=127.0.0.1 CLIport=9090 SHUTDOWN=srvrpowerctrl gotosn SLEEP=srvrpowerctrl gotosn -------------------- The app won't have any user interface at all. Once run, it will just sit there in the background, listening for those windows messages. When it hears one, it will fire off a CLI request with whatever it finds in the INI file. So, if you don't want to use SrvrPowerCtrl and only have one player, the INI could be: Code: -------------------- #SCPMMonitor.ini [SCPMMonitor] CLIip=127.0.0.1 CLIport=9090 SHUTDOWN=00:04:20:10:0a:0b connect www.squeezenetwork.com SLEEP=00:04:20:10:0a:0b connect www.squeezenetwork.com -------------------- The practical upshot of this would be that anytime the system begins to transition into shutdown or into sleep, SCPMMonitor.exe would send a CLI request. That CLI request will be completely configurable by the user simply by editing the INI with notepad. My question to you is: are there any other system events that you can think of that make sense to monitor? E.G.: logon, logoff? Those events could be used to send srvrpowerctrl setblock and clearblock requests so that, anytime someone is actively logged on the system, srvrpowerctrl is blocked and thus won't suspend the system on idle. Once the user logs off, srvrpowerctrl gets permission to suspend on idle player timeout once again. This would duplicate the facility SrvrPowerCtrl has now on OSX. Your thoughts? -- 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