SageTV Community

SageTV Community (http://forums.sagetv.com/forums/index.php)
-   SageTV Customizations (http://forums.sagetv.com/forums/forumdisplay.php?f=27)
-   -   Utility: STBKeepAlive - scheduled commands for USB-UIRT (http://forums.sagetv.com/forums/showthread.php?t=35228)

shadeblue.com 08-27-2008 07:59 PM

Utility: STBKeepAlive - scheduled commands for USB-UIRT
 
Some set top boxes (STBs) have a periodic timeout where after some amount of time of inactivity they power down or go into a standby mode. Well, this is not so good when you are using that STB in a PVR setup such as with SageTV. This is a widely known problem with the Motorola VIP-1200 STB used by AT&T Uverse.

If you are using a USB-UIRT to control your STB, then this free utility program should help out. It is designed to install and run as an NT service, so it can run unattended on a server.

The utility is preconfigured to work with the Uverse Motorola VIP-1200, however in the program directory there is a STBKeepAlive.config file that you can edit with a text editor and change the raw IR command to work with your STB. To obtain the raw IR command, you can capture the required command in the SageTV USB-UIRT configuration and then open the *.IR file located in the "C:\Program Files\SageTV\Common\RemoteCodes\USB-UIRT Transceiver" directory.


Please post any comments or issues to this thread. This program is currently in BETA.

Thank You, shadeBlue.com


More Information is located on the DOWNLOADS page

mikejaner 08-28-2008 09:12 PM

This is awsome, thanks so much!! I was just thinking about this yesterday, when my wife called me to tell me "SageTV was acting up again", and it actually turned out to be that once a month when my Verizon FIOS boxes turn themselves off. I was debating on hacking away at the USBUIRT to send some type of discreet on command at any channel change SageTV sends, with the SageTV Source Setup section. I wasn't sure how I would accomplish this, but you made it so I wont have to!!
I will let you know my results this weekend.
Thanks again.

:clap:

shadeblue.com 08-28-2008 09:53 PM

Hi Mike,

I hope this program works out and helps solve this problem for you.

In the STBKeepAlive.config file there is an XML node that contains the IR Command. You will want to change the name to a friendly name (used in logging) for your command, the actual IR data, and possibly the daily times to fire the command.

Code:


  <IRCommands>
    <IRCommand Name="Uverse Motorola VIP1200 - OK"
              IR="0000 0070 0000 0024 000F 000B 0006 000B 0006 0017 0006 000B 0006 001D 0006 0011 0006 000B 0006 000B 0006 000B 0006 000B 0006 0017 0006 0011 0006 0017 0006 0011 0006 0011 0006 001D 0006 000B 0006 0C87 000F 000B 0006 000B 0006 0017 0006 000B 0006 001D 0006 0011 0006 000B 0006 000B 0006 000B 0006 000B 0006 0017 0006 0011 0006 0017 0006 0011 0006 0011 0006 001D 0006 000B 0006 0C86"
              Schedule="00:55,03:55,06:55,09:55,12:55,15:55,18:55,21:55"
              RepeatCount="1" />
  </IRCommands>


If you know the time that the FIOS STB shuts down, you could just send a discrete Power On command on a daily basis at a scheduled time shortly after.

If you need any help getting the appropriate IR command data, just post a question and I can help you through it.

If you want to monitor this program's behavior, you can run the program in console mode, or you can modify the STBKeepAlive.config configuration file to enable detailed logging to a log file. You can do this by changing the threshold value in the logging FileAppender to "DEBUG". See below...

Code:

    <appender name="FileAppender" type="log4net.Appender.FileAppender">   
      <file value="STBKeepAlive.log" />
      <threshold value="DEBUG" />
      <appendToFile value="true" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
      </layout>
    </appender>

One last thing, don't forget after any change to the config file, you have to restart the program (service) for it to pick up the changes.

Good Luck!
shadeBlue

jlabrue 08-28-2008 09:57 PM

This is very cool!

Question: Does anyone know if there is a discrete on/off command for a Scientific Atlantic 3250 STB. I have this problem with mine and have looked for a solution exactly like this. I just haven't been able to find or find proof of a discrete command. I'm guessing not since it has been so hard to find anything.

shadeblue.com 08-28-2008 09:58 PM

Quote:

Originally Posted by jlabrue (Post 301668)
This is very cool!

Question: Does anyone know if there is a discrete on/off command for a Scientific Atlantic 3250 STB. I have this problem with mine and have looked for a solution exactly like this. I just haven't been able to find or find proof of a discrete command. I'm guessing not since it has been so hard to find anything.

If the STB is power off, will it "wake up" to any other button, or only the Power button?

mikejaner 08-28-2008 10:13 PM

Quote:

Originally Posted by shadeblue.com (Post 301666)
Hi Mike,

I hope this program works out and helps solve this problem for you.

In the STBKeepAlive.config file there is an XML node that contains the IR Command. You will want to change the name to a friendly name (used in logging) for your command, the actual IR data, and possibly the daily times to fire the command.

Code:


  <IRCommands>
    <IRCommand Name="Uverse Motorola VIP1200 - OK"
              IR="0000 0070 0000 0024 000F 000B 0006 000B 0006 0017 0006 000B 0006 001D 0006 0011 0006 000B 0006 000B 0006 000B 0006 000B 0006 0017 0006 0011 0006 0017 0006 0011 0006 0011 0006 001D 0006 000B 0006 0C87 000F 000B 0006 000B 0006 0017 0006 000B 0006 001D 0006 0011 0006 000B 0006 000B 0006 000B 0006 000B 0006 0017 0006 0011 0006 0017 0006 0011 0006 0011 0006 001D 0006 000B 0006 0C86"
              Schedule="00:55,03:55,06:55,09:55,12:55,15:55,18:55,21:55"
              RepeatCount="1" />
  </IRCommands>


If you know the time that the FIOS STB shuts down, you could just send a discrete Power On command on a daily basis at a scheduled time shortly after.

If you need any help getting the appropriate IR command data, just post a question and I can help you through it.

If you want to monitor this program's behavior, you can run the program in console mode, or you can modify the STBKeepAlive.config configuration file to enable detailed logging to a log file. You can do this by changing the threshold value in the logging FileAppender to "DEBUG". See below...

Code:

    <appender name="FileAppender" type="log4net.Appender.FileAppender">   
      <file value="STBKeepAlive.log" />
      <threshold value="DEBUG" />
      <appendToFile value="true" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
      </layout>
    </appender>

One last thing, don't forget after any change to the config file, you have to restart the program (service) for it to pick up the changes.

Good Luck!
shadeBlue

Hey thanks for the tips. I found out my Motorola QIP6200-2 boxes don't have discreet on off commands!!!
I did figure out a combination of key presses which will guarantee it is on though. Do you think the following key presses can be done with a ~250ms between each? I know I would have to get the codes, but does your program support multiple presses with a delay between each?

The code sequence is as follows:

Power
Power
Select
Menu
Exit
Power
Power

shadeblue.com 08-28-2008 10:19 PM

Quote:

Originally Posted by mikejaner (Post 301672)
Hey thanks for the tips. I found out my Motorola QIP6200-2 boxes don't have discreet on off commands!!!
I did figure out a combination of key presses which will guarantee it is on though. Do you think the following key presses can be done with a ~250ms between each? I know I would have to get the codes, but does your program support multiple presses with a delay between each?

The code sequence is as follows:

Power
Power
Select
Menu
Exit
Power
Power

Hi Mike, it does support multiple IR commands at different scheduled times (with minimum of one minute resolutions), but not sequencing multiple IR commands for a single event. However, I can try to add that functionality this weekend; it should not be too hard. So keep posted for an update! :-)

mikejaner 08-28-2008 10:23 PM

Awsome, thanks!
:D

bcjenkins 08-29-2008 04:44 AM

Quote:

Originally Posted by mikejaner (Post 301672)
The code sequence is as follows:

Power
Power
Select
Menu
Exit
Power
Power

When do you kill the chicken? :D

mikejaner 08-29-2008 05:19 AM

Quote:

Originally Posted by bcjenkins (Post 301697)
When do you kill the chicken? :D

Before.
Also, this code did give me 100 lives after I put it in.

jlabrue 08-29-2008 07:21 AM

Quote:

Originally Posted by shadeblue.com (Post 301670)
If the STB is power off, will it "wake up" to any other button, or only the Power button?

I'll see if I can find something on that. Hadn't thought of that.

briands 08-29-2008 07:35 AM

Quote:

Originally Posted by mikejaner (Post 301672)
Hey thanks for the tips. I found out my Motorola QIP6200-2 boxes don't have discreet on off commands!!!
I did figure out a combination of key presses which will guarantee it is on though. Do you think the following key presses can be done with a ~250ms between each? I know I would have to get the codes, but does your program support multiple presses with a delay between each?

The code sequence is as follows:

Power
Power
Select
Menu
Exit
Power
Power

Are you sure this works? Because the way I look at it, if it start out off, it will end up back off
-OFF
Power -ON
Power -OFF
Select (ignored since it's off) -OFF
Menu (ignored since it's off) -OFF
Exit (ignored since it's off) -OFF
Power -ON
Power -OFF

If the answer is that the unit does not "accept" a key in close proximity to the ON command (but it does the off), couldn't you just send power twice?

mikejaner 08-29-2008 08:05 AM

Quick answer is, no other key press will turn the unit on. As a result, I needed to find a key sequence which will work to guarantee the unit is on.

Now let me answer why this key sequence does work. The back story is, these Verizon QIP6200-2 boxes used to bring up the "Service Menu" if the power was off and you pressed the menu button. In one of their updates in the past year, they made that slightly more difficult. You now have to press Select/OK and then Menu just after the power has been turned off;
If the power is already off, then you have to press Power twice, to turn it on quickly, then the rest of the sequence.So....

Power
Power
Select
Menu

In the worst case senario to bring up the service menu.

What I discovered is if the unit on, when you press this, you get the following actions:

STB Off
STB On
OSD
Main Menu

I thought, we might have something here, but I need the menu to go away, so let me press the Exit key in both situations.

By pressing the Exit key, if the unit is on, exit's the Main Menu back to Live TV.
By pressing the Exit key, if the unit is off, does not exit the Service Menu.

Further, I found out by pressing the power button while in the service menu, turns it off, then by pressing it again, turns it on normally.
So, I came to the following sequence of events:

Power
Power
Select
Menu
Exit
Power
Power

Which results in one of the two events:

Power Already On:

STB Off
STB On
OSD
Main Menu
Live TV
STB OFF
STB On

Power Already Off:

STB On
STB Off
Service Menu
STB Off
STB On

ToxMox 08-29-2008 08:36 AM

Mike can you try this? I remember reading it somewhere:

MENU POWER for discrete off
MENU POWER POWER for discrete on

mikejaner 08-29-2008 08:50 AM

Quote:

Originally Posted by ToxMox (Post 301717)
Mike can you try this? I remember reading it somewhere:

MENU POWER for discrete off
MENU POWER POWER for discrete on

I am at work now, so not until tonight.

According to this forum:
http://www.remotecentral.com/cgi-bin...hread.cgi?3714

This is a sequence which works when entering the service menu by pressing menu while the unit is off. It looks like this would have worked, if they didn't take that sequence out. At the least it would have to be the following for me.

Select
MENU
POWER
POWER

But since the device only likes the sequence to happen right after being powered off....

POWER
Select
MENU
POWER
POWER

And so on.

Looking at my sequence though, I might be able to get away with the following, if the Main Menu is not back on the screen after power cycling.

POWER
POWER
Select
MENU
POWER
POWER


Either way, it comes out to being a Macro.
I will try tonight though to see what I can find out.

ToxMox 08-29-2008 08:59 AM

With the HDPVR it would seem there could be some code that if it starts recording and is receiving no signal then it could send a power on command to the box.

mikejaner 08-29-2008 10:49 AM

Quote:

Originally Posted by ToxMox (Post 301724)
With the HDPVR it would seem there could be some code that if it starts recording and is receiving no signal then it could send a power on command to the box.

Yeah, that would be nice...

shadeblue.com 08-29-2008 11:42 AM

Quote:

Originally Posted by mikejaner (Post 301760)
Yeah, that would be nice...

...or embed this logic into sage, perhaps an IR command when the STB is no longer in use and a another at some interval prior to sage needing to make use of the STB. That way we could power down STB's no longer in use to conserve energy and bandwidth consumption in the case of IPTV. It does seem that sage "knows" when there is no source content, I have seen that displayed on occasion.

mikejaner 08-29-2008 01:22 PM

Quote:

Originally Posted by ToxMox (Post 301717)
Mike can you try this? I remember reading it somewhere:

MENU POWER for discrete off
MENU POWER POWER for discrete on

Just tried it, and it doesn't work

My previous post about taking that one step out of my other sequence does work though.

shadeblue.com 08-31-2008 11:39 PM

Quote:

Originally Posted by mikejaner (Post 301675)
Awsome, thanks!
:D

Hi Mike,

Have not had a chance to make this change yet, hopefully tomorrow.

Regards,
shadeBlue


All times are GMT -6. The time now is 06:20 AM.

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