Difference between revisions of "Add support for new remote controls"

From LinuxMCE
Jump to: navigation, search
(Category:InfraRed -> Infrared)
(refactored, added complete USB UIRT instructions)
Line 1: Line 1:
<p><h1>How to set it up</h1></p>
+
===Overview===
<p>LinuxMCE's infrared remote control module is based on LIRC.  See http://lirc.org/ for details.  LIRC includes an 'IR Record' utility to build a configuration file for a new remote control.  Once you do that, then in LinuxMCE Admin choose 'Advanced', 'Device Templates'.  Choose the manufacturer, for the Category choose Peripherals, Remote Controls, LIRC Remote controls.  Type in the model of the remote and click 'add'.  Then edit the device, add a device data "Configuration" and copy the LIRC configuration file into it.</p>
+
In general, adding support for a new remote control is accomplished by pressing each button and capturing a key code sent by the remote.  Once the key code captured for each key, they are organized into a map that is used to configure LinuxMCE.
  
<p>The Programming Guide in [[Control LinuxMCE using an Infrared remote]] explains how it all works, and also how to use it.</p>
+
===Receiver Hardware===
 +
There are a variety of different infrared (IR) receivers that work with LinuxMCEInfrared receivers are small pieces of hardware that have an infrared-sensitive "eye" and plug into a computer.  Some examples of LinuxMCE compatible IR receivers are [[USB UIRT]], [[Tira]], and [[IRTrans]].
  
<p>
+
===Receiver Software===
[[Adding iMON PAD]] explains how to add it to the LinnuxMCE.
+
For some IR receivers, the best support is via [http://lirc.org/ LIRC], while for others, purpose-built LinuxMCE drivers are available.
</p>
+
  
<p><h1>How to use it</h1></p>
+
===Learning Is Specific to Combination of Receiver and Remote===
<p>[[Control LinuxMCE using an Infrared remote]]</p>
+
The key code that is captured when a button is pressed depends on both the remote control model ''and'' the receiver model.  That is, the key codes that you capture from a [[Windows MCE Remote]] with USB UIRT are different from those captured with Tira or IRTrans. 
 +
 
 +
===Adding Support for a New Remote using a USB UIRT Receiver===
 +
''The technique in this section was originally provided by User:Skeptic in [http://forum.linuxmce.org/index.php?topic=4901.msg28630#msg28630 this forum post].''
 +
 
 +
To add support for a new remote using USB UIRT as a receiver, perform the steps below.  Note that most of the configuration is performed through the Admin Page:
 +
 
 +
:1. Verify USB UIRT is installed and configured:  Once you plug in the USB UIRT it should be plug and play and add both the '''USB UIRT''' device as well as the '''Windows XP MCE Remote (USBUIRT)'''.  Go to '''Wizard->devices->media directors'''.  Near the bottom of the page you should see the MCE remote listed, with the '''Infrared Receivers''' pulldown set to '''USB UIRT 0038'''.
 +
 
 +
:2. Create a new template for your remote: Go to '''Advanced->Configuration->Device Templates''' and click '''Add Device'''.  This will open the '''Add device template window'''.  Enter the name or model # of the remote into the text box and click '''Add'''.
 +
[[image:USB UIRT new remote.jpg|right|thumb|128px|screenshot details for steps 3 to 5]]
 +
 
 +
:3. Configure the remote correctly:  Go to '''Advanced->Configuration->Device Templates''', find the remote you just added (you may have to refresh your browser to see it), and click the '''Pick Template''' button.  This brings up the '''Edit Device Template''' window.  Change the '''Device Category''' to '''Peripherals - Remote Controls - USB-UIRT Remote Controls'''.  Select the correct manufacturer for your remote.
 +
 
 +
:4. Get the USB UIRT device ID: From the bottom of the left pane on the Admin Page, click '''Show devices tree'''.  In the tree, click '''USB UIRT 0038'''.  Find the device number in the title of the '''Device Info''' block.  For example, '''Device Info #50''' indicates that the USB UIRT is device #50.
 +
 
 +
:5. Capture the key codes: In a terminal window, enter the command <code>tail -f /var/log/pluto/XX_USB_UIRT_0038.log</code> where XX is the device number you found in the previous step.  Press a button on the remote control twice.  You should see something like this:
 +
05      05/16/08 19:29:18.757          Cannot find anything for IR 1500003E3CFC <0x40800950>
 +
05      05/16/08 19:29:19.021          Cannot find anything for IR 1700009E0FC0 <0x40800950>
 +
:The numbers <code>1500003E3CFC</code> and <code>1700009E0FC0</code> are the key codes for that button.  If the two numbers are the same, then there is only one key code for that button.  Make a text file in the same format as this file: example USB UIRT key codes file.txt replacing the key codes for each buttons with the ones that you capture.
 +
 
 +
:6. Add the Configuration (string): In the '''Device Data''' box select '''Configuration'''.  Paste the key codes you created in the last step into the '''Default Value''' field.  Click the '''Use Master Device List Defaults''' box.
 +
 
 +
:7. Add the Remote Layout (String): In the Device Data box, add the new parameter '''Remote Layout (String)'''.  In the '''Default Value''' field enter W.
 +
 
 +
:8. Click '''Save''' then '''Close''' to close the '''Edit Device Template''' window.
 +
 
 +
:9. Add the remote:  Go to '''Wizard->devices->Media Directors''' and scroll to the media director that you want to control with the remote.  Click '''Add Remote''' then select the remote template you just created from the '''Device Template''' drop-down.  Click '''Pick Template''' and then back on the Media Director page, click '''Update'''.  After this you should be prompted to reload the router, if not do a quick reload.
 +
 
 +
Once the router reloads, you should have a working remote.
 +
 
 +
 
 +
===LIRC===
 +
LinuxMCE's infrared remote control module is based on LIRC.  See http://lirc.org/ for details.  LIRC includes an 'IR Record' utility to build a configuration file for a new remote control.  Once you do that, then in LinuxMCE Admin choose 'Advanced', 'Device Templates'.  Choose the manufacturer, for the Category choose Peripherals, Remote Controls, LIRC Remote controls.  Type in the model of the remote and click 'add'.  Then edit the device, add a device data "Configuration" and copy the LIRC configuration file into it.
 +
 
 +
The Programming Guide in [[Control LinuxMCE using an Infrared remote]] explains how it all works, and also how to use it.
 +
 
 +
[[Adding iMON PAD]] explains how to add it to the LinnuxMCE.
  
<p><h1>Programmer's guide</h1></p>
+
===Related Topics===
<p>[[Control LinuxMCE using an Infrared remote]]</p>
+
[[Control LinuxMCE using an Infrared remote]]
  
 
[[Category:Input]]
 
[[Category:Input]]
 
[[Category:Infrared]]
 
[[Category:Infrared]]
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]

Revision as of 05:19, 17 May 2008

Overview

In general, adding support for a new remote control is accomplished by pressing each button and capturing a key code sent by the remote. Once the key code captured for each key, they are organized into a map that is used to configure LinuxMCE.

Receiver Hardware

There are a variety of different infrared (IR) receivers that work with LinuxMCE. Infrared receivers are small pieces of hardware that have an infrared-sensitive "eye" and plug into a computer. Some examples of LinuxMCE compatible IR receivers are USB UIRT, Tira, and IRTrans.

Receiver Software

For some IR receivers, the best support is via LIRC, while for others, purpose-built LinuxMCE drivers are available.

Learning Is Specific to Combination of Receiver and Remote

The key code that is captured when a button is pressed depends on both the remote control model and the receiver model. That is, the key codes that you capture from a Windows MCE Remote with USB UIRT are different from those captured with Tira or IRTrans.

Adding Support for a New Remote using a USB UIRT Receiver

The technique in this section was originally provided by User:Skeptic in this forum post.

To add support for a new remote using USB UIRT as a receiver, perform the steps below. Note that most of the configuration is performed through the Admin Page:

1. Verify USB UIRT is installed and configured: Once you plug in the USB UIRT it should be plug and play and add both the USB UIRT device as well as the Windows XP MCE Remote (USBUIRT). Go to Wizard->devices->media directors. Near the bottom of the page you should see the MCE remote listed, with the Infrared Receivers pulldown set to USB UIRT 0038.
2. Create a new template for your remote: Go to Advanced->Configuration->Device Templates and click Add Device. This will open the Add device template window. Enter the name or model # of the remote into the text box and click Add.
screenshot details for steps 3 to 5
3. Configure the remote correctly: Go to Advanced->Configuration->Device Templates, find the remote you just added (you may have to refresh your browser to see it), and click the Pick Template button. This brings up the Edit Device Template window. Change the Device Category to Peripherals - Remote Controls - USB-UIRT Remote Controls. Select the correct manufacturer for your remote.
4. Get the USB UIRT device ID: From the bottom of the left pane on the Admin Page, click Show devices tree. In the tree, click USB UIRT 0038. Find the device number in the title of the Device Info block. For example, Device Info #50 indicates that the USB UIRT is device #50.
5. Capture the key codes: In a terminal window, enter the command tail -f /var/log/pluto/XX_USB_UIRT_0038.log where XX is the device number you found in the previous step. Press a button on the remote control twice. You should see something like this:
05      05/16/08 19:29:18.757           Cannot find anything for IR 1500003E3CFC <0x40800950>
05      05/16/08 19:29:19.021           Cannot find anything for IR 1700009E0FC0 <0x40800950>
The numbers 1500003E3CFC and 1700009E0FC0 are the key codes for that button. If the two numbers are the same, then there is only one key code for that button. Make a text file in the same format as this file: example USB UIRT key codes file.txt replacing the key codes for each buttons with the ones that you capture.
6. Add the Configuration (string): In the Device Data box select Configuration. Paste the key codes you created in the last step into the Default Value field. Click the Use Master Device List Defaults box.
7. Add the Remote Layout (String): In the Device Data box, add the new parameter Remote Layout (String). In the Default Value field enter W.
8. Click Save then Close to close the Edit Device Template window.
9. Add the remote: Go to Wizard->devices->Media Directors and scroll to the media director that you want to control with the remote. Click Add Remote then select the remote template you just created from the Device Template drop-down. Click Pick Template and then back on the Media Director page, click Update. After this you should be prompted to reload the router, if not do a quick reload.

Once the router reloads, you should have a working remote.


LIRC

LinuxMCE's infrared remote control module is based on LIRC. See http://lirc.org/ for details. LIRC includes an 'IR Record' utility to build a configuration file for a new remote control. Once you do that, then in LinuxMCE Admin choose 'Advanced', 'Device Templates'. Choose the manufacturer, for the Category choose Peripherals, Remote Controls, LIRC Remote controls. Type in the model of the remote and click 'add'. Then edit the device, add a device data "Configuration" and copy the LIRC configuration file into it.

The Programming Guide in Control LinuxMCE using an Infrared remote explains how it all works, and also how to use it.

Adding iMON PAD explains how to add it to the LinnuxMCE.

Related Topics

Control LinuxMCE using an Infrared remote