Author Topic: lirc remotes - I just don't get it. **success**  (Read 7993 times)

skeptic

  • Addicted
  • *
  • Posts: 615
    • View Profile
lirc remotes - I just don't get it. **success**
« on: April 04, 2008, 08:52:21 pm »
I have a USBUIRT, and have managed to get things set to where lmce/usbuirt can control my TV (as far as I can tell) and my DirectTV sat box.  As the DirectTV was not listed, I had to add the AV codes one by one by pushing a button on the remote and letting it read. 

However, for the life of me I can't get any remote to control LMCE itself, I'm stuck with keyboard and mouse.  None of my remotes are ones that already exist in LMCE and I must be doing something wrong when trying to add new ones.  I followed this wiki guide using the lirc config for my streamzap remote, but the remote doesn't do anything:  http://wiki.linuxmce.org/index.php/Add_support_for_new_remote_controls

Please don't tell me to just buy yet another remote.
« Last Edit: April 07, 2008, 07:08:11 pm by skeptic »

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: lirc remotes - I just don't get it.
« Reply #1 on: April 04, 2008, 11:25:48 pm »
I have a USBUIRT, and have managed to get things set to where lmce/usbuirt can control my TV (as far as I can tell) and my DirectTV sat box.  As the DirectTV was not listed, I had to add the AV codes one by one by pushing a button on the remote and letting it read. 

However, for the life of me I can't get any remote to control LMCE itself, I'm stuck with keyboard and mouse.  None of my remotes are ones that already exist in LMCE and I must be doing something wrong when trying to add new ones.  I followed this wiki guide using the lirc config for my streamzap remote, but the remote doesn't do anything:  http://wiki.linuxmce.org/index.php/Add_support_for_new_remote_controls

Please don't tell me to just buy yet another remote.
What LMCE does is to use and start pretty generic lirc environment. I also had a lot of problems but then tried to search for problems by manually starting various lirc utilities to see first if remote is working and then why LMCE is not getting any data...

HTH,

regards,

Bulek.
Thanks in advance,

regards,

Bulek.

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: lirc remotes - I just don't get it.
« Reply #2 on: April 05, 2008, 10:40:54 am »
I have a USBUIRT, and have managed to get things set to where lmce/usbuirt can control my TV (as far as I can tell) and my DirectTV sat box.  As the DirectTV was not listed, I had to add the AV codes one by one by pushing a button on the remote and letting it read. 

However, for the life of me I can't get any remote to control LMCE itself, I'm stuck with keyboard and mouse.  None of my remotes are ones that already exist in LMCE and I must be doing something wrong when trying to add new ones.  I followed this wiki guide using the lirc config for my streamzap remote, but the remote doesn't do anything:  http://wiki.linuxmce.org/index.php/Add_support_for_new_remote_controls

Please don't tell me to just buy yet another remote.

Hmmm... well i would suggest at least 'borrowing' someones MCE remote to prove that you have a working installation and that your USBUIRT is functioning. The once you have determined that then you can move forwards.

When a USBUIRT is attached to a Core or an MD the PnP system will detect it an by default will add the USBUIRT tranceiver and a MCE USBUIRT Remote. So to prove thats working ok I would suggest going into Web Admin -> Wizard -> Devices -> Media Directors and then scroll to the MD that has your USBUIRT attached and delete the current remote (use the 'delete' link next to its name). Now scroll to the bottom of the page and click the 'Update' button to save your changes. Next detach your USBUIRT and wait for the messages in the top left hand corner of the Orbiters screen to stop displaying (the message will tell you that it is uninstalling the USBUIRT... which is exactly our objective... so don't panic!). Now do a reload router and when the reload has completed re-attach the USBUIRT. Now you should see more messages in the top left hand corner of the Orbiters screen as the USBUIRT is software is reinstalled and configured for you... and a screen at the end will confirm that new software has been installed for your new device.

Now go back to Web Admin -> Wizard -> Devices -> Media Directors and then scroll to the MD that has your USBUIRT attached and check that 'Infrared receivers' is set to 'USB UIRT 0038' and that 'Windows XP USBUIRT Remote' is set as the Remote (if it isn't then click 'Add remote' and add one from the 'Device Template' popup and then click 'Add Device' and then scroll to the bottom of the page and click 'Update').

Now back in your Orbiter test the MCE remote... it should now be working. If it is you can at least now move forwards on the basis that the issue is related to the remotes you have been previously testing and they clearly either do not have a template (likely) or possibly emit some non-standard IR (unlikely).

Hope the above helps

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

royw

  • Guru
  • ****
  • Posts: 261
    • View Profile
Re: lirc remotes - I just don't get it.
« Reply #3 on: April 05, 2008, 07:02:21 pm »
I have to totally agree with skeptic.  If you do not have a recognized remote you are just about totally out of luck with LMCE.

Just how bad is it?  The wiki page basically says use irrecord and see the lirc web site for info on how to use it. The lirc says basically to just run "irrecord filename".  irrecord then errors out saying it can't open /dev/lirc.

I happen to have 4 ir remotes sitting next to me and none are supported.  What I want to do is simply say create new ir remote, then be prompted to push the buttons on the remote for the commands that LMCE uses.

I'm at the frustration level where I give up on ir remotes and just use the gyro mouse and n800...

Have fun,
Roy

skeptic

  • Addicted
  • *
  • Posts: 615
    • View Profile
Re: lirc remotes - I just don't get it.
« Reply #4 on: April 05, 2008, 07:14:43 pm »
Unfortunately I don't have access to an MCE remote unless I go buy one.   :'(

I removed the existing remotes other than the MCE one, update, unplugged the USBUIRT (and saw the messages), reloaded the router, plugged the USBUIRT back in (and saw the messages).  At that point I added my remote using the template I previously created (including copying a known working lircd config into the configuration box), and when prompted did a quick reload.

I now have 2 remotes configured for my core/md, the MCE remote and the streamzap I'm trying to get working.  The infrared receiver is set to USB UIRT 0038.  Still no go.

I did notice one thing when I click on the remote and pull up the device window, the configuration seems quite a bit different between the two remotes.  The remote I added has stuff like begin remote, name, bits, flags, begin codes, etc. with the codes being something very short.  i.e. 0 is 0x00.  The MCE remote shows just the key name and a a much longer code in the config box.

Should I not be using a normal lirc config file for the streamzap remote c&p'd into the config box for this?  Is there a way to read in the codes for each key from the web admin page by learning them the same way I did for learning the codes to control my TV/Sat box?

Should lircd be running right now?  When I try to run irrecord it tells me lircd is not running (and it isn't). 

skeptic

  • Addicted
  • *
  • Posts: 615
    • View Profile
Re: lirc remotes - I just don't get it.
« Reply #5 on: April 05, 2008, 07:18:59 pm »
I have to totally agree with skeptic.  If you do not have a recognized remote you are just about totally out of luck with LMCE.

Just how bad is it?  The wiki page basically says use irrecord and see the lirc web site for info on how to use it. The lirc says basically to just run "irrecord filename".  irrecord then errors out saying it can't open /dev/lirc.

I happen to have 4 ir remotes sitting next to me and none are supported.  What I want to do is simply say create new ir remote, then be prompted to push the buttons on the remote for the commands that LMCE uses.

I'm at the frustration level where I give up on ir remotes and just use the gyro mouse and n800...

Have fun,
Roy
You're reply came in while I was working through the setup (doing each step recommended, watching the output, updating my reply).

The page where you set the ir codes to control other boxes worked great.  For each key, just click a button, point the remote at the USBUIRT and hit the right button, an presto it built a working config.  I couldn't find a similar setup for just a plain old remote, but if it existed (or was pointed out where to find it) this would solve these issues for a bunch of people.

royw

  • Guru
  • ****
  • Posts: 261
    • View Profile
Re: lirc remotes - I just don't get it.
« Reply #6 on: April 06, 2008, 02:44:35 am »
The page where you set the ir codes to control other boxes worked great.  For each key, just click a button, point the remote at the USBUIRT and hit the right button, an presto it built a working config.  I couldn't find a similar setup for just a plain old remote, but if it existed (or was pointed out where to find it) this would solve these issues for a bunch of people.

Yep, learning commands to emit to devices is pretty slick.  That's probably what raised the expectation bar too high for something as simple as teaching the LMCE to respond to a few ir commands...

Have fun,
Roy

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: lirc remotes - I just don't get it.
« Reply #7 on: April 06, 2008, 07:14:01 pm »
I have to dispel something here:

the USB UIRT, is _NOT_ an LIRC device. Please do not keep sptreading around that LMCE uses LIRC.. LIRC is just one of the many IR protocols that emit to the system. the driver that is used, is a custom driver specifically for LinuxMCE. the lirc tools will NOT work with it, hey are not needed..

By default, the Windows XP Remote device template is paired with the USB UIRT. You can look at this driver to see the different button and code commands in the device data.

-Thom

skeptic

  • Addicted
  • *
  • Posts: 615
    • View Profile
Re: lirc remotes - I just don't get it.
« Reply #8 on: April 06, 2008, 07:43:36 pm »
I'm starting to think the Configuration in Device Data is just plain wrong.  When to do tail -f  /var/log/pluto/53_USB_UIRT_0038.log, I see entries such as this show up when I press keys on my remotes:
05      04/06/08 10:50:25.651           Cannot find anything for IR 170000B097C2 <0x40800950>

I'm also seeing that lircd isn't running, and the config files in /etc/lircd/ are basically empty as well.  The fact that the USB_UIRT log shows events while lircd isn't running tells me lmce doesn't rely on lircd, at least not when using USB_UIRT.  No idea how this will affect MythTV, but one step at a time.

I'm happy to test, try, experiment, etc. in the hopes of getting something that will help others as well as myself, but I'm running out of ideas.  I even tried to buy an MCE remote just to test and use for the core/md, but I don't want to have to spend extra money for remotes for every md I setup when I have several perfectly good remotes just laying around. 


edit:  tschak909's comment came in while I was typing this up, it pretty much spells out what I was figuring out about lirc

So help me understand something then, as I was told I pretty much had to go with USB UIRT, and the lirc configuration does not work, are there any tools to map other remote controls to the USB UIRT type config (the mapping the log files shows is not found)? 

Does LMCE send the USB UIRT controls to MythTV as well, or am I going to be stuck running lirc in addition to USB UIRT to control everything?

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: lirc remotes - I just don't get it.
« Reply #9 on: April 06, 2008, 09:09:31 pm »
it works just fine with MythTV. LMCE translates the controls between the applications.

-Thom

skeptic

  • Addicted
  • *
  • Posts: 615
    • View Profile
Re: lirc remotes - I just don't get it.
« Reply #10 on: April 06, 2008, 10:43:10 pm »
Great, so then it appears I just need to get the USB UIRT codes for my non-MCE remote.  Any advice for getting those codes?

It also appears I can't edit the Configuration of existing Remotes, I can't even highlight the configuration to c&p it somewhere else.  Where can I edit the config?

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: lirc remotes - I just don't get it.
« Reply #11 on: April 06, 2008, 10:45:01 pm »
you can create a new device template, and use the Windows XP Remote as the basis for the template. As for getting the codes, not sure yet.. this requires some research.

-Thom

skeptic

  • Addicted
  • *
  • Posts: 615
    • View Profile
Re: lirc remotes - I just don't get it.
« Reply #12 on: April 07, 2008, 02:11:18 am »
Finally making some good progress with the streamzap remote.  I have it where it actually controls both lmce and MythTV.  Not full functionality, there is no equivalent to "m" on the keyboard, but pressing the green button brings up the lmce overlay where you can choose things like program guide.

The big remaining issue is you have to press some of the buttons twice to get them to perform their function, including the direction keys which I'll probably use most.   ???  I modified the configuration (after finding where to do that) and added the same code a second time for each key, but it didn't make any difference.  In looking at the codes for the MCE remote, I see each key has two codes as well, but the the each code of each pair is slightly different. 

Once I get all the bugs worked out, I'll post the steps I took.  Until then, if anyone has any ideas on solving the issue of needing to push the keys twice I'd love to heat them.

royw

  • Guru
  • ****
  • Posts: 261
    • View Profile
Re: lirc remotes - I just don't get it.
« Reply #13 on: April 07, 2008, 08:49:40 am »
I have to dispel something here:

the USB UIRT, is _NOT_ an LIRC device. Please do not keep sptreading around that LMCE uses LIRC.. LIRC is just one of the many IR protocols that emit to the system. the driver that is used, is a custom driver specifically for LinuxMCE. the lirc tools will NOT work with it, hey are not needed..

So http://wiki.linuxmce.org/index.php/Add_support_for_new_remote_controls is just plain wrong?

Thank you,
Roy

skeptic

  • Addicted
  • *
  • Posts: 615
    • View Profile
Re: lirc remotes - I just don't get it.
« Reply #14 on: April 07, 2008, 05:02:49 pm »
I have to dispel something here:

the USB UIRT, is _NOT_ an LIRC device. Please do not keep sptreading around that LMCE uses LIRC.. LIRC is just one of the many IR protocols that emit to the system. the driver that is used, is a custom driver specifically for LinuxMCE. the lirc tools will NOT work with it, hey are not needed..

So http://wiki.linuxmce.org/index.php/Add_support_for_new_remote_controls is just plain wrong?

Thank you,
Roy
I wouldn't go so far as to say it's wrong, just that it doesn't apply to using USB_UIRT.  Realizing that USB_UIRT is not configured as a lircd device was a big help in getting this far.  Once I get the bugs worked out I'll post up the steps I took to get it going, but the key items I had to do after trying to follow the wiki as well as forum posts were:

Advanced->Device Templates->find the streamzap remote->pick device template
   Set the device category to Peripherals - Remote Controls - USB UIRT Remote Controls
   In the Device Data box add both a Configuration(String) and Remote Layout (String) entries
 

For the Configuration(String) I grabbed the config for the MCE remote (USB UIRT) for the button names.  Then I did a tail -f on /var/log/pluto/53_USB_UIRT_0038.log and as I pressed each button on the remote I grabbed the code from the error message and built a configuration from that.   BTW, I did this in OO Word Processor, not the web page.  The box is way to small to be useful for this.

For the Remote Layout (String) entry I just copied the one for the MCE Remote.  I have no idea what the default layout of "W" is, but without a Remote Layout (String) entry, the router will not reload.  It loops on an error (apparently 50 tries, but I didn't let it go that far).


I haven't had a chance to try to figure out why most of the buttons need pressed twice.  I suspect I just need a second code for each key like the MCE config.  Not sure if that second code will also show up in the USB_UIRT log or if I have to try to track down some kind of utility, whatever the USBUIRT equivalent to irrecord is, and build it that way.