Author Topic: USB-UIRT Learning  (Read 9327 times)

Venom986

  • Veteran
  • ***
  • Posts: 74
    • View Profile
USB-UIRT Learning
« 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?

tkmedia

  • wants to work for LinuxMCE
  • **
  • Posts: 937
    • View Profile
    • LMCECompatible
Re: USB-UIRT Learning
« Reply #1 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.
My Setup http://wiki.linuxmce.org/index.php/User:Tkmedia

For LinuxMce compatible  systems and accessories
http://lmcecompatible.com/

Venom986

  • Veteran
  • ***
  • Posts: 74
    • View Profile
Re: USB-UIRT Learning
« Reply #2 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?

Venom986

  • Veteran
  • ***
  • Posts: 74
    • View Profile
Re: USB-UIRT Learning
« Reply #3 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

Venom986

  • Veteran
  • ***
  • Posts: 74
    • View Profile
Re: USB-UIRT Learning
« Reply #4 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)

Venom986

  • Veteran
  • ***
  • Posts: 74
    • View Profile
Re: USB-UIRT Learning
« Reply #5 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:

  • There were ^M characters terminating lines.  Someone obviously edited this in a non-text editor.  I removed the control characters in my copy.
  • It was very unclear on the wiki what you had to pass as the Source ID.  I started trying to pass /dev/video0.  It turns out this is simply the numeric source id of the Source associated with the channel in mythtv.  In my case I have one tuner card, set up one source for it and that source got id 1.
  • So, now the TuneToChannel.sh script runs, but it is sending unexpected codes (looks like repeating codes of the first digit in the channel number I ask for?)

anyone with more experience want to step in with suggestions?

Venom986

  • Veteran
  • ***
  • Posts: 74
    • View Profile
Re: USB-UIRT Learning
« Reply #6 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

Code: [Select]
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:
Code: [Select]
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.

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: USB-UIRT Learning
« Reply #7 on: February 15, 2008, 01:47:07 pm »
...
  • 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...
"Change is inevitable. Progress is optional."
-- Anonymous


Venom986

  • Veteran
  • ***
  • Posts: 74
    • View Profile
Re: USB-UIRT Learning
« Reply #8 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!

seth

  • Guru
  • ****
  • Posts: 485
  • A day w/o LinuxMCE is like a day w/o sunshine!
    • View Profile
Re: USB-UIRT Learning
« Reply #9 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
".....Because Once you've LinuxMCE'd....."
System stats located at my user page:

http://wiki.linuxmce.org/index.php/User:Seth

Venom986

  • Veteran
  • ***
  • Posts: 74
    • View Profile
Re: USB-UIRT Learning
« Reply #10 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.

Venom986

  • Veteran
  • ***
  • Posts: 74
    • View Profile
Re: USB-UIRT Learning
« Reply #11 on: February 15, 2008, 04:40:34 pm »

andymck

  • Regular Poster
  • **
  • Posts: 23
    • View Profile
Re: USB-UIRT Learning
« Reply #12 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...

andymck

  • Regular Poster
  • **
  • Posts: 23
    • View Profile
Re: USB-UIRT Learning
« Reply #13 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....

Venom986

  • Veteran
  • ***
  • Posts: 74
    • View Profile
Re: USB-UIRT Learning
« Reply #14 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).