http://www.vdr-portal.de/board60-linux/b...ost1024670
Ok lets go!
The combination of XBMC (live) with TVHeadend 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 under XBMC. I have therefore written a Python-Script, which is registered as an add-on (in this case as a service) on XBMC Pre-Eden
. 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.
- 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.
The power button on the unit shows the normal behavior, i.e. the device switches off, timers are not set.
"Soon" fitting timers are calculated from:
ACPI: Recording Time < boot time + shutdown time + countdown time -> see screenshot
NVRAM: <11 minutes
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.).
Actions are logged into pvrmanager.log:
~ /. xbmc/temp/script.program.pvrmanager/pvrmanager.log
For information/error messages, I would be grateful, after all, this is my first addon

_BJ1
Bugfix in 0.1.5 from 27.09.12
- If users creating a manual timer in XBMC an forgot to name the recording, the status.xml of tvheadend is incomplete. The script fails on reading some properties of the xml-file and in this case it crashed. This has been fixed. Download the fixed script from the link above as usual.
Release 0.1.5 from 08.04.12
- Since the range of EPG-Informations on some tv-services isn't long enough to serve the automatic recorder of tvheadend for a longer time, I've implemented a periodically wakeup in an interval between from "off" (inactive) to about 7 days. This is usefull for updating the EPG-data. See screenshots.
Release 0.1.4 from 24.01.12
- PVRManager optionally send mail if an automatic recording is scheduled successful and there wasn't any user activity (absent, sleeping, far from home)
Last Update (in zip): 10.10.11 - 18:25:
- Bug fixes, code cleaning, improved debug messages
- Error handling if TVHeadend is crashed, Typos in the README
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.

Search
Help