[mythtv-users] Wrote Script to Power on Cable Box

Joe Hickey jfwd at phlobus.net
Mon Jun 25 15:35:06 UTC 2012


On Mon, Jun 25, 2012 at 10:40 AM, jr <jraymyth at gmail.com> wrote:
> I have been having trouble with my Cable Box shutting off on a weekly
> basis.  Usually at some point during the weekend so that Sunday or
> Monday night shows are lost.  After a bit of research, I finally sat
> down last night and wrote a script to cat from my HDPVR into a file
> for 5 secs, then check the file size.  If its zero, then I use my
> channel change script to power on the tuner. Is that going to work
> with any type of reliability?
>
> jr

Don't know if checking for zero size is going to work, since a
continual black screen encoded into whatever video format is probably
going to be nonzero size.

I have a power-on script that records for a few seconds, then uses
ffmpeg to dump frames to individual files at 1fps.  By converting to
ASCII-art file format (there is a tool to do this, I forgot the name)
it is very easy to check for a black screen.  If all frames are black
then you can be pretty sure the power is off.  It then sends the POWER
command and loops back to the beginning to check for non-black frames
again.

I also use this concept/modification of this script to confirm channel
changes -- blast the "INFO" key and the cable box puts the channel# at
a predictable location on the screen, which I can crop out and pass
through gocr and check the number.  All this nonsense because I'm
stuck with TW cable, all channels encrypted, and an unreliable cable
box that periodically just plain ignores the channel change or reboots
itself.


More information about the mythtv-users mailing list