****************************** Sleep Timer (SageMC and default STV)
******************************
Updated: 2/23/2008
This plugin adds a simple sleep timer to SageTV, and works with the standard STV as well as with SageMC. The timer menu is accessible via the OSD Options menu, and can also be linked to any menu page via nielm's dynamic menus import. The usage should be straight forward, you can set sleep times of 15, 30, 60, and 90 minutes (the times are configurable) by selecting the corresponding button in the menu. The "Left" command cancels the dialog without any changes and brings you back to the previous menu.
Once the timer fires it will pop up a confirmation screen which will stay up for 15 seconds. There you can
Confirm the sleep request, Sage will go to sleep immediately
Cancel the timer
Extend the timer by multiple of 15 minutes (by cycling with "Left" or "Right" while on the corresponding button)
If you don't make any selection within 15 seconds, the confirmation screen will close itself, and Sage will go to sleep.
Optionally, you can configure the timer to execute a command line when it puts Sage to sleep. Add the following settings to Sage.properties:
plugins/df/SleepTimer/cmd the command line to execute
plugins/df/SleepTimer/cmd_args command line parameters (optional)
plugins/df/SleepTimer/cmd_workdir working directory for command (optional)
New in V0.6: if you want to ensure that SageTV always goes to sleep at at a specific time, you can enable a 'global' timer by setting the property plugins/df/SleepTimer/global_timer to a time in 24hr format, e.g.
plugins/df/SleepTimer/global_timer=23:30
The global timer will get activated once you start SageTV and put Sage to sleep every day at the specified time. If the standard sleep timer is active, it will override the global one. So e.g. if the global timer is set to 23:00, and you activate the standard timer at 20:00 to sleep in 90 minutes, Sage will enter sleep at 21:30, and the global timer will fire again at 23:00 on the next day. Don't worry if you don't need this functionality, it is disabled by default.
New in V0.7: you can send multiple IR commands via USB-UIRT when the timer fires. To configure the new commands, add the following properties to your Sage.properties (actual values are only examples):
You can find the required parameters in the appropriate encoder section in your Sage.properties:
set tuning_plugin to mmc/encoders/[...]/tuning_plugin
set plugin_port to mmc/encoders/[...]/tuning_plugin_port
set remote_name to mmc/encoders/[...]/device_name
Then add the IR commands you want to send in the source setup for your tuning control (Setup Video Sources -> Select Source -> Tuner Control -> Learn New Command), and enter the name of the command into the infrared_cmd property in Sage.properties, e.g.
plugins/df/SleepTimer/infrared_cmd0=TV_OFF
if you have learned a new command "TV_OFF" for your USB-UIRT. You can specify up to 5 commands in Sage.properties, which will be sent via USB-UIRT in 1 second intervals.
unzip the installation file into SageTV directory (e.g. C:\Program Files\SageTV\SageTV). Make sure to preserve the directory structure. This will copy gkusnick.sagetv.jar, df_safgeutils.jar, and df_sleep_timer.jar to JARs and sleep_timer.xml to STVs\SageTV3
restart SageTV
make a backup of your current STV file
import sleep_timer.xml: Settings->Import STVi (SageMC), or sleep_timer_default_stv.stv (Default STV)
If you want to link the timer using nielm's dynamic menus do the following:
v0.4:
- added link to OSD options menu
- made menu transparent
v0.5:
- fixed transparency for menu when linked via dynamic menus
- added optional command line execution on sleep
v0.6:
- incorporated SageMC support into the same import file
- added configuration for sleep durations
- added global timer
- show status of timer after confirmation dialog is closed
v0.7:
- new controls allow to set a specific time (standard STV only)
- send up to 5 commands via USB-UIRT when Sage is entering sleep
v0.8:
- fixed options menu for SageMC
v0.9:
- fixed name of link_to_OSD property name, did not have prefix "plugins/df"
- include new version of import library which fixes incorrect import on MVPs using SageMC
- moved code into separate JAR file, df_sageplugins.jar no longer needed for this plugin
v1.0:
- fixed incompatibility with SageMC 6.10
- added functionality to set specific time to SageMC version
v1.1:
- now compatible with SageTV 6.0 beta and SageMC 6.13
v1.2:
- included latest mod by JREKiwi for default STV
- tested compatibility with SageMC 6.3.4
- packaged new JAR files (now requiring Java 1.6)