[mythtv-users] directv.pl channel_sd_hd issues

John P Poet jppoet at gmail.com
Tue Aug 31 14:36:44 UTC 2010


On Mon, Aug 30, 2010 at 12:44 AM, les <lhigger at att.net> wrote:

> hello everyone..
> setup here is mythdora 10.21 . dtv h21 stb.
> usb -->serial---->serial---usb..
> directv.pl 1.9   all works except the setup_channel_sd_hd part..
> its true the new firmware does show signal even when the tv shows no
> signal. ie you are not paying for the hd channel..
> i have tried putting in an if statement ie  if ($chan == 356)
> {send_key("ch_up"); } but it dosent work.
> i am not a perl programmer.. more a php guy..lol  must be putting it in the
> wrong place..
> i did see some mention of a translation table .. but no example.. i only
> have 5 channels i would like to have this work with..
>
> any ideas
>


Probably easier to wrap a shell script around directv.pl, and have myth call
the shell script instead.

Something like:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 #!/bin/sh

if [ "X$1" = "X" ]; then
       echo "Usage: $0 <channel number>"
       echo
       exit 1;
fi

/usr/local/bin/directv.pl box_type H20 port /dev/ttyUSB0 on
/usr/local/bin/directv.pl box_type H20 port /dev/ttyUSB0 get_channel

/usr/local/bin/directv.pl box_type H20 port /dev/ttyUSB0 channel_change_type
command setup_channel $1

if [ "$?" -ne "0" ]; then
    /usr/local/bin/directv.pl box_type H20 port /dev/ttyUSB0
channel_change_type command setup_channel $1
fi

if [ "$1" = "356" ]; then
/usr/local/bin/directv.pl box_type H20 port /dev/ttyUSB0 key ch_up
fi

if [ "$1" = "357" ]; then
/usr/local/bin/directv.pl box_type H20 port /dev/ttyUSB0 key ch_up
fi
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


John
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20100831/3d6cc709/attachment.htm>


More information about the mythtv-users mailing list