Detect Screensaver Status
#1
I've got an Python script and would like to detect when de XBMC Screensaver is active
I am running XBMCbuntu "Eden 11.0"

Does anyone have a simple python routine to check the screensaver state ?

I found this list of Boolean conditions: Boolean Conditions

I tried this code:
while (not xbmc.abortRequested) :
if xbmc.System().ScreenSaverActive() :
...< do something > ....


But resulted in an error:
ERROR: Traceback (most recent call last):
File "/home/xbmc/screensaverstate.py", line 14, in <module>
print xbmc.System().ScreenSaverActive()
AttributeError: 'module' object has no attribute 'System'


Found a workaroud:

Get TimeOut setting
screensavertime = xbmc.executehttpapi( "GetGUISetting(0;screensaver.time)" ).replace( "<li>", "" )

Get Idle Time
it = xbmc.getGlobalIdleTime()
Reply
#2
You can check boolean conditions with:
Code:
xbmc.getCondVisibility("System.ScreenSaverActive")

cheers,
asde
Reply
#3
(2012-06-24, 15:38)AddonScriptorDE Wrote: You can check boolean conditions with:
Code:
xbmc.getCondVisibility("System.ScreenSaverActive")

cheers,
asde

It's working like a charm !
I've been (unsuccesfully) searching for many hours ...
Thanks ! Rofl

Next i want to change the contents of an unused infolabel (e.g. Weather.Conditions or AudioScrobbler.ConnectState)
or create a new one to display a string info on my LCD screen.
Any suggestions on this ?
Reply

Logout Mark Read Team Forum Stats Members Help
Detect Screensaver Status 0