Overview
Related Plugins
The in-built PowerScheduler plugin takes care of all power operations for your HTPC, e.g. waking it up for scheduled recordings or automatically shutting it down after an user defined time.
Introduction
The Power Scheduler feature for TV-Server consists of two plugins:
- a server-plugin for the TV-service - configured in TV-Server
- client-plugin for MediaPortal - configured in MediaPortal
Features
The following features are supported by the TV-service plugin:
- Configurable standby mode: Suspend (S3) or Hibernate (S4).
- Prevent standby when TV-service is busy streaming/viewing/recording
- Prevent standby when MediaPortal is busy (through the MediaPortal client plugin
- Wakeup computer for wakeup events provided by MediaPortal (through the MediaPortal client plugin).
- Wakeup computer for scheduled recordings
- Wakeup computer for EPG grabbing, prevent standby when EPG grabber is active.
- Configurable list of processes which can prevent standby when they are active.
- Prevent standby based on network activity.
- Easily extensible by creating additional plugins.
The following features are supported by the MediaPortal client-plugin:
- Support for single seat setup or client-only mode in a client/server setup.
- Support for legacy power-aware plugins (like My Alarm).
- Easily extensible by creating additional plugins.
Installation
The TV Server and the MediaPortal parts of this plugin are included by default. You can configure them in the according configuration section.
Configuration
TV Server plugin
- Start MediaPortal TV-Server setup
- Click on Plugins
- Enable the PowerScheduler plugin
- Next, open the Plugins tree and click on PowerScheduler. The following screen appears:
General

- Enable both shutdown and wakeup in the General section to globally enable both features. If you disable any of these options, it will be disabled for the MediaPortal client as well (only applicable for single seat installations).
- Set "Shutdown mode" to either Suspend or Hibernate
- Suspend (or S3) mode sends the PC to sleep with RAM maintaining power for very fast resume.
- Hibernate (or S4) mode sends the PC to sleep with an image of RAM on the harddisk for a more secure standby and a fast resume.
Advanced

- Forced shutdown
- Enable this when there are other external processes running on the computer preventing standby mode. It is however advised to look into why those process are preventing standby.
- Enable extensive logging
- Adds more information to logs, might be helpful if you're experiencing problems.
- Pre-wakeup time in seconds
- Sets the time in seconds the PC will resume before a recording starts.
- Pre-no-shutdown time in seconds
- Sets the time-span in seconds the PC won't shutdown if an event lays within.
- Check interval in seconds
- Sets the interval in seconds PowerScheduler will check the status-handlers.
- Reinitialize service on wakeup
- Triggers whether you want to reinitialize the server (also reinitializes tuners) after resume or not.
- Run command before / after standby
- Gives the option to specify a file (full path needed!) that is executed before standby and after resume. This is only executed if "Reinitialize service on wakeup" is also checked.
EPG

If you wish to wakeup the system for EPG grabbing and/or prevent standby when EPG grabbing is active, enable these options. You can also configure the time to wakeup the system and which days of the week the computer should wakeup for EPG grabbing.
- Prevent standby when grabbing EPG
- Triggers whether or not standby is entered if EPG is being grabbed.
- Wakeup system for EPG grabbing on ...
- Triggers whether or not the system should be resumed to grab EPG data at the specified time (HH:MM format).
- Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
- System is resumed from standby on chosen days to grab EPG data.
- Run command before internal handlers are triggered
- Gives the option to specify a file command (full path needed!) that is executed before EPG grabbing.
Note 1: This is only executed if "Wakeup system for EPG grabbing" is checked and has a valid time.
Note 2: A command-line argument "epg" will automatically be added to the command. When using a script, you can perform certain actions based on the presence of this argument.
Processes

If you wish to configure additional processes which should prevent the system from entering standby mode, then either type the exact process name or better, click on Select process and choose the process from the process list. (You must have the process running to be able to select it.) Multiple processes are separated by commas.
Save the configuration by closing Setup via the OK button. The PowerScheduler plugin for the TV-service will immediately apply the changed settings.
Network Monitor

The network monitor is used to prevent PowerScheduler from entering standby mode when remote users are accessing network shares, FTP or other network services.
- Prevent standby based on network activity
- Enables the network monitor.
- Minimum transfer rate considered as network activity in KB/s
- If the network transfer rate is above the given value standby will be prevented, and the idle timer will be reset.
Shares
Adds network share monitoring support to the TV-Server Power Scheduler plugin

- Share - enter which share to monitor
- Host - enter which connections from which host
- User - enter which users or all users
MediaPortal client plugin
- Start MediaPortal setup.
- Click on Plugins in the left tree and navigate to process plugins.
- Enable the plugin called PowerScheduler client plugin.
- Right-click on the icon and choose Configure.
General
- Shutdown idle time in minutes
- Sets the time the PC needs to be idle until shutdown.
- Only allow standby when on home window
- Disabling this will allow the server to enter standby regardless of what window MP shows if no media is being played.
- Shutdown mode
- Suspend (or S3) mode sends the PC to sleep with RAM maintaining power for very fast resume.
Hibernate (or S4) mode sends the PC to sleep with an image of RAM on the harddisk for a more secure standby and a fast resume.
Advanced

- Forced shutdown (shutdown even when prevented by another process)
- Enable this when there are other external processes running on the computer preventing standby mode. It is however advised to look into why those process are preventing standby.
- Enable extensive logging
- Adds more information to logs, might be helpful if you're experiencing problems.
Press "OK" and "OK" again to close setup and save the configuration.
Usage Guide
Usage of the PowerScheduler feature is pretty much straight forward. Just keep MediaPortal idle in the Home window and the TV-service will eventually put the system into standby if the computer is completely idle. For now, don't use MediaPortal's buttons (or your remote's button) to put the system into standby, but let the TV-service control it. This makes sure the wakeup time is set correctly.
It's also recommended to change Windows power options to NOT put the computer to sleep.
Known Problems / Troubleshooting
-
In case of problems, make sure you enable extensive logging on both the server plugin and client plugin. When posting support requests and/or bugreports, attach both tv.log and MediaPortal.log to your report. Also, please note that in some circumstances (i.e. when SetupTv is started) the tv.log is rotated (then please use tv.bak and/or MediaPortal.bak; make sure you have the same timestamps in the logs you post.
Original author
micheloe
Changes in the latest release
The following table shows the changes that affect the user interface in the latest version of MediaPortal (final or test release), either within MediaPortal or in the Configuration tool(s). Select the links to view details of the changes. These changes are incorporated into this wiki page once the final stable version is released.
You may sort the table by any of the columns. Note: the Date column displays the date the UI Rellated Change wiki page was created.