[mythtv-users] Experience Installing Hauppauge WinTV-HVR-1600 card IR Blaster/Button Assignments thread

Larry on the Dell Laptop larry at foxgulch.com
Sat Feb 28 21:17:33 UTC 2009


>
>
> Now to see if I can get my cranky DishNetwork Satellite Receiver to 
> change channels using the supplied blaster.
>
> Larry
>
>
Continuing where I left off.....
At first I found I couldn't change channels on the Dishnetwork VIP612 
receiver.

Next I selected the input on my Sony TV so I could monitor which channel 
the Dish vip612 receiver was tuned to.

Then I ssh'd into my mythtv box from another PC.

lj at dell:~$ ssh -Y lj at mythtv
lj at mythtv's password:
Linux mythtv 2.6.27-11-generic #1 SMP Thu Jan 29 19:24:39 UTC 2009 i686

Then I tried the channel-change-lirc.pl script by going to the weather 
channel #214:
lj at mythtv  /usr/local/bin/change-channel-lirc.pl 214

That failed so I had a look at the script. Every instance of /dev/lirc* 
was incorrect.  I changed each so that the script read as shown below:

#!/usr/bin/perl
# file /usr/local/bin/change-channel-lirc.pl
#

# name the file channel-change-lirc.pl  then place  in  /usr/local/bin, 
remember to  chmod +xr
#
# make sure to set this string to
# the corresponding remote in /etc/lircd.conf
#
$remote_name = "dish";
#  Next two lines added to get rid of advertisement that comes up
#  on Vip612 dish receive when inactive and to
#  bring the VIP612 out of "low power" mode..
system ("irsend -d /dev/lircd SEND_ONCE $remote_name power_on");
sleep 5;
system ("irsend -d /dev/lircd SEND_ONCE $remote_name select");
sleep 1;


sub change_channel {
        my($channel_digit) = @_;
        system ("irsend -d /dev/lircd SEND_ONCE $remote_name 
$channel_digit");
        sleep 1;
}
# allow for four digit channels such as 9404 on Dishnetwork
$channel=$ARGV[0];
sleep 1;
if (length($channel) > 3) {
        change_channel(substr($channel,0,1));
        change_channel(substr($channel,1,1));
        change_channel(substr($channel,2,1));
    change_channel(substr($channel,3,1));
} elsif (length($channel) > 2) {
        change_channel(substr($channel,0,1));
        change_channel(substr($channel,1,1));
        change_channel(substr($channel,2,1));
} elsif (length($channel) > 1) {
        change_channel(substr($channel,0,1));
        change_channel(substr($channel,1,1));
} else {
        change_channel(substr($channel,0,1));
}
system ("irsend -d /dev/lircd SEND_ONCE $remote_name select");

Then after
lj at mythtv$  sudo /etc/init.d/lirc restart

I was able to change channels, to CNN
lj at mythtv:~$ /usr/local/bin/change-channel-lirc.pl 200

to the WX channel which worked also
lj at mythtv:~$ /usr/local/bin/change-channel-lirc.pl 214


Finally I wasn't happy with the button assignment so I deleted the 
mceusb stanzas out of the file
~/.lirc/mythtv  and then inserted the following stanzas at the bottom of 
the file after the last "dish16" stanza.  Most of my changes are at the 
end:  Again I just used gedit.

lj at mythtv:$ gedit ~/.lirc/mythtv

Heres my personal preference  button assignments.

begin
    remote = mceusb
    prog = mythtv
    button = Seven
    config = 7
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Right
    config = Right
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Mute
    config = |
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Skip
    config = Z
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = One
    config = 1
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Down
    config = Down
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Zero
    config = 0
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Replay
    config = Q
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Home
    config = M
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Pause
    config = P
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Six
    config = 6
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Two
    config = 2
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = ChanDown
    config = Down
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = ChanUp
    config = Up
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Rewind
    config = <
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Forward
    config = >
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Play
    config = P
    repeat = 0
    delay = 0
end

#change repeat =2 so volume decrease is continuous and rapid.
begin
    remote = mceusb
    prog = mythtv
    button = VolDown
    config = [
    repeat = 2
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Stop
    config = Escape
    repeat = 0
    delay = 0
end

# change repeat to = 2 so holding vol down rapidly changes vol.
begin
    remote = mceusb
    prog = mythtv
    button = VolUp
    config = ]
    repeat = 2
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Five
    config = 5
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = More
    config = I
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Four
    config = 4
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = OK
    config = Return
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Up
    config = Up
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = RecTV
    config = R
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Nine
    config = 9
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Three
    config = 3
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Enter
    config = Enter
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Eight
    config = 8
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Guide
    config = S
    repeat = 0
    delay = 0
end

begin
    remote = mceusb
    prog = mythtv
    button = Left
    config = Left
    repeat = 0
    delay = 0
end

# assign the Red Button to Delete a Recording
begin
    remote = mceusb
    prog = mythtv
    button = Red
    config = D
    repeat = 0
    delay = 0
end

# emulate Escape key action with Clear button
begin
    remote = mceusb
    prog = mythtv
    button = Clear
    config = Escape
    repeat = 0
    delay = 0
end

# make the DVD button (whihc lives below the
# chan up/down button and just to the right
#  of the Mute Button) function as Escape or Exit
begin
    remote = mceusb
    prog = mythtv
    button = DVD
    config = Escape
    repeat = 0
    delay = 0
end




More information about the mythtv-users mailing list