Hey
I thought I’d share an addon I recently developed for personal use, maybe it will help others with the same need I was facing.
I have a Kodi box (OpenELEC) running in the bedroom, and a “main” or “parent” Kodi instance in the living room. The “child” Kodi streams video files from the parent device.
The parent is set to sleep/suspend after a while of no activity. I wanted an addon that would prevent sleep/suspend while videos were being streamed to the child Kodi device. Couldn’t find one, so I made KeepAwake.
While videos are playing, it sends the parent device a left+right remote toggle to keep it awake, every specified number of minutes (configurable). If the parent is already playing a video – it does nothing until the next check. As long as the interval is lower than the time set for automatic suspend on the parent device, it will keep it awake while watching videos.
To make it work, just install the addon and set the parent device’s IP, HTTP username, password and port (make sure the webserver is enabled).
Two experimental features regarding Wake-On-Lan and media type:
- Wake-On-Lan may be issued to the parent device if the child attempted to stream a file and failed. Upon the next attempt to play the file, the parent will have (hopefully) already woken up.
- Choose to keep the parent awake depending on the locally playing file type (video/audio/both). This is for cases where the child relies on the parent for either or both of the media types.
Source:
https://github.com/noam09/kodi/tree/mast….keepawake
ZIP:
https://github.com/noam09/kodi/blob/mast…-1.0.0.zip
Happy to hear any comments, suggestions, fixes, etc.