2014-09-24, 00:31
Hi,
I recently set up my windows xbmc/kodi machine to automatically wake from sleep when I select it as the airplay output on any of my apple devices (iphone, ipad etc). Now the HTPC can save energy by sleeping when idle but it remains available as an Airplay target, waking up when needed. Most of the info out there seems to suggest that the Bonjour Sleep Proxy technology behind this feature only works with macs so I thought I'd share how I did this.
Now any Bonjour advertised service running on the PC when it goes to sleep (e.g airplay from kodi, itunes server) will continue to be advertised on the network by the sleep proxy server. Any attempt to connect to one of those services will cause the sleep proxy to wake up the host computer via wake on lan.
Your mileage may vary - it's not totally seamless with my HTPC as it doesn't wake up quickly enough. I usually have to select it as the airplay target twice, once to wake it up (which then times out) and again to actually get the music or video playing. Still much better than messing around with a separate wake on lan app, especially for technophobe family members.
With wake on demand switched on the sleeping computer will wake every couple of hours for a few moments to refresh the network status and let the sleep proxy server know it's still available.
There is also a project to create a Sleep proxy client for linux here.
In theory any machine running Apple's open source Bonjour mDNSresponder service should be able to act as a sleep proxy server but I haven't yet really investigated this. It would be cool to get a linux version running so open source router firmware such as dd-wrt could act as a sleep proxy but I'm not aware of anyone who has done this yet.
I recently set up my windows xbmc/kodi machine to automatically wake from sleep when I select it as the airplay output on any of my apple devices (iphone, ipad etc). Now the HTPC can save energy by sleeping when idle but it remains available as an Airplay target, waking up when needed. Most of the info out there seems to suggest that the Bonjour Sleep Proxy technology behind this feature only works with macs so I thought I'd share how I did this.
- Your kodi machine must be capable of Wake on LAN and have the feature enabled in the BIOS. I've only tested this with a wired ethernet connection. It probably won't work for wifi networked boxes as Wireless wake on LAN requires both motherboard support and a WiFi adapter that supports the WMM (wireless multimedia) extensions. Recent apple laptops & desktops support wireless wake but it's pretty rare on other PCs.
- You need a networked apple device that is always switched on and connected to the network to act as the sleep proxy server, an airport express or extreme, apple tv, time capsule, even an apple desktop will work (with some additional configuration) - though you're obviously best off with one of the low power devices if saving energy is the goal.
- Download and install the Bonjour SDK for windows. The standard Bonjour for windows does not include the Bonjour control panel applet that lets you enable wake on demand. To download the SDK you have to sign up as an apple developer.
- Open the Bonjour control panel applet and activate "Enable Wake on Demand".
Now any Bonjour advertised service running on the PC when it goes to sleep (e.g airplay from kodi, itunes server) will continue to be advertised on the network by the sleep proxy server. Any attempt to connect to one of those services will cause the sleep proxy to wake up the host computer via wake on lan.
Your mileage may vary - it's not totally seamless with my HTPC as it doesn't wake up quickly enough. I usually have to select it as the airplay target twice, once to wake it up (which then times out) and again to actually get the music or video playing. Still much better than messing around with a separate wake on lan app, especially for technophobe family members.
With wake on demand switched on the sleeping computer will wake every couple of hours for a few moments to refresh the network status and let the sleep proxy server know it's still available.
There is also a project to create a Sleep proxy client for linux here.
In theory any machine running Apple's open source Bonjour mDNSresponder service should be able to act as a sleep proxy server but I haven't yet really investigated this. It would be cool to get a linux version running so open source router firmware such as dd-wrt could act as a sleep proxy but I'm not aware of anyone who has done this yet.