2018-04-09, 19:13
I need a plugin that executes after specific amount of time specified within plugin configuration, after screensaver activated.
Also requires another external command to be executed after screensaver deactivated.
e.g
Also requires another external command to be executed after screensaver deactivated.
e.g
python:def onScreensaverActivated( self ):
self.screensaver_active = True
# sleep for 7 minutes after 3 minutes Dim screensaver kicked in
xbmc.sleep(420000)
# check to see if screensaver is still active, and not deactivated since
if xbmc.getCondVisibility("System.ScreenSaverActive") and self.screensaver_active:
# execute external command, to switch off screen
execute.external.command("vcgencmd display_power 0")
def onScreensaverDeactivated( self ):
self.screensaver_active = False
# execute external command, to switch screen on
execute.external.command("vcgencmd display_power 1")