Idle time detection (in touchscreen application)

Implementation of an idle detector in a Touchscreen application the idea is to use a Touchscreen Display with Yodeck and show an existing website (e.g. as Tourism Information Point) and i want to return to the home page after some time there is no interaction. The option of reload website or haveing a playlist of the same website is not suiteable as the interaction is not considered. means the reload will be executed even there is interaction by the user. another usecase would be to switch playlist after a defined idle time to show some kind of a screensaver (e.g. picture slideshow)