[mythtv] detecting activity - not signal. > cablebox_on.sh

Peter Hartmann ascensiontech at gmail.com
Wed Nov 7 04:51:45 UTC 2007

Thank for the responses guys ....I found the $! method just after the
posting.  This script solves my rebooting cable box problem.  It's not
like I could complain to the cable company about it.  They'd probably
do it more often if they knew they were messing up my recordings
considering they have thier own DVR service to offer.  Anyway it
samples /dev/video0 or the end of the current mythtv recording, makes
2 stills and compares the difference in color.  If there is no
difference it turns the box on and changes to the last channel in
mythbackend.log.  Enjoy!


On 11/5/07, Mark Paulus <mark.paulus at verizonbusiness.com> wrote:
> Peter Hartmann wrote:
> >>> Have you had a look for discrete "on" IR codes for your cable box? You
> >>> could just fire one of these on every channel change to ensure the
> >>> cable box is on?
> > My cable box doesn't have a discreet 'on' code. I don't get the
> > feeling that they work this way in general but I only have so can't
> > say for sure.   But I do have script almost done that does the job.
> > It's modified from a motion detection script i found.  The only
> > problem is that it only works if Myth is recording.  Is there a way to
> > call a script when you start recording a program within Mythtv?  If
> > not I'll have to figure out how to cat /dev/video0 > testsample.mpg
> > for 5 seconds in bash.  I'm not sure how to do that.   I can't wait to
> > gloat a little bit to my sister  whose Tivo box doesn't have this
> > functionality.  ;)
> $!/bin/bash
> cat /dev/video0 > testsample.mpg &
> vidPid=$!
> sleep 5
> kill $vidPid
> mv testsample.mpg yadayadayada
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cablebox_on.sh
Type: application/x-sh
Size: 2435 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20071106/90ded20b/attachment.sh 

More information about the mythtv-dev mailing list