Ok lets go!
Download and screenshots you'll find at (new download location): http://vdr4bj1.no-ip.org?item=addon or install it from my repository (see signature)
The combination of XBMC/Kodi(Buntu) and TVHeadend as backend hasn’t a power or timer management for ongoing and upcoming recordings. A wake-up mechanism for future recordings either under XBMC nor under TVHeadend isn't completed yet or needs several bash scriptings. Therefore I've written a Python-Script, which is registered as a service on XBMCKodi running since Frodo up to actual versions.
The operation of this script can be summarized as follows:
- a pressure on the power button on the remote control whilest a current or soon upcoming recording is ignored and an appropriate message is shown. After recording and analyzing for next possible timers a wake-up via ACPI or NVRAM (nvram-wakeup must be installed and properly configured) is set and the system shuts down.
- Every keypress (Play, Pause, Mute, Volume etc.) except power aborts the above mechanism, i.e., the computer don’t poweroff after recording. Power management is turned back on by simply pressing the power button remote again.
- Before switching off after a timer, an adjustable countdown is shown by progress bar, that can be stopped.
- Additional network and process monitoring is implemented if needed. Define network ports and/or processes which should monitoring in setup.
- Is there a timer recording without any user activity occurs (eg. at night / user absent), the system will shut down without notice message after the recording was done and set next wakeup. Before doing this an email is optional delivered to the user.
- If power button is pressed and there are no upcoming/soon schedules required, the system shuts down immediately, however, timers are set.
"Soon" fitting timers are calculated from:
ACPI: Recording Time < boot time + shutdown time + countdown time -> see screenshot
NVRAM: <11 minutes
Inside the package is a wrapper script (shutdown.sh) that needs some special settings as python itself cannot have root privileges. This is necessary for setting the system clock and shutdown operations.
Therefore: YOU MUST read the README and follow the instructions whitin the package, because there's a lot to be configured (user rights, remote.xml, etc.). Just take a look inside the zipfile.
It would be grateful to inform me about errors, issues or other informations. Be free to contact me in this forum or PM me.
Current Release: see changelog
Initial Release Oct. 2011
Installation: Copy zip to a directory where XBMC has access. Then: System -> Addons -> Install from zip file -> select location
Next steps for configuration you'll find in the README in this package.