Sunday, January 13, 2008

Does your Media Center sleep through the night?

Mine does, but initially not the way I wanted it to.. so:

You'll all know that you can set the power management settings in Vista, and MCE2005 to Sleep/Hibernate your MCE PC when it's not being used, but this doesnt take account of 'fixed time events', like when you go to bed at night for example, and doesnt ensure that the MCE machine is 'awake' when you want it to be - like when you sit down to watch TV in the evening - of course if you have the right type of BIOS and motherboard you can wake it with the MCE remote..

Enter 'SleepTool' , another VB app, that this time is based on an excellent code sample from
coder iPrank on (post is here).

I've added a few lines of code to make it accept command line parameters, but essentially it's all his work - nicely done.
So, I now have a scheduled task on the PC at the time I go to bed in the evening that says:

SleepTool sleep 17:30

This sleeps the PC immediatley (unless it's recording!) and wakes it up ready for me when I sit down to watch TV in the evening. (If the machine is recording or playing the sleep request is over-ridden by MCE and the request has no effect)

You can also tell the machine to 'hibernate' by swapping 'sleep' on the command line for 'hibernate', and use a relative time from the sleep point - so

SleepTool Hibernate 300

will hibernate the PC for 5 hours from 'now'.

Hope this is of use to someone 8-)

A Little Home-Automation side-note. Our Domia Lite controller has had a firmware upgrade, and sadly has lost the ability for me to 'sniff' the events on the controller from it's local web-server. I currently have another nasty VB app called PingAction.exe (source/binary here if you want it), that I use on a scheduled event every 10 minutes - this pings the IP of my Slim Squeezebox and uses this to 'deduce' if I've gone to bed for the night or not (I turn off the Slim with the ByeBye Standby 'green switch' (See earlier blog post) - this is a very nasty crude way of 'telling' if I'm no longer wanting media center to be on - and the application then invokes the SleepTool to put it to sleep.

Domia (if you're reading) - this is plea for some public API's to your excellent web-based HA system and/or the controller itself- its great , but I'd love to be able to actually integrate some other software with it - currently I cant work out any other way! -- am I missing something?


No comments: