So the prelude to my question is what my script is for. I have a home automation door bell hooked up to notify me when someone rings the doorbell. I then have an ip Camera take some photos of who it is.
When someone rings the bell, this script I wrote gets invoked. The script simply enough grabs the image from the camera and displays it on the screen.
I'm looking for two pieces of functionality:
1) I need to somehow loop sleep every second and essentially refresh the image on the screen. The image location gets refreshed on its own independent of this script. So I just need to keep loading that image and redrawing it on screen to get an animation or "video" from the camera.
2) I somehow need to exit the script after a timeout. As in I want this script to exit on it's own with no user interaction.
So all in all, including the existing functionality the script should behave is follows.
1) Invoke script and display image when someone rings bell (done)
2) Every second refresh that image
3) After 10 seconds exit the script, taking me back to whatever was on screen before, such as video, homescreen, etc.
Could someone please help me, it'd be much appreciated. Thanks.
# Import the XBMC/XBMCGUI modules.
import xbmc, xbmcgui
self.addControl(xbmcgui.ControlImage(100, 0, 1080, 720, "special://masterprofile/media/bell.jpg"))
My_Window = MyScript()