2021-06-22, 18:01
I'm using a service script which 'suspends' all my hardware peripherals after a certain idle time. So after let's say 1 hour of inactivity this script will (by switching relay controlled by gpio) turn off my speaker system, ambilight and monitor and activates the screensaver. Kodi will still be running. Pressing any key on the remote will power up the peripherals again.
I'm figuring out how to close any open 'items' as well so so that when I press a key on the remote, kodi will be in a 'clean' state, showing the default home screen. For example when I walk away while having the file manager window open or a add-on setting dialog or a picture slide show or whatever, then after this idle time when my wife uses the remote I want her to be in the home screen, not in some add-on setting dialog or whatever.
I can use PlayerControl(stop) followed by ActivateWindow(home) but that does not work when the file manager window or a picture or an add-on setting dialog is open. RestartApp (restarting kodi) is not an option since this breaks the service script.
Is there a way to close everything but the home screen?
I'm figuring out how to close any open 'items' as well so so that when I press a key on the remote, kodi will be in a 'clean' state, showing the default home screen. For example when I walk away while having the file manager window open or a add-on setting dialog or a picture slide show or whatever, then after this idle time when my wife uses the remote I want her to be in the home screen, not in some add-on setting dialog or whatever.
I can use PlayerControl(stop) followed by ActivateWindow(home) but that does not work when the file manager window or a picture or an add-on setting dialog is open. RestartApp (restarting kodi) is not an option since this breaks the service script.
Is there a way to close everything but the home screen?