SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #21  
Old 01-22-2012, 08:59 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Motion detector camera, yes, HAHA.

Actually, it's kind of a problem that there is no sleep function on the extenders. I'm using VAP for videoredo to autoprocess all the files that land in my SageTV directory, and it gets a fair amount of use when it has to process 16 hours of live TV with the extender running while I'm asleep and then at work. I kind of wish there was some workaround for the Live TV being kept in the target save directory where VAP autoprocesses EVERYTHING.

That's a slick plugin that you have here, though, and I'll sure be using that anyways - thank you.
Reply With Quote
  #22  
Old 01-22-2012, 09:38 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
This little plugin, in conjunction with yours, Routerunner, might just do the trick.

http://forums.sagetv.com/forums/showthread.php?t=48623

EDIT: Yeah, that solved the issue, for the most part. The "basic sleep plugin" takes the extender offline after the designated time, actually, puts it to sleep.

Last edited by KryptoNyte; 01-22-2012 at 10:15 PM.
Reply With Quote
  #23  
Old 01-23-2012, 10:58 AM
routerunner's Avatar
routerunner routerunner is offline
Sage Icon
 
Join Date: May 2008
Location: Wiltshire, UK
Posts: 1,384
HD100 fixed and something else...

Thanks to "briands" whom enabled me to perform some remote debugging on his unit the HD100 issue has now been fixed. New release to follow soon.

Also, there will be another release afterwards which allows you to execute a batch (Windows) or shell script (Linux/Mac) located in a fixed location of your SageTV server installation that can be freely modified to suit your needs. The batch/script will be called at client connection and client disconnection (both are configurable separately) and will receive two arguments:

1) String "connect" or "disconnect"
2) String client IP address

this way you can implement all your different logic depending upon the client is connecting or disconnecting and depending upon the unit. Also, for the scripting part only, all clients will be supported enabling you to perform some specific action related only to software clients you might want to personalize.

Any further suggestions welcomed.
__________________

Automatic Power Off | Squeezeslave | DVB-S Importer | DVB Decrypter & Card Client | Tuner Preroll


Every man is a damn fool for at least five minutes every day; wisdom consists in not exceeding the limit. ~ Elbert Hubbard
Reply With Quote
  #24  
Old 01-27-2012, 07:15 PM
routerunner's Avatar
routerunner routerunner is offline
Sage Icon
 
Join Date: May 2008
Location: Wiltshire, UK
Posts: 1,384
Plugin Update: Batch/Script implemented

As announced before the new plugin version 1.0.2 implements a configurable option that allows to call a batch/script file every time one clients connect or disconnect to a SageTV server and are configurable separately.

The batch/script is automatically generated in:

<SageTV installation dir>/plugins/autopoweroff/

and its name is "autopoweroff.bat" for Windows server or "autopoweroff.sh" for Linux/Mac servers. Once generated the batch/script can be modified by the user and will not be overwritten any more.

Two arguments are passed to the batch/script during execution:

#1 - A string with the word "connect" or "disconnect"
#2 - The client IP address

Enjoy!
__________________

Automatic Power Off | Squeezeslave | DVB-S Importer | DVB Decrypter & Card Client | Tuner Preroll


Every man is a damn fool for at least five minutes every day; wisdom consists in not exceeding the limit. ~ Elbert Hubbard

Last edited by routerunner; 01-27-2012 at 07:23 PM. Reason: typo
Reply With Quote
  #25  
Old 01-27-2012, 10:08 PM
thomaszoo thomaszoo is offline
Sage Aficionado
 
Join Date: Jun 2004
Location: Sacramento, CA
Posts: 487
Wow, I never got around to putting my HD100 on a DMZ port and you already fixed that and added more functionality! Maybe I can find some time this weekend to give it a test drive. Thank you!

Wayne
__________________
i5-6400, MSI B150M Micro ATX MB, 16GB DDR3 1600, 2 - WD Green 2TB SATA Drives, Lite-On SATA 4X Blu-ray Reader, Corsair 400W 80+ Power Supply, Silverstone Sugo SG02-BF MicroATX Case, Windows 10 (64), HDHR Dual X2, Quatro and Prime, 5 x HD300 + 2 x HD100
Reply With Quote
  #26  
Old 01-29-2012, 02:13 PM
routerunner's Avatar
routerunner routerunner is offline
Sage Icon
 
Join Date: May 2008
Location: Wiltshire, UK
Posts: 1,384
Quote:
Originally Posted by thomaszoo View Post
Wow, I never got around to putting my HD100 on a DMZ port and you already fixed that and added more functionality! Maybe I can find some time this weekend to give it a test drive. Thank you!

Wayne
Don't worry about the HD100, I'm currently using one of another user to port the Squeeze Slave Player plugin for the HD100 as well, that's why I needed to fix this rather quickly

Let me know if the batch/script functionality as implemented so far fits your requirement...
__________________

Automatic Power Off | Squeezeslave | DVB-S Importer | DVB Decrypter & Card Client | Tuner Preroll


Every man is a damn fool for at least five minutes every day; wisdom consists in not exceeding the limit. ~ Elbert Hubbard
Reply With Quote
  #27  
Old 03-18-2012, 06:57 PM
routerunner's Avatar
routerunner routerunner is offline
Sage Icon
 
Join Date: May 2008
Location: Wiltshire, UK
Posts: 1,384
New version 1.0.3 available

There is a new version of this plugin available that adds the ability to enable the automatic power off flag for each extender separately.

I needed this feature for one of my application, so I thought someone might be interested as well.

Eddy
__________________

Automatic Power Off | Squeezeslave | DVB-S Importer | DVB Decrypter & Card Client | Tuner Preroll


Every man is a damn fool for at least five minutes every day; wisdom consists in not exceeding the limit. ~ Elbert Hubbard
Reply With Quote
  #28  
Old 06-01-2012, 05:24 PM
matt91's Avatar
matt91 matt91 is offline
Sage Icon
 
Join Date: Feb 2005
Location: Washington, DC
Posts: 1,185
Quote:
Originally Posted by routerunner View Post
There is a new version of this plugin available that adds the ability to enable the automatic power off flag for each extender separately.

I needed this feature for one of my application, so I thought someone might be interested as well.

Eddy
Eddy (or others) - Can anyone point to where this option is found? I just installed v1.3 tonight, but in the plugin config screen, all i have in the timeout, and the two external batch file launch options. I don't see where I would toggle an extender on/off. thanks matt
__________________
Server: Ubuntu 16.04 running Sage for Linux v9
Reply With Quote
  #29  
Old 06-04-2012, 01:35 PM
routerunner's Avatar
routerunner routerunner is offline
Sage Icon
 
Join Date: May 2008
Location: Wiltshire, UK
Posts: 1,384
Quote:
Originally Posted by matt91 View Post
Eddy (or others) - Can anyone point to where this option is found? I just installed v1.3 tonight, but in the plugin config screen, all i have in the timeout, and the two external batch file launch options. I don't see where I would toggle an extender on/off. thanks matt
I guess you figured out by now how to use it? You need to have the extender on, then it will automatically appear in the configuration page where you can enable/disable it on a per extender basis.
__________________

Automatic Power Off | Squeezeslave | DVB-S Importer | DVB Decrypter & Card Client | Tuner Preroll


Every man is a damn fool for at least five minutes every day; wisdom consists in not exceeding the limit. ~ Elbert Hubbard
Reply With Quote
  #30  
Old 06-04-2012, 03:20 PM
matt91's Avatar
matt91 matt91 is offline
Sage Icon
 
Join Date: Feb 2005
Location: Washington, DC
Posts: 1,185
Quote:
Originally Posted by routerunner View Post
I guess you figured out by now how to use it? You need to have the extender on, then it will automatically appear in the configuration page where you can enable/disable it on a per extender basis.
Yes, thanks. I was looking at the config screen from a placeshifter instance, and it wasn't included there. I didn't realize that the config screen was different on a physical extender vs placeshifter.

thanks
Matt
__________________
Server: Ubuntu 16.04 running Sage for Linux v9
Reply With Quote
  #31  
Old 09-29-2012, 11:45 AM
thomaszoo thomaszoo is offline
Sage Aficionado
 
Join Date: Jun 2004
Location: Sacramento, CA
Posts: 487
Quote:
Originally Posted by routerunner View Post
The batch/script is automatically generated in:

<SageTV installation dir>/plugins/autopoweroff/

and its name is "autopoweroff.bat" for Windows server or "autopoweroff.sh" for Linux/Mac servers. Once generated the batch/script can be modified by the user and will not be overwritten any more.
Eddy,

I finally got around to trying this out and I am not able to get it to work. Right now all I'm doing is checking to see if the autopoweroff.bat file runs when a client connects or disconnects. I added the following lines to the file to check this out:

Echo Hi there
Pause

It works as expected if I manually run it, but it never runs with a connect or disconnect [EDIT: yes, I did enable the options for the extender]. I'm not sure where to take it from here. Once I understand how it works, I have figured out the command-line arguments I need to kickoff the events in EventGhost.

Thanks.

Wayne
__________________
i5-6400, MSI B150M Micro ATX MB, 16GB DDR3 1600, 2 - WD Green 2TB SATA Drives, Lite-On SATA 4X Blu-ray Reader, Corsair 400W 80+ Power Supply, Silverstone Sugo SG02-BF MicroATX Case, Windows 10 (64), HDHR Dual X2, Quatro and Prime, 5 x HD300 + 2 x HD100

Last edited by thomaszoo; 09-29-2012 at 12:25 PM.
Reply With Quote
  #32  
Old 09-30-2012, 07:34 AM
routerunner's Avatar
routerunner routerunner is offline
Sage Icon
 
Join Date: May 2008
Location: Wiltshire, UK
Posts: 1,384
Quote:
Originally Posted by thomaszoo View Post
Eddy,

I finally got around to trying this out and I am not able to get it to work. Right now all I'm doing is checking to see if the autopoweroff.bat file runs when a client connects or disconnects. I added the following lines to the file to check this out:

Echo Hi there
Pause
Wayne,

I've implemented this long time ago, but I recall I tested it and it was definitively working. I reckon you don't see the command window because it gets executed by Java within the same context as SageTV, however I suspect that if you open the process task list you'll see a pending "cmd.exe" awaiting your key press

Eddy
__________________

Automatic Power Off | Squeezeslave | DVB-S Importer | DVB Decrypter & Card Client | Tuner Preroll


Every man is a damn fool for at least five minutes every day; wisdom consists in not exceeding the limit. ~ Elbert Hubbard
Reply With Quote
  #33  
Old 09-30-2012, 10:57 PM
gveres gveres is offline
Sage Aficionado
 
Join Date: Nov 2007
Location: Waterloo, Ontario
Posts: 404
Ok it is late and I am blind.

Where do I configure this and enable it?

Thanks
Greg
Reply With Quote
  #34  
Old 10-01-2012, 04:28 AM
routerunner's Avatar
routerunner routerunner is offline
Sage Icon
 
Join Date: May 2008
Location: Wiltshire, UK
Posts: 1,384
Quote:
Originally Posted by gveres View Post
Ok it is late and I am blind.

Where do I configure this and enable it?

Thanks
Greg
After you donwload the plugin you can enable this global feature via its configuration page.

Enabling the "Connect" or "Disconnect" feature will create a new file in "<Sage dir>/plugins/autopoweroff" called "autopoweroff.bat" (Windows) or "autopoweroff.sh" (Linux). Once created, the file can be freely modified by the user as it is no longer overwritten by the plugin.



The script will be automatically invoked as appropriare with two arguments that you need to test inside the script to take the proper action:
  1. String which contenct can be "connect" or "disconnect".
  2. Dotted notation IP address string of the SageTV client/extender that has been connected/disconnected.
Whilst the script will be executed for all clients/extenders, the physical power off function will work on the extenders only.

Eddy
__________________

Automatic Power Off | Squeezeslave | DVB-S Importer | DVB Decrypter & Card Client | Tuner Preroll


Every man is a damn fool for at least five minutes every day; wisdom consists in not exceeding the limit. ~ Elbert Hubbard
Reply With Quote
  #35  
Old 10-01-2012, 05:38 AM
gveres gveres is offline
Sage Aficionado
 
Join Date: Nov 2007
Location: Waterloo, Ontario
Posts: 404
Thanks Eddie

I wasn't looking for the config page on the plugin itself. Its been a long time since I added anything new to sage.

I found it. Thanks.
Reply With Quote
  #36  
Old 10-05-2012, 04:55 PM
routerunner's Avatar
routerunner routerunner is offline
Sage Icon
 
Join Date: May 2008
Location: Wiltshire, UK
Posts: 1,384
What next?

The original idea behind this plugin was an attempt to reduce the "wear" of extenders to the bare minimum during the day by keeping them in stand by and, in my particular case, to switch them completely off during the night via power timers.

Generally speaking this is working properly, however the extenders are Linux box and as such they should be shut down properly before removing the power otherwise the flash file system can potentially get damaged with disastrous consequences.

I was therefore thinking to add an option to shut down an extender at a configurable time in case, like me, you want to power off the extenders during the night by using power timers, or any time you need to perform a hard power cycle.

Eddy
__________________

Automatic Power Off | Squeezeslave | DVB-S Importer | DVB Decrypter & Card Client | Tuner Preroll


Every man is a damn fool for at least five minutes every day; wisdom consists in not exceeding the limit. ~ Elbert Hubbard

Last edited by routerunner; 10-05-2012 at 04:58 PM.
Reply With Quote
  #37  
Old 08-04-2013, 02:51 PM
cyberlewis cyberlewis is offline
Sage User
 
Join Date: May 2010
Location: Greenwood, IN USA
Posts: 38
Possible Issue with SageTV 7 Playlists

Hi Eddy,

Your 'Automatic Power Off' plugin is a central (and very reliable) component of my family's SageTV setup. Recently, I have been using the 'Playlists' functionality in SageTV 7 more, and have noticed that this plugin is turning the extenders off after 30 minutes of activity (the setting I use for your plugin) when playback is initiated by the playlist rather than from the media file itself. Have you seen similar behavior, or is this perhaps due to something other than this plugin? My current workaround is to disable the 'Automatic Power Off' plugin, watch playlist content, and then re-enable this plugin followed by a restart of the SageTV service. I would just like to nail this down since I would prefer to use both this plugin AND the playlist functionality.

Thank you,
Brian
Reply With Quote
  #38  
Old 08-05-2013, 02:49 AM
routerunner's Avatar
routerunner routerunner is offline
Sage Icon
 
Join Date: May 2008
Location: Wiltshire, UK
Posts: 1,384
Quote:
Originally Posted by cyberlewis View Post
Hi Eddy,

Your 'Automatic Power Off' plugin is a central (and very reliable) component of my family's SageTV setup. Recently, I have been using the 'Playlists' functionality in SageTV 7 more, and have noticed that this plugin is turning the extenders off after 30 minutes of activity (the setting I use for your plugin) when playback is initiated by the playlist rather than from the media file itself. Have you seen similar behavior, or is this perhaps due to something other than this plugin? My current workaround is to disable the 'Automatic Power Off' plugin, watch playlist content, and then re-enable this plugin followed by a restart of the SageTV service. I would just like to nail this down since I would prefer to use both this plugin AND the playlist functionality.

Thank you,
Brian
Hi Brian,

I'm glad you're finding this plugin useful.

I generally don't use the playlist functionality myself so I never noticed this behavior before, but the plugin itself is registering to some playback events and should receive the relevant notification when media playback starts/stop, however there is the possibility that the music file playback is treated differently on SageTV and therefore the events are not sent (bug?), but this is just speculation and I need to run the code in debug mode to fully understand the issue.

In the meantime you could use the plugin configuration page and enable/disable the timeout on a per extender basis without the need to restart your server.

Thanks
Eddy
__________________

Automatic Power Off | Squeezeslave | DVB-S Importer | DVB Decrypter & Card Client | Tuner Preroll


Every man is a damn fool for at least five minutes every day; wisdom consists in not exceeding the limit. ~ Elbert Hubbard

Last edited by routerunner; 08-05-2013 at 03:16 AM.
Reply With Quote
  #39  
Old 08-05-2013, 06:28 AM
cyberlewis cyberlewis is offline
Sage User
 
Join Date: May 2010
Location: Greenwood, IN USA
Posts: 38
Hi Eddy,

Thanks so much for looking into this. I will use your workaround in the interim since it is a much better solution.

Thanks,
Brian
Reply With Quote
  #40  
Old 08-05-2013, 08:10 AM
routerunner's Avatar
routerunner routerunner is offline
Sage Icon
 
Join Date: May 2008
Location: Wiltshire, UK
Posts: 1,384
Quote:
Originally Posted by cyberlewis View Post
Hi Eddy,

Thanks so much for looking into this. I will use your workaround in the interim since it is a much better solution.

Thanks,
Brian
Quick question. When you're talking about the "playlist" you're referring to the music, video or mixed playlist?

Thanks
Eddy
__________________

Automatic Power Off | Squeezeslave | DVB-S Importer | DVB Decrypter & Card Client | Tuner Preroll


Every man is a damn fool for at least five minutes every day; wisdom consists in not exceeding the limit. ~ Elbert Hubbard
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Plugin: Automatic Aspect Ratio Mode Switcher JREkiwi SageTV v7 Customizations 46 03-30-2011 11:24 PM
Automatic system and power shutdown mhubel SageTV Customizations 0 07-29-2010 07:13 PM
Automatic aspect plugin for Sagemc Hunter69 SageMC Custom Interface 3 11-16-2009 07:53 AM
Sky automatic power on harryf SageTV United Kingdom 6 02-14-2008 04:24 AM
Automatic DivX Encoding and Automatic Commercial Removal? TurboRX-7 SageTV Customizations 3 07-28-2005 09:00 PM


All times are GMT -6. The time now is 11:21 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.