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:
For information/error messages, I would be grateful, after all, this is my first addon
Release 0.1.8 from 29.08.13
- check of active network connections implemented. Handle with care, it's possible that xbmc will never shut down anymore in some setups.
Release 0.1.7 from 28.08.13
- allow multiple connection attempts if TVHeadend isn't responding at first time (e.g. tvheadend isn't startet yet or later while system started up). Amount of attempts and delay between them is configurable.
Release 0.1.6 from 09.08.13
- some minor bugfixes and improvements
- New: add an option to wait for multiple postprocessing scripts or commands (e.g. Comskip or Markad) after a recording or poweroff before shutdown the system.
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.