(2015-08-01 15:24)graff1337 Wrote: The Steam Launcher addon really rocks, it works really well and I love my HTPC a lot more thanks to Steam Launcher.
Unfortunately I have some configuration preferences interfering with each other:
- Steam Launcher is configured to minimize Kodi, because to quit Kodi would turn off the TV (CEC).
- Kodi is configured to shutdown after 30mins of idle. Therefore after 30mins ingame, Kodi triggers the shutdown and the machine turns off.
I thought this could be worked around by running a pre- and post-steam script (disable the idle-shutdown before Steam, and enable it post Steam).
The List of built-in functions shows InhibitIdleShutdown(true/false) and AllowIdleShutdown could fit this purpose.
But to me it looks like these functions are not accessible from the JSON-RPC API. There is a namespace Settings (Allows manipulation of Kodi settings), but I can't see any methods listed.
Any idea how I can execute these built-in functions from a pre-/post-steam script?
Is there maybe a better way I can keep the idle-shutdown enabled and still run Steam longer than the idle-shutdown time?
Hi, i looked into it... i couldnt figure out all that json-rpc whack. But long story short i ended up adding 4 lines to the defauls.py located at
Starting at line 347
log('attempting to launch: %s' % cmd)
if suspendAudio == 'true':
xbmc.executebuiltin('notification(Idle shutdown, Inhibited)', True)
if quitKodiSetting == '1' and suspendAudio == 'true':
proc_h = subprocess.Popen(cmd.encode(txt_encode), shell=True, close_fds=False)
log('Waiting for Steam to exit')
while proc_h.returncode is None:
log('Start resuming audio....')
xbmc.executebuiltin('notification(Idle shutdown, Uninhibited)', True)
I also added a notification that tells you when it turns on/off
hope that helps
BTW. sorry if i did anything wrong, as im new to coding anything in python.