Ok lets go!
The described addon here is hosted by the german “VDR-Portal” where you can find the screenshots of this addon too.
Download (new download location): http://vdr4bj1.no-ip.org or install it from my repository (see signature)
The combination of XBMC(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 XBMC running in Frodo, Gotham, Helix and hopefully in later versions if needed.
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.
"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.
Actions are logged into pvrmanager.log:
~ /.xbmc/temp/service.TVH.Manager/service.TVH.Manager.log or
After all, this is my first addon. It would be grateful to inform me about errors, issues or other informations. Be free to contact me in this forum or PM me.
Release 0.2.4 from 11.11.14
- Ready for Helix (Kodi)
- polish translation
- revised README as PDF (for better understanding) - take a look into the zip
Release 0.2.2 from 20.06.14
- Addon is compatible now with OpenELEC without modifications on source code.
Release 0.2.0 from 06.06.14
- complete software redesign/refactoring. PVRManager has now a more object orientated behaviour and is ready for future enhancements.
- Mail notifications use an optional encryption (SSL/TLS/STARTTLS) now required from several providers.
- As there are some important settings has changed, PLEASE RESET ALL SETTINGS TO DEFAULT AND ADAPT NEW THEN.
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 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)
Release 0.1.2 from 10.10.11
- Bug fixes, code cleaning, improved debug messages
- Error handling if TVHeadend is crashed, Typos in the README
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.