2012-03-01, 15:11
Hi all!
I have sent in a patch today (Ticket #12739) that adds a feature to XBMC :
XBMC will automatically issue a 'wake-on-lan' packet to MySql or FileShare Server right before it needs to contact them (if so configured).
There are different ways of doing this (plugins or os-specific scripts) but non of them have quite solved my needs, therefore this patch.
Hoping it will get accepted for a future build!
Edit : The patch has been merged and should become available from XBMC 13 (Gotham) Alpha 4 (May 2013)
**
Description (updated)
Feature is enabled under "system/settings/system/power saving/try to wake remote servers on access"
When feature gets enabled or shares gets added an autoscan will be done for any servers specified, either in shares or in MySQL settings.
The autoscan will if necessary create a file called 'wakeonlan.xml' and will add entries for these servers including macaddress which should be picked up in the scan.
Sample 'wakeonlan.xml'
netinittimeout [secs]
time xbmc will wait for network to (re)connect when booting or after resuming from suspend-mode
netsettletime [milli secs]
time to wait for network to be consistently connected before progressing
host
ipaddress (or network name) of machine you want to wake up
mac
macaddress
pingport
default 0 which will perform ordinary icmp ping. else a 'connect' attempt will be done to the specified port
pingmode
only applicable if pingport!=0, if 1 will not only connect to pingport but also wait until data is actually read back
timeout [secs]
specifies how long time (default 600) of inactivity must pass before a new 'wake-on-lan' check is performed. a good choice is to use same value as server's idle-timeout before entering sleep-mode
waitonline [secs]
time to wait for machine to wake up (advise is to set this to servers actual anticipated startup time)
waitonline2 [secs]
time to perform extended wait for machine to wake up
waitservices [secs]
additional time to wait after ping response, to allow server daemons to startup
useful pingport/pingmode combinations ;
pingport = 445 / pingmode = 0 - port 445 is used by samba (windows file sharing) and can be used for 'ping-probing' (but only pingmode = 0)
pingport = 3306 / pingmode = 1 - port 3306 is default MySQL port and useful if your server is the MySQL host
port 21 (ftp), 22 (ssl), 23 (telnet) are also likely to work OK if your server has that service installed
when using pingport = 0 (normal icmp ping) it is recommended to use waitservices = (ca) 5 to allow services on server to startup after server responds to ping. if using a different pingport it is normally not nessesary to add additional wait time
I have sent in a patch today (Ticket #12739) that adds a feature to XBMC :
XBMC will automatically issue a 'wake-on-lan' packet to MySql or FileShare Server right before it needs to contact them (if so configured).
There are different ways of doing this (plugins or os-specific scripts) but non of them have quite solved my needs, therefore this patch.
Hoping it will get accepted for a future build!
Edit : The patch has been merged and should become available from XBMC 13 (Gotham) Alpha 4 (May 2013)
**
Description (updated)
Feature is enabled under "system/settings/system/power saving/try to wake remote servers on access"
When feature gets enabled or shares gets added an autoscan will be done for any servers specified, either in shares or in MySQL settings.
The autoscan will if necessary create a file called 'wakeonlan.xml' and will add entries for these servers including macaddress which should be picked up in the scan.
Sample 'wakeonlan.xml'
Code:
<onaccesswakeup>
<netinittimeout>60</netinittimeout>
<netsettletime>500</netsettletime>
<wakeup>
<host>10.0.0.6</host>
<mac>11:11:F2:11:DF:1E</mac>
<pingport>3306</pingport>
<pingmode>1</pingmode>
<timeout>600</timeout>
<waitonline>38</waitonline>
<waitonline2>40</waitonline2>
<waitservices>0</waitservices>
</wakeup>
</onaccesswakeup>
netinittimeout [secs]
time xbmc will wait for network to (re)connect when booting or after resuming from suspend-mode
netsettletime [milli secs]
time to wait for network to be consistently connected before progressing
host
ipaddress (or network name) of machine you want to wake up
mac
macaddress
pingport
default 0 which will perform ordinary icmp ping. else a 'connect' attempt will be done to the specified port
pingmode
only applicable if pingport!=0, if 1 will not only connect to pingport but also wait until data is actually read back
timeout [secs]
specifies how long time (default 600) of inactivity must pass before a new 'wake-on-lan' check is performed. a good choice is to use same value as server's idle-timeout before entering sleep-mode
waitonline [secs]
time to wait for machine to wake up (advise is to set this to servers actual anticipated startup time)
waitonline2 [secs]
time to perform extended wait for machine to wake up
waitservices [secs]
additional time to wait after ping response, to allow server daemons to startup
useful pingport/pingmode combinations ;
pingport = 445 / pingmode = 0 - port 445 is used by samba (windows file sharing) and can be used for 'ping-probing' (but only pingmode = 0)
pingport = 3306 / pingmode = 1 - port 3306 is default MySQL port and useful if your server is the MySQL host
port 21 (ftp), 22 (ssl), 23 (telnet) are also likely to work OK if your server has that service installed
when using pingport = 0 (normal icmp ping) it is recommended to use waitservices = (ca) 5 to allow services on server to startup after server responds to ping. if using a different pingport it is normally not nessesary to add additional wait time