[mythtv-users] Ensure STB is on

Daryl McDonald darylangela at gmail.com
Wed Aug 14 16:28:25 UTC 2013


On Wed, Aug 14, 2013 at 5:12 AM, Stephen Worthington <
stephen_agent at jsw.gen.nz> wrote:

> On Tue, 13 Aug 2013 21:00:14 -0700, you wrote:
>
> >>
> >>
> >>
> >> Thanks Mark, I now seem to be "chmod" ed properly, but as you pointed
> out
> >> Stephen, there is no display command:
> >>
> >>  daryl at daryl-A780L3C:~$ /usr/local/bin/check_stb
> >> irsend: command failed: SEND_ONCE DCT700 DISPLAY
> >> irsend: unknown command: "DISPLAY"
> >> daryl at daryl-A780L3C:~$
> >>
> >>
> >Daryl,
> >
> >if your lircd.conf is verbatim from
> >https://help.ubuntu.com/community/Motorola_DCT700_Channel_Change_Script,
> it
> >should be "info" in place of "DISPLAY"
> >
> > $ irsend SEND_ONCE DCT700 info
> >
> >if so,  try changing inside check_stb:
> >
> >info="irsend SEND_ONCE DCT700 DISPLAY"
> >
> >to:
> >
> >info="irsend SEND_ONCE DCT700 info"
> >
> >Good luck!
>
> OK, I have now worked out how the blank= line does its job.  The jp2a
> command converts a jpeg file into ASCII art.  The chosen options make
> black areas be represented by M characters.  The first sed command
> converts W characters to M characters as well - presumably W
> represents near-black areas, but I am not getting any Ws in my output
> to verify that.  The second sed command converts each character in the
> output into a line with a line terminator character at the end, and
> the final grep then counts how many of these lines are just an M
> character.  Since the jp2a command has the --size=72x24 option, it
> always outputs 72x24=1728 characters representing the jpeg file.  If
> all 1728 characters are M or W, then the script says that is a blank
> screen and the set top box must be off.
>
> So, all of that should just work without any modification with any set
> top box that produces blank video on its output when it is off.  It
> works with my box.
>
> The "info=" line needs to send any command that will ensure that the
> box is sending non-blank output.  If it is always sending non-blank
> output when it is on, the you could just comment out the "info=" line
> and the "$info &" line further down.  Comment out = put a # character
> as the first non-blank character on the line.
>
> Unfortunately, I am running into a problem where the ffmpeg command is
> failing on some captured video.  If that happens, the script just
> cleans up and exits without doing anything.  The program guide being
> on screen causes this to happen.  However, if the box is off, ffmpeg
> always seems to work, so the script will then turn it on  So the
> script is still doing what it is designed to do, despite this problem.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>

You have proved yourself a genius once again Mr. Worthington, with your
direction even a newbie like me can see that the script is working: (not to
mention the STB turned on)

daryl at daryl-A780L3C:~$ /usr/local/bin/check_stb
daryl at daryl-A780L3C:~$ grep mythstb-check /var/log/syslog
Aug 14 08:08:08 daryl-A780L3C mythstb-check: Wed Aug 14 08:08:08 EDT 2013
STB seems to be turned off, last count was 1728, attempting to Power it on
Aug 14 08:09:27 daryl-A780L3C mythstb-check: Wed Aug 14 08:09:27 EDT 2013
STB seems to be turned off, last count was 1728, attempting to Power it on
Aug 14 08:13:22 daryl-A780L3C mythstb-check: Wed Aug 14 08:13:22 EDT 2013
STB seems to be turned on, last count was 465
Aug 14 12:16:31 daryl-A780L3C mythstb-check: Wed Aug 14 12:16:31 EDT 2013
STB seems to be turned off, last count was 1728, attempting to Power it on
daryl at daryl-A780L3C:~$

Will Mythtv use this script every time I direct it to record from the STB,
just because it's in the directory beside the change_channel.sh ? Or do I
need to insert it into the change_channel.sh?

Many thanks and much tribute, Daryl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20130814/b119eda2/attachment.html>


More information about the mythtv-users mailing list