LinuxMCE Forums

General => Users => Topic started by: Venom986 on February 14, 2008, 11:21:42 PM

Title: USB-UIRT Learning
Post by: Venom986 on February 14, 2008, 11:21:42 PM
Anyone know how to get the USB-UIRT to actually learn codes when using the web admin and trying to learn codes for a new device?  I thought it would be as simple as having the USB-UIRT as the Controlled-By for the device, hitting A/V Properties for the A/V device and then hitting New Code for the code I want to learn and then aiming the remote at the USB-UIRT and hitting the button.  That gets me nothing, at all.

Alternatively, I think I have the lircd.conf file for my satellite receiver.  hand editing /etc/lircd/lircd.conf seems to be a no go as no sooner do i edit it, restart lircd and try to run irsend, than some process overwrites the lircd.conf file back to what it was before!

Alternate number 2, does anyone know of a way to convert lirc codes to Pronto codes i could hand enter through the web admin?
Title: Re: USB-UIRT Learning
Post by: tkmedia on February 15, 2008, 12:17:24 AM
Make sure within 12" of usbuirt when trying to learn from remote, a  fresh set of batterys wouldn't hurt either.
Title: Re: USB-UIRT Learning
Post by: Venom986 on February 15, 2008, 01:07:33 AM
well, was within inches.  maybe the batteries are old though, i'll try new ones.  so it SHOULD work the way i described then?
Title: Re: USB-UIRT Learning
Post by: Venom986 on February 15, 2008, 01:33:38 AM
In case others are having issues, this looks like a promising list of helpful hints: http://www.remotecentral.com/features/irtips.htm
Title: Re: USB-UIRT Learning
Post by: Venom986 on February 15, 2008, 04:35:28 AM
So, I think the fresh batteries helped some, but moreso, it helped to double check that my changes to the database through the web admin tool had actually stuck as far as having moved my USB-UIRT from the MD to the core for learning codes.  Turns out it still thought it was attached to the MD so wasn't being set to learning mode when I hit new code.

I now have codes for all the pertinent buttons.  Just have to figure out how to set up to use the channel changing script in mythtv (and then see if I can swap over to using the mce transmitter now that i know the codes since i need the USB-UIRT back on the MD)
Title: Re: USB-UIRT Learning
Post by: Venom986 on February 15, 2008, 06:20:41 AM
Status update.

I have the codes input into my device in the web admin.  If I hit the Test Code button there for the digit buttons, I properly get a single press of that digit registered on the receiver.

Now, I went on to trying to use /usr/pluto/bin/TuneToChannel.sh script.  Running this from the commandline I got a lot of errors.  A few things were wrong:


anyone with more experience want to step in with suggestions?
Title: Re: USB-UIRT Learning
Post by: Venom986 on February 15, 2008, 07:04:39 AM
Looking at the USB-UIRT log I see the following differences (trying to send the key '3').

If I use the Test Code button in the A/V properties page for the satellite box, the log shows


10      02/15/08 1:01:20.798            Receive string: MESSAGE 451            <0x42003950>
10      02/15/08 1:01:20.798            Received MESSAGE 451            0x651940 device: 54 <0x42003950>
10      02/15/08 1:01:20.799            Received Message type 1 ID 191 from 0 to 54 (device: 54) resp 0 <0x42003950>
10      02/15/08 1:01:20.799            UsbUirt Sending with repeat 1: 0000 0048 0000 0024 0017 0163 0017 00A2 0017 00A2 0017 00A2 0017 0062 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 00A2 0017 00A2 0017 00A2 0017 0062 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 176E <0x42003950>


If I instead use the TuneToChannel.sh script:

10      02/15/08 1:02:06.042            Receive string: MESSAGE 78             <0x42003950>
10      02/15/08 1:02:06.042            Received MESSAGE 78             0x651940 device: 54 <0x42003950>
10      02/15/08 1:02:06.042            Received Message type 1 ID 187 from 0 to 57 (device: 54) resp 0 <0x42003950>
10      02/15/08 1:02:06.051            AVMessageTranslator::Translate begin <0x42003950>
10      02/15/08 1:02:06.054                Status : CMD=187, TP=0, TI=0 last input 0 last power 0 <0x42003950>
05      02/15/08 1:02:06.054            Device id 57 has no number digits parameter. Sending as is with an enter.
<0x42003950>
10      02/15/08 1:02:06.054            Sending digit 3... <0x42003950>
10      02/15/08 1:02:06.054            Sending <enter>... <0x42003950>
10      02/15/08 1:02:06.054            AVMessageTranslator::Translate begin <0x42003950>
10      02/15/08 1:02:06.054                Status : CMD=207, TP=0, TI=0 last input 0 last power 0 <0x42003950>
10      02/15/08 1:02:06.054            AVMessageTranslator::Translate end <0x42003950>
10      02/15/08 1:02:06.054            AVMessageTranslator::Translate begin <0x42003950>
10      02/15/08 1:02:06.054                Status : CMD=190, TP=0, TI=0 last input 0 last power 0 <0x42003950>
10      02/15/08 1:02:06.054            AVMessageTranslator::Translate end <0x42003950>
05      02/15/08 1:02:06.054            #### Pre-Process Queue = 2 <0x42003950>
05      02/15/08 1:02:06.068            _QueueProc Pre - 207 : 0 <0x42804950>
10      02/15/08 1:02:06.068            _QueueProc ------- 207 <0x42804950>
05      02/15/08 1:02:06.069            GSD-Sleep Pre 207 : 0 <0x42804950>
10      02/15/08 1:02:06.069            In IRBase::DispatchMessage <0x42804950>
10      02/15/08 1:02:06.069            Sending Infrared Code for dev <57> cmd <207>, channel <>, repeat <4> code <0000 0048 0000 0024 0017 0163 0017 00A2 0017 00A2 0017 00A2 0017 0062 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 00A2 0017 00A2 0017 00A2 0017 0062 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 176E> <0x42804950>
10      02/15/08 1:02:06.069            pos 380 size 379 Checking 0000 0048 0000 0024 0017 0163 0017 00A2 0017 00A2 0017 00A2 0017 0062 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 00A2 0017 00A2 0017 00A2 0017 0062 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 176E
for multiple codes, got: 0000 0048 0000 0024 0017 0163 0017 00A2 0017 00A2 0017 00A2 0017 0062 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 00A2 0017 00A2 0017 00A2 0017 0062 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 176E <0x42804950>
10      02/15/08 1:02:06.069            UsbUirt Sending with repeat 4: 0000 0048 0000 0024 0017 0163 0017 00A2 0017 00A2 0017 00A2 0017 0062 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 00A2 0017 00A2 0017 00A2 0017 0062 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 176E <0x42804950>
05      02/15/08 1:02:07.264            GSD-Sleep Post 207 : 250 <0x42804950>
05      02/15/08 1:02:07.265            _QueueProc Post - 207 : 250 <0x42804950>
05      02/15/08 1:02:07.265            _QueueProc Pre - 190 : 0 <0x42804950>
10      02/15/08 1:02:07.265            _QueueProc ------- 190 <0x42804950>
05      02/15/08 1:02:07.265            GSD-Sleep Pre 190 : 0 <0x42804950>
10      02/15/08 1:02:07.265            In IRBase::DispatchMessage <0x42804950>
10      02/15/08 1:02:07.265            Sending Infrared Code for dev <57> cmd <190>, channel <>, repeat <4> code <0000 0048 0000 0046 0017 0163 0017 00A2 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 00A2 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0164 0017 00A2 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 00A2 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 1774> <0x42804950>
10      02/15/08 1:02:07.265            pos 720 size 719 Checking 0000 0048 0000 0046 0017 0163 0017 00A2 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 00A2 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0164 0017 00A2 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 00A2 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 1774
for multiple codes, got: 0000 0048 0000 0046 0017 0163 0017 00A2 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 00A2 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0164 0017 00A2 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 00A2 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 1774 <0x42804950>
10      02/15/08 1:02:07.265            UsbUirt Sending with repeat 4: 0000 0048 0000 0046 0017 0163 0017 00A2 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 00A2 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0164 0017 00A2 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 00A2 0017 0062 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 00A2 0017 0163 0017 1774 <0x42804950>
Return code: 139
3       02/15/08 01:02:07       54 (spawning-device)    Device died... count=8/50 dev=54


Now, ignoring for the fact that everytime it gives that device died message....the channel changing script seems to forcing a repeat of 4.  Why would it do that?  that means its going to fire 4 of each button press for the channel I request and that is, I assume, what is causing the issues here.
Title: Re: USB-UIRT Learning
Post by: Zaerc on February 15, 2008, 01:47:07 PM
Quote from: Venom986 on February 15, 2008, 06:20:41 AM...

  • There were ^M characters terminating lines.  Someone obviously edited this in a non-text editor.  I removed the control characters in my copy.
...

That is typical for a dos text file as they contain both CR and LF characters.  Sorry but I can't help you with the other stuff as I haven't gotten around to messing with IR myself...
Title: Re: USB-UIRT Learning
Post by: Venom986 on February 15, 2008, 02:06:49 PM
I went back to using the receiver/transmitter that came with the PVR-150, and setting up lirc for it.  I have learned a lot, and have it working.  I will be updating a bunch of wiki pages and forum posts with the results and instructions for others.

I have updated the SAT_3100 remote device template (does this sync back to the servers?) with the following lircd.conf: http://lirc.sourceforge.net/remotes/dishnet/Dish_Network which is an EXCELLENT piece of work and contains entries for all 16 remote addresses supported by the slew of receivers from DishNetwork, Echostar, Expressvu (the 3.1IR, which has the blue buttons).  Having that entered in the device template, and copying a very simple channel change script I now have the MCE IRBlaster changing channels on my ExpressVu 4100 receiver.  I even changed the remote address to 6 and its working (I'll be using a second one after I get my config finalized using just one).

oh happy happy day!
Title: Re: USB-UIRT Learning
Post by: seth on February 15, 2008, 04:24:30 PM
 :o

This is excellent news. I have a dish 522 DVR that uses the 301 codeset. Where did you put the lirc.conf file into the template? If i have that peice, my system will be complete. I too was having errors with the learning feature. Omly 1/2 of the number digits would work.  I too used this same conf file you posted the link to, with mythtv, and it worked great. But I am not sure where to put it into the template for Dish DVR 522 that I created.

Please post here, the location, and then there will be 1 more Dish Network template added to the collective.

Thanks again for your great work,

Seth  ;D
Title: Re: USB-UIRT Learning
Post by: Venom986 on February 15, 2008, 04:39:21 PM
In the web admin:

*Go to Advanced > Configuration > Device Templates
*In the "Do you know the ID of the device template" box enter 275 (assuming you are using the SAT_3100 template) and click Pick Device Template
*In the template page that opens, scroll down to Device Data section
*You need to copy and paste your lircd.conf file into the text area for Default Value (I first cut the existing out and saved it to a file just in case, then pasted the other one in).
*Save the changes to the template and then force a reload of the router.

Assuming you've also followed the other instructions for creating a channel changing script and adding a remote that uses that device template to your media director it should work.
Title: Re: USB-UIRT Learning
Post by: Venom986 on February 15, 2008, 04:40:34 PM
Other posts to pull all this together:

http://forum.linuxmce.org/index.php?topic=4307.0
http://wiki.linuxmce.org/index.php/Windows_MCE_Receiver#Support
Title: Re: USB-UIRT Learning
Post by: andymck on February 16, 2008, 01:24:32 AM
Fantastic Venom!

I will give this a try on my setup on saturday....looks like it could be the final piece in my mythtv puzzle...
Title: Re: USB-UIRT Learning
Post by: andymck on February 17, 2008, 09:06:11 PM
Venom, just to let you know your solution worked a treat for me..thanks very much...your effort is much appreciated.

MythTV is working good, well except for the crash bug that creeps in randomly freezing the frontend....
Title: Re: USB-UIRT Learning
Post by: Venom986 on February 17, 2008, 10:09:51 PM
Excellent, glad it worked out for you!  I seem to have things to the point now where I can make use of both my satellite boxes (one attached to the core, one to my MD int he living room) from either the core or MD (PiP working too).