jhsrennie Wrote:When you're trying to work out what's going wrong the first step is always to enable debug logging then look at xbmc.log to see if there are any clues.
Also you're doing things the hard way. The autoexec.py just needs to contain:
Code:
import xbmc
xbmc.executebuiltin("WakeOnLan(00-13-72-26-4d-cf)")
I've put in the MAC address of the PC I tested the script on. Obviously replace this with your own MAC address.
JR
thanks for another tip,
but still not working, below my debug logs
Code:
19:59:20 T:5236 M:2161758208 DEBUG: CRemoteControl::Connect - connecting to: 127.0.0.1:24000 ...
19:59:21 T:5236 M:2167185408 ERROR: CRemoteControl::Connect - failed to connect
19:59:22 T:1500 M:2167332864 ERROR: Unable to open database: xbmc_video [2003](Can't connect to MySQL server on '192.168.2.3' (10060))
19:59:22 T:1500 M:2167332864 ERROR: Unable to open database at host: 192.168.2.3 db: xbmc_video (old version?)
19:59:24 T:5236 M:2167246848 DEBUG: CRemoteControl::Connect - connecting to: ::1:24000 ...
19:59:25 T:5236 M:2167373824 DEBUG: CRemoteControl::Connect - connecting to: 127.0.0.1:24000 ...
19:59:26 T:5236 M:2167390208 ERROR: CRemoteControl::Connect - failed to connect
19:59:29 T:5236 M:2167382016 DEBUG: CRemoteControl::Connect - connecting to: ::1:24000 ...
19:59:30 T:5236 M:2167402496 DEBUG: CRemoteControl::Connect - connecting to: 127.0.0.1:24000 ...
19:59:31 T:5236 M:2167148544 ERROR: CRemoteControl::Connect - failed to connect
19:59:34 T:5236 M:2167238656 DEBUG: CRemoteControl::Connect - connecting to: ::1:24000 ...
19:59:35 T:5236 M:2167218176 DEBUG: CRemoteControl::Connect - connecting to: 127.0.0.1:24000 ...
19:59:36 T:5236 M:2167496704 ERROR: CRemoteControl::Connect - failed to connect
19:59:39 T:5236 M:2167742464 DEBUG: CRemoteControl::Connect - connecting to: ::1:24000 ...
19:59:40 T:5236 M:2167758848 DEBUG: CRemoteControl::Connect - connecting to: 127.0.0.1:24000 ...
19:59:41 T:5236 M:2167934976 ERROR: CRemoteControl::Connect - failed to connect
19:59:43 T:1500 M:2166685696 ERROR: Unable to open database: xbmc_music [2003](Can't connect to MySQL server on '192.168.2.3' (10060))
19:59:43 T:1500 M:2166685696 ERROR: Unable to open database at host: 192.168.2.3 db: xbmc_music (old version?)
19:59:44 T:5236 M:2166157312 DEBUG: CRemoteControl::Connect - connecting to: ::1:24000 ...
19:59:45 T:5236 M:2166730752 DEBUG: CRemoteControl::Connect - connecting to: 127.0.0.1:24000 ...
19:59:46 T:5236 M:2166747136 ERROR: CRemoteControl::Connect - failed to connect
19:59:49 T:5236 M:2167652352 DEBUG: CRemoteControl::Connect - connecting to: ::1:24000 ...
19:59:50 T:5236 M:2167644160 DEBUG: CRemoteControl::Connect - connecting to: 127.0.0.1:24000 ...
19:59:51 T:5236 M:2167652352 ERROR: CRemoteControl::Connect - failed to connect
WakeOnLan - Magic packet from autoexec.py has been send after I turn on
manually my Asrock (with MySQL database)
Code:
19:59:53 T:1500 M:2166919168 INFO: Loading user windows, path C:\Users\Mario\AppData\Roaming\XBMC\addons\skin.customizableconfluence\720p
19:59:53 T:1500 M:2166222848 DEBUG: Load Skin XML: 72304.43ms
19:59:53 T:1500 M:2166222848 INFO: initialize new skin...
19:59:53 T:1500 M:2166222848 INFO: Loading skin file: Pointer.xml
19:59:53 T:1500 M:2166099968 INFO: Loading skin file: DialogVolumeBar.xml
19:59:53 T:1500 M:2166079488 INFO: Loading skin file: DialogSeekBar.xml
19:59:53 T:1500 M:2166165504 INFO: Loading skin file: DialogKaiToast.xml
19:59:53 T:1500 M:2166161408 INFO: Loading skin file: DialogMuteBug.xml
19:59:53 T:1500 M:2166124544 DEBUG: CGUIAudioManager::Initialize
19:59:53 T:1500 M:2166120448 DEBUG: CAudioContext::SetActiveDevice - SetActiveDevice from 1 to 2
19:59:53 T:1500 M:2166120448 DEBUG: CAudioContext::RemoveActiveDevice - Removing device 1
19:59:53 T:1500 M:2165776384 DEBUG: CWDSound::direct_sound_enumerator_member_callback - found Device: Primary Sound Driver
19:59:53 T:1500 M:2165776384 DEBUG: CWDSound::direct_sound_enumerator_member_callback - found Device: Speakers (High Definition Audio Device)
19:59:53 T:1500 M:2165776384 DEBUG: CWDSound::direct_sound_enumerator_member_callback - found Device: Digital Audio (S/PDIF) (High Definition Audio Device)
19:59:53 T:1500 M:2165776384 DEBUG: CAudioContext::SetActiveDevice - (default playback device).
19:59:53 T:1500 M:2165563392 INFO: Loading C:\Users\Mario\AppData\Roaming\XBMC\addons\skin.customizableconfluence\sounds\sounds.xml
19:59:53 T:1500 M:2165559296 INFO: skin loaded...
19:59:53 T:1500 M:2165559296 DEBUG: Activating window ID: 12999
19:59:53 T:1500 M:2165555200 DEBUG: Checking if window ID 12999 is locked.
19:59:53 T:1500 M:2165555200 DEBUG: ------ Window Init (Startup.xml) ------
19:59:53 T:1500 M:2165555200 INFO: Loading skin file: Startup.xml
19:59:53 T:1500 M:2165547008 INFO: removing tempfiles
19:59:53 T:1500 M:2165542912 DEBUG: ADDON: Starting service addons.
19:59:53 T:1500 M:2165542912 NOTICE: initialize done
19:59:53 T:1500 M:2165542912 NOTICE: Running the application...
19:59:53 T:1500 M:2165534720 DEBUG: CApplication::ExecuteXBMCAction : Translating SetFocus(10)
19:59:53 T:1500 M:2165534720 DEBUG: CApplication::ExecuteXBMCAction : To SetFocus(10)
19:59:53 T:1500 M:2165522432 INFO: initializing python engine.
19:59:53 T:1500 M:2165522432 DEBUG: Win32DllLoader::Load(special://xbmcbin/system/python/python24.dll)
19:59:53 T:1500 M:2164027392 DEBUG: new python thread created. id=1
19:59:53 T:1500 M:2164019200 DEBUG: CNetwork::NetworkMessage - Starting network services
19:59:53 T:1500 M:2164011008 NOTICE: ES: Starting event server
19:59:53 T:6072 M:2164006912 DEBUG: thread start, auto delete: 0
19:59:53 T:6072 M:2164006912 DEBUG: Python thread: start processing
19:59:53 T:1500 M:2163998720 INFO: JSONRPC Server: Successfully initialized
19:59:53 T:1500 M:2163978240 DEBUG: CLastfmScrobbler: Clearing session.
19:59:53 T:1500 M:2163978240 DEBUG: CLibrefmScrobbler: Clearing session.
19:59:53 T:3564 M:2163970048 DEBUG: thread start, auto delete: 0
19:59:53 T:3564 M:2163970048 NOTICE: ES: Starting UDP Event server on 0.0.0.0:9777
19:59:53 T:3564 M:2163965952 NOTICE: UDP: Listening on port 9777
19:59:53 T:1500 M:2165309440 WARNING: CRenderSystemDX::BuildPresentParameters - xbmc compiled with an d3d sdk not supporting D3DSWAPEFFECT_FLIPEX
19:59:53 T:6956 M:2164617216 DEBUG: thread start, auto delete: 0
19:59:53 T:6072 M:2164609024 NOTICE: -->Python Interpreter Initialized<--
19:59:53 T:6072 M:2164609024 DEBUG: XBPyThread::Process - The source file to load is C:\Users\Mario\AppData\Roaming\XBMC\userdata\autoexec.py
19:59:53 T:6072 M:2164604928 DEBUG: XBPyThread::Process - Setting the Python path to C:\Users\Mario\AppData\Roaming\XBMC\userdata;C:\Users\Mario\AppData\Roaming\XBMC\addons\script.module.simplejson\lib;C:\Users\Mario\AppData\Roaming\XBMC\addons\script.module.beautifulsoup\lib;C:\Program Files (x86)\XBMC\addons\script.module.pil\lib;C:\Users\Mario\AppData\Roaming\XBMC\addons\script.module.elementtree\lib;C:\Program Files (x86)\XBMC\addons\script.module.pysqlite\lib;C:\Program Files (x86)\XBMC\system\python\DLLs;C:\Program Files (x86)\XBMC\system\python\Lib;special://xbmcbin/system/python/python24.zip;C:\Program Files (x86)\XBMC\system\python\DLLs;C:\Program Files (x86)\XBMC\system\python\lib;C:\Program Files (x86)\XBMC\system\python\lib\plat-win;C:\Program Files (x86)\XBMC\system\python\lib\lib-tk;C:\Program Files (x86)\XBMC
19:59:53 T:6072 M:2164604928 DEBUG: XBPyThread::Process - Entering source directory C:\Users\Mario\AppData\Roaming\XBMC\userdata
19:59:53 T:6780 M:2163982336 DEBUG: thread start, auto delete: 1
19:59:53 T:1500 M:2156740608 DEBUG: CApplication::ExecuteXBMCAction : Translating ReplaceWindow(Home)
19:59:53 T:1500 M:2156740608 DEBUG: CApplication::ExecuteXBMCAction : To ReplaceWindow(Home)
19:59:53 T:1500 M:2156740608 DEBUG: Activating window ID: 10000
19:59:53 T:1500 M:2156740608 DEBUG: Checking if window ID 10000 is locked.
19:59:53 T:1500 M:2156740608 DEBUG: ------ Window Deinit (Startup.xml) ------
19:59:53 T:1500 M:2156740608 DEBUG: ------ Window Init (Home.xml) ------
19:59:53 T:3944 M:2155458560 DEBUG: thread start, auto delete: 1
19:59:53 T:3944 M:2155446272 INFO: WEATHER: Downloading weather
19:59:53 T:3944 M:2155433984 DEBUG: Win32DllLoader::Load(special://xbmcbin/system/libcurl.dll)
19:59:53 T:3944 M:2155175936 DEBUG: Win32DllLoader::Load(special://xbmcbin/system/libidn-11.dll)
19:59:53 T:3944 M:2155171840 DEBUG: Win32DllLoader::Load(special://xbmcbin/system/libeay32.dll)
19:59:53 T:3944 M:2155089920 DEBUG: Win32DllLoader::Load(special://xbmcbin/system/libssl32.dll)
19:59:53 T:3944 M:2154201088 DEBUG: Win32DllLoader::Load(ADVAPI32.DLL)
19:59:53 T:3944 M:2154192896 DEBUG: Win32DllLoader::Load(KERNEL32.DLL)
19:59:53 T:3944 M:2154184704 DEBUG: Win32DllLoader::Load(NETAPI32.DLL)
19:59:53 T:3944 M:2154024960 DEBUG: FreeLibrary(NETAPI32.DLL) -> 07145C90
19:59:53 T:3944 M:2154024960 DEBUG: Win32DllLoader::Unload NETAPI32.DLL
[b]19:59:53 T:1500 M:2153938944 INFO: CNetwork::WakeOnLan - Magic packet send to 'e0-cb-4e-65-21-8d'[/b]
19:59:53 T:4172 M:2153476096 DEBUG: thread start, auto delete: 1
My
auteoxec.py file content:
Code:
import time, os
import xbmc
xbmc.executebuiltin("WakeOnLan(e0-cb-4e-65-21-8d)")
time.sleep(5)
xbmc.executebuiltin("XBMC.RunScript(%s/default.py,-startup)" % ( os.path.join( os.getcwd(), "../addons/script.autoupdate/" )))
maybe you know how to send WOL packet, before XBMC will try to connect with database ?