[Solved] Auto Wake Up SQL Database on Startup (Gotham)
#1
I'm trying to use the new feature in an OpenELEC gotham build that will wake up my NAS (which has mysql database) when the PC starts up. I'm running the haswell i3 NUC and setup the options in the settings menu. I see the following in the xbmc.log file. How can i tell if/when a packet is attempted to get sent?

Code:
18:47:19 T:140564139595584  NOTICE: WakeOnAccess - Load settings :
18:47:19 T:140564139595584  NOTICE:   -Network init timeout : [20] sec
18:47:19 T:140564139595584  NOTICE:   -Network settle time  : [500] ms
18:47:19 T:140564139595584  NOTICE:   Registering wakeup entry:
18:47:19 T:140564139595584  NOTICE:     HostName        : NAS-PC
18:47:19 T:140564139595584  NOTICE:     MacAddress      : **:**:**:**:ED
18:47:19 T:140564139595584  NOTICE:     PingPort        : 0
18:47:19 T:140564139595584  NOTICE:     PingMode        : 0
18:47:19 T:140564139595584  NOTICE:     Timeout         : 300 (sec)
18:47:19 T:140564139595584  NOTICE:     WaitForOnline   : 40 (sec)
18:47:19 T:140564139595584  NOTICE:     WaitForOnlineEx : 40 (sec)
18:47:19 T:140564139595584  NOTICE:     WaitForServices : 5 (sec)

But the box never wakes up. I know WOL works as I can get the box to wake up with the Advanced WOL addon.

XBMC Info
Code:
18:47:18 T:140564139595584  NOTICE: Starting XBMC (13.0-ALPHA12 Git:910ac62). Platform: x86 Linux 64-bit
18:47:18 T:140564139595584  NOTICE: Using Release XBMC x64 build, compiled Jan 23 2014 by GCC 4.7.3 for x86 Linux 64-bit 3.13.0
18:47:18 T:140564139595584  NOTICE: Running on Linux 64-bit (OpenELEC (official) - Version: devel-20140123155120-r17126-gceb58b6, 3.13.0 x86_64)
18:47:18 T:140564139595584  NOTICE: Host CPU: Intel(R) Core(TM) i3-4010U CPU @ 1.70GHz, 4 cores available

Code:
IntelNUC:~/.xbmc/userdata # cat wakeonlan.xml
<onaccesswakeup>
    <netinittimeout>20</netinittimeout>
    <netsettletime>500</netsettletime>
    <wakeup>
        <host>NAS-PC</host>
        <mac>**:**:**:**::ED</mac>
        <pingport>0</pingport>
        <pingmode>0</pingmode>
        <timeout>300</timeout>
        <waitonline>40</waitonline>
        <waitonline2>40</waitonline2>
        <waitservices>5</waitservices>
    </wakeup>
</onaccesswakeup>
Motherboard P5N7A-VM, E8400 C2D 3.0 processor. NVIDIA 9300 graphics card. OpenELEC Stable - Generic x86_64 Version:3.2.4
Reply
#2
I think i figured out why. XBMC was smart enough to generate a wakeonlan.xml file once this options was first turned on. I on the other hand though i would outsmart the automatic configuration and modify it to customize for my needs. When xbmc first generated the file it looked something like this:

Code:
<onaccesswakeup>
    <netinittimeout>20</netinittimeout>
    <netsettletime>500</netsettletime>
    <wakeup>
        <host>XPS-420</host>
        <mac>**:**:**:**::BC</mac>
        <pingport>0</pingport>
        <pingmode>0</pingmode>
        <timeout>600</timeout>
        <waitonline>40</waitonline>
        <waitonline2>30</waitonline2>
        <waitservices>5</waitservices>
    </wakeup>
    <wakeup>
        <host>NAS-PC</host>
        <mac>**:**:**:**:ED</mac>
        <pingport>0</pingport>
        <pingmode>0</pingmode>
        <timeout>600</timeout>
        <waitonline>30</waitonline>
        <waitonline2>30</waitonline2>
        <waitservices>5</waitservices>
    </wakeup>
    <wakeup>
        <host>192.168.1.117</host>
        <mac>**:**:**:**:ED</mac>
        <pingport>0</pingport>
        <pingmode>0</pingmode>
        <timeout>600</timeout>
        <waitonline>30</waitonline>
        <waitonline2>30</waitonline2>
        <waitservices>5</waitservices>
    </wakeup>
</onaccesswakeup>

I only wanted it to wakeup my PC by using the network name NAS-PC so i removed all the entries except that one. XBMC never woke anything up. The reason this never happened is because my advancedsettings.xml refers to the ip address of this box instead of the the network name for the sql database. Because of this, XBMC will try and wakeup only using that entry. Now when i try to access my network shares in say Video->Files, then XBMC will use the network name of that PC. So my problem was that I removed the IP address entry and left only the network named entry. Once i restored this file, everything is working as expected. Now just trying to tweak the timers.
Motherboard P5N7A-VM, E8400 C2D 3.0 processor. NVIDIA 9300 graphics card. OpenELEC Stable - Generic x86_64 Version:3.2.4
Reply
#3
general rule with such thing: always try with defaults first. If that works, you can fine tune
Reply

Logout Mark Read Team Forum Stats Members Help
[Solved] Auto Wake Up SQL Database on Startup (Gotham)0