2020-04-20, 12:09
I would like to notify Home Assistant based when the screensaver is activated and deactived.
So first I would like to write an addon that just log when the service addon notice that this has happend.
After looking at:
https://kodi.wiki/view/Service_add-ons
https://alwinesch.github.io/group__pytho...bd7e0ec797
I thought this would work, but only the service log is shown in the log. What am I missing?
So first I would like to write an addon that just log when the service addon notice that this has happend.
After looking at:
https://kodi.wiki/view/Service_add-ons
https://alwinesch.github.io/group__pytho...bd7e0ec797
I thought this would work, but only the service log is shown in the log. What am I missing?
python:
import time
import xbmc
if __name__ == '__main__':
monitor = xbmc.Monitor()
xbmc.log("screenserver service", level=xbmc.LOGNOTICE)
while not monitor.abortRequested():
if monitor.onScreensaverActivated():
xbmc.log("onScreensaverActivated", level=xbmc.LOGNOTICE)
if monitor.onScreensaverDeactivated():
xbmc.log("onScreensaverDeactivated", level=xbmc.LOGNOTICE)