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
  #1  
Old 01-12-2012, 07:29 PM
routerunner's Avatar
routerunner routerunner is offline
Sage Icon
 
Join Date: May 2008
Location: Wiltshire, UK
Posts: 1,384
Plugin: Automatic Power Off

Hi,

I would like to introduce you "Automatic Power Off" plugin for extenders (MVP/HDx00).

This is my first ever SageTV plugin for v7.1. I did it mainly as exercise for another plugin which I'm going to release soon and which shares some libraries so it did make some sense.

I know this is not a new thing, and there are plenty of ways outhere to achieve the same result, but I thought this plugin could be useful to some of you considering that:

- The extenders are now a rarity, in particular the HD300 which is running hot, so at least keep it off/ready when not in use help to cool it down at least.
- If you have kids like mine whom switch on the equipment and kindly "forget" to switch it off when finished.
- I you like me have the extenders hooked on power timers that switches them on in the morning and off at night.
- Well, I'm sure that if you like it, you'll find plenty of good use.

The plugin must be installed on the server only and have a single configuration option the "Inactivity Timeout" in seconds that can be accessed once the plugin in installed and is global for all extenders.

Please use this thread to send me you feedback, issues or feature requests.

thanks for listening ;-)
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
  #2  
Old 01-12-2012, 07:36 PM
thomaszoo thomaszoo is offline
Sage Aficionado
 
Join Date: Jun 2004
Location: Sacramento, CA
Posts: 487
Does it poweroff and extender if a screensaver (slideshow) is enabled?

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
  #3  
Old 01-13-2012, 04:20 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
Does it poweroff and extender if a screensaver (slideshow) is enabled?

Wayne
Yes, the screensaver functionality are completely separate from this plugin, so their respective timeouts, if a screensaver is already enabled and playing when this plugin timeout kick in, the extender will power off regardless.
__________________

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-13-2012 at 05:21 AM. Reason: typo
Reply With Quote
  #4  
Old 01-13-2012, 05:24 AM
routerunner's Avatar
routerunner routerunner is offline
Sage Icon
 
Join Date: May 2008
Location: Wiltshire, UK
Posts: 1,384
HD100 testing please...

I don't have an HD100 myself, so I couldn't perform any testing on that extender. Can someone please test this plugin on HD100 and let me know the result? It should work, however I'll really appreciate whether someone can do this test for me.

many 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; 01-13-2012 at 05:47 PM.
Reply With Quote
  #5  
Old 01-13-2012, 10:33 PM
thomaszoo thomaszoo is offline
Sage Aficionado
 
Join Date: Jun 2004
Location: Sacramento, CA
Posts: 487
It works as advertised! Screen saver came up and later it shut off (HD-300)

I just reset the timeout to 30 sec and tried it on an HD-100. Nothing.

What would be cool is if it could control other components. I have a TV and receiver hooked up to the HD300 that are also controllable via serial port (currently using eventghost).

Thanks for the plugin.

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
  #6  
Old 01-14-2012, 05:42 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
It works as advertised! Screen saver came up and later it shut off (HD-300)

I just reset the timeout to 30 sec and tried it on an HD-100. Nothing.

What would be cool is if it could control other components. I have a TV and receiver hooked up to the HD300 that are also controllable via serial port (currently using eventghost).

Thanks for the plugin.

Wayne
Thanks for the HD100 test.

Would it be possible for you to hook your HD100 on the DMZ port of your router for me to investigate further please? If so, please PM me with your public internet address.

many 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
  #7  
Old 01-14-2012, 11:06 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
What would be cool is if it could control other components. I have a TV and receiver hooked up to the HD300 that are also controllable via serial port (currently using eventghost).
Are you thinking from the extender via the onboard USB ports? I would personally prefer to use the HDMI-CEC functions...will see
__________________

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-14-2012 at 11:06 AM. Reason: typo
Reply With Quote
  #8  
Old 01-14-2012, 11:19 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Quote:
Originally Posted by thomaszoo View Post
What would be cool is if it could control other components. I have a TV and receiver hooked up to the HD300 that are also controllable via serial port (currently using eventghost).
Could the plugin be adapted to optionally run an external process - ie any batch file or executable? That way one should be able to run another process that shuts off the other components, either via a serial, TCP or even an IR blaster.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #9  
Old 01-14-2012, 11:29 AM
routerunner's Avatar
routerunner routerunner is offline
Sage Icon
 
Join Date: May 2008
Location: Wiltshire, UK
Posts: 1,384
Quote:
Originally Posted by wayner View Post
Could the plugin be adapted to optionally run an external process - ie any batch file or executable? That way one should be able to run another process that shuts off the other components, either via a serial, TCP or even an IR blaster.
Yes, I don't see any problem on doing this you can use the java runtime classes to run an external software passing some arguments to specify the extender that required the power off. I'll put that in the wish list.

BTW, did you see my post regarding having access to one of your HD100?

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
  #10  
Old 01-14-2012, 11:32 AM
routerunner's Avatar
routerunner routerunner is offline
Sage Icon
 
Join Date: May 2008
Location: Wiltshire, UK
Posts: 1,384
Quote:
Originally Posted by routerunner View Post
BTW, did you see my post regarding having access to one of your HD100?
Sorry, I've just realized the message wasn't for you
__________________

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
  #11  
Old 01-14-2012, 11:34 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
Easy mistake - you just got the wrong Wayne!
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #12  
Old 01-14-2012, 02:02 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by routerunner View Post
BTW, did you see my post regarding having access to one of your HD100?

thanks
Eddy
If you want code that will power off/power on/reboot HDx00 devices, I've already written code that does it and has been tested against the HD100 and HD200. I never tested it against HD300 because I didn't have one at time of dev, but I'd be mildly shocked if the code didn't work on HD300s. MediaMVPs are a different beast and I'd be mildly shocked if the code did work on those devices. You can either use the jar file or view the code. The javadocs are here. Extender control functions are under GlobalHelpers.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #13  
Old 01-15-2012, 03: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 Slugger View Post
If you want code that will power off/power on/reboot HDx00 devices, I've already written code that does it and has been tested against the HD100 and HD200. I never tested it against HD300 because I didn't have one at time of dev, but I'd be mildly shocked if the code didn't work on HD300s. MediaMVPs are a different beast and I'd be mildly shocked if the code did work on those devices. You can either use the jar file or view the code. The javadocs are here. Extender control functions are under GlobalHelpers.
Thank you very much for your help Slugger. I rather prefer to have a look at the code, if you don't mind, so I have a chance to learn something. I quite enjoing making software for the sage community and I'm becoming a big fan of Java, very powerful indeed. Can you please point me in the right direction to look at the code?

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; 01-15-2012 at 03:49 AM. Reason: typo
Reply With Quote
  #14  
Old 01-15-2012, 09:19 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by routerunner View Post
Thank you very much for your help Slugger. I rather prefer to have a look at the code, if you don't mind, so I have a chance to learn something. I quite enjoing making software for the sage community and I'm becoming a big fan of Java, very powerful indeed. Can you please point me in the right direction to look at the code?

thanks
Eddy
Here's a link to the code. It's written in Groovy so if you're new to Java then it might look a little weird, however Groovy is so close to Java that if you can read Java code then you'll have no problems. The code uses the Apache commons-net Java library to do all telnet communications with the extender devices.

Enjoy...
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #15  
Old 01-15-2012, 10:20 AM
routerunner's Avatar
routerunner routerunner is offline
Sage Icon
 
Join Date: May 2008
Location: Wiltshire, UK
Posts: 1,384
Quote:
Originally Posted by Slugger View Post
Here's a link to the code. It's written in Groovy so if you're new to Java then it might look a little weird, however Groovy is so close to Java that if you can read Java code then you'll have no problems. The code uses the Apache commons-net Java library to do all telnet communications with the extender devices.

Enjoy...
I looked at the code, but more or less is what my telnet library plugin is doing and does work with the MVP..., weird, I'll leave it for now until someone else will report the same issue and will ask permission to remotely access the unit for debugging.

thanks again for your help
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
  #16  
Old 01-15-2012, 11:46 AM
thomaszoo thomaszoo is offline
Sage Aficionado
 
Join Date: Jun 2004
Location: Sacramento, CA
Posts: 487
Quote:
Originally Posted by routerunner View Post
Thanks for the HD100 test.

Would it be possible for you to hook your HD100 on the DMZ port of your router for me to investigate further please? If so, please PM me with your public internet address.

many thanks
Eddy
I'll see if I can get this done for you. I was mostly interested in it for the hd300, but I suppose it would be good for the hd100s, too.
__________________
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
  #17  
Old 01-15-2012, 11:49 AM
thomaszoo thomaszoo is offline
Sage Aficionado
 
Join Date: Jun 2004
Location: Sacramento, CA
Posts: 487
Quote:
Originally Posted by routerunner View Post
Are you thinking from the extender via the onboard USB ports? I would personally prefer to use the HDMI-CEC functions...will see
Like Wayner said, I really just want it to run an external process on the server. I don't use my server for viewing even though it is hooked up and capable. In fact, the hd300 is in the same closet as the server.

Thanks again for the plugin.

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
  #18  
Old 01-16-2012, 10:22 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
I'll see if I can get this done for you. I was mostly interested in it for the hd300, but I suppose it would be good for the hd100s, too.
Many thanks, I'll really appreciate that.
__________________

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
  #19  
Old 01-22-2012, 12:33 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
As I was falling asleep last night watching channel 1012 on an HD200, I was pondering if it would be possible to have the HD200 shut itself off after an hour or so. When watching liveTV, I assume there is always continuing activity even after the target live show is over (it just continues to play that channel), so perhaps this particular plugin wouldn't act as a sleep timer, but perhaps there is something that could achieve this? Is this sleep feature already built into the unit somewhere that I haven't yet found?

Is there any way to achieve this so that I can just walk away from any HD200/300 in the house, or fall asleep, knowing that it would just shut itself off after "x" minutes?
Reply With Quote
  #20  
Old 01-22-2012, 02:31 PM
routerunner's Avatar
routerunner routerunner is offline
Sage Icon
 
Join Date: May 2008
Location: Wiltshire, UK
Posts: 1,384
Quote:
Originally Posted by KryptoNyte View Post
As I was falling asleep last night watching channel 1012 on an HD200, I was pondering if it would be possible to have the HD200 shut itself off after an hour or so. When watching liveTV, I assume there is always continuing activity even after the target live show is over (it just continues to play that channel), so perhaps this particular plugin wouldn't act as a sleep timer, but perhaps there is something that could achieve this? Is this sleep feature already built into the unit somewhere that I haven't yet found?

Is there any way to achieve this so that I can just walk away from any HD200/300 in the house, or fall asleep, knowing that it would just shut itself off after "x" minutes?
Yes, by connecting a motion detection camera to you HD300 that points to your eyes

Seriously though, there is not such a thing that reliably knows whether there is someone in front of the telly or not without giving you false positives. You're right if you're watching a live show the plugin will automatically go into idle until you stop any kind of playback, then it will start the countdown to power off the unit, any activity such as even using the remote will reset the countdown to its specified value again to avoid any false positive.

What you really want is a sleep timer function, something that must be set for each extender individually and that you must need to setup before watching anything to be sure that the extender will power off automatically.

This plugin currently doesn't do that, but I'll add this feature into my wishing list.

Thanks for your feedback
__________________

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.