[mythtv-users] USB IR receiver for Harmony remote (Jay Mallar)

Calin Brabandt cbrabandt at yahoo.com
Tue Aug 7 03:55:49 UTC 2007


--- Calin Brabandt <cbrabandt at yahoo.com> wrote:

> On 8/7/07, nospam312 <nospam312[at]gmail.com> wrote:
> 
> 
> > Are you saying the MS MCE remote receiver can be
> used 
> > as a cheap replacement for a USB-UIRT if you do
> not 
> > need the blasters? Does the MS MCE remote receiver
> 
> > work with other remotes? TIA. 

Okay, I just did an /etc/init.d/lircd stop and
attempted a few irrecord sessions with my Microsoft
MCE IR receiver and some arbitrary remotes.  I have
not yet found one that irrecord could not pick up and
generate a codes file so the MCE transceiver, version
2 appears to be a possible general replacement for the
USB-UIRT.

If anyone has any specific remotes they'd like me to
test with the MCE receiver, I'll check the Harmony
database for my 676 and see if I can load it and test
it.

I don't remember where I found this perl script,
online, but I made a couple of quick edits and it
worked fine with Mythtv to change channels on my 6200
STB.  Sorry about any line wrap problems but I don't
have much time to make it pretty tonight.

#!/usr/bin/perl

# make sure to set this string to
# the corresponding remote in /etc/lircd.conf
$remote_name = "DCT";

# Let's assume you don't need to press enter after you
punch in a
# channel number. Change this to 1 if your cable box
expects you press
# enter after each command
$needs_enter = 1;

# Change this to point to your rc executable
$rc_command = "/usr/local/bin/irsend";

# This subroutine actually sends the signal to the
cable box
sub change_SIGNAL {
    my($SIGNAL) = @_;
    system ("$rc_command SEND_ONCE $remote_name
$SIGNAL");
}

$SIGNAL=$ARGV[0];
open F, ">> /var/log/channel.log";
print F "channel changing $SIGNAL\n";
close F;
print "channel changing $SIGNAL\n";

# Select IR blaster 1, 2, or both ("set_transmitters 1
2" for both)
system ("$rc_command set_transmitters 1 2");

# Checks if $SIGNAL begins with a digit
# If it detects that the string is made up of digits,
then it puts
# spaces between the digits.  Ex. 1234 becomes 1 2 3 4
if ( $SIGNAL =~ /^\d+$/ )
{
    my $length = length($SIGNAL);
    my $counter = 0;
    my $temp;

    while( $counter < $length )
    {
	$temp .= substr($SIGNAL,$counter,1) ." ";
	$counter++;
    }

    change_SIGNAL($temp);
}
else
{
    # argument we passed was not made up of digits, so
it must be a
    # command that does something other than channel
changing on the
    # cable box
    change_SIGNAL($SIGNAL);
}

# Do we need to send enter
if ( $needs_enter )
{
    system ("$rc_command SEND_ONCE $remote_name
Enter");
}

-------------------------------------------------
Once I created my /etc/lircd.conf file with a "name
DCT" entry. I tested my channel change blaster codes
with a simple script like this.  I verified that I
did, in fact, capture the codes for the DCT blaster
section using my actual DCT6200 remote control, the
MCE receiver, and irrecord.

sleep 10
irsend SEND_ONCE DCT 7
sleep 1
irsend SEND_ONCE DCT 1
sleep 1
irsend SEND_ONCE DCT 0
sleep 1
irsend SEND_ONCE DCT Enter
sleep 10
irsend SEND_ONCE DCT 7
sleep 1
irsend SEND_ONCE DCT 0
sleep 1
irsend SEND_ONCE DCT 3
sleep 1
irsend SEND_ONCE DCT Enter
sleep 10
irsend SEND_ONCE DCT 7
sleep 1
irsend SEND_ONCE DCT 0
sleep 1
irsend SEND_ONCE DCT 7
sleep 1
irsend SEND_ONCE DCT Enter
sleep 10
irsend SEND_ONCE DCT 7
sleep 1
irsend SEND_ONCE DCT 0
sleep 1
irsend SEND_ONCE DCT 8
sleep 1
irsend SEND_ONCE DCT Enter

I'm short on time tonight but I'll try to support
other users who wish to get both the MCE receiver and
blaster working.  The Myth wiki was a bit short on
blaster howto, but the LIRC site provided the missing
information I needed.

-Cal


       
____________________________________________________________________________________
Sick sense of humor? Visit Yahoo! TV's 
Comedy with an Edge to see what's on, when. 
http://tv.yahoo.com/collections/222


More information about the mythtv-users mailing list