[LINUX] HOW-TO use all custom buttons of your remote control with LIRC
#76
I had my remote working pre dharma, updated and now its not working, well special buttons aren't working.

I have a Monster Cable remote set up as and MCE Remote

I had some OBC buttons mapped, but they aren't working now Sad

im guessing I need a LircMap.xml file in my .xbmc/userdata/keymaps/LircMap.xml with the obcnumbers in it telling it what corresponding button presses need to do. so I set it up, but still not working Sad

Code:
<lircmap>
  <remote device="mceusb">
        <obc111>RecordTV</obc111>
        <obc112>Teletext</obc112>
        <obc113></obc113>
        <obc114></obc114>
        <obc115>BB2</obc115>
        <obc116>BB3</obc116>
        <obc117>Hash</obc117>
        <obc118>Star</obc118>
  </remote>
</lircmap>

when I press the button on my remote in IRW it says 08w9028409w8r RecordTV mceusb.
etc etc.

so I setup my remote.xml like so

Code:
<keymap>
  <global>
    <remote>
      <play>Play</play>
      <pause>Pause</pause>
      <stop>Stop</stop>
      <forward>FastForward</forward>
      <reverse>Rewind</reverse>
      <left>Left</left>
      <right>Right</right>
      <up>Up</up>
      <down>Down</down>
      <select>Select</select>
      <enter>FullScreen</enter>
      <pageplus>PageUp</pageplus>
      <pageminus>PageDown</pageminus>
      <back>ParentDir</back>
      <menu>PreviousMenu</menu>
      <title>ContextMenu</title>
      <info>Info</info>
      <skipplus>SkipNext</skipplus>
      <skipminus>SkipPrevious</skipminus>
      <display>FullScreen</display>
      <start>PreviousMenu</start>
      <record>Screenshot</record>
      <volumeplus>VolumeUp</volumeplus>
      <volumeminus>VolumeDown</volumeminus>
      <mute>Mute</mute>
      <power>XBMC.ShutDown()</power>
      <myvideo>XBMC.ActivateWindow(VideoLibrary,MovieTitles)</myvideo>
      <mymusic>XBMC.ActivateWindow(MyMusic)</mymusic>
      <mypictures>XBMC.ActivateWindow(MyPictures)</mypictures>
      <mytv>XBMC.ActivateWindow(VideoLibrary,TvShowTitles)</mytv>
      <red>OnClick(14)</red>
      <green>XBMC.ReloadSkin()</green>
      <yellow>XBMC.ActivateWindow(ToggleFullscreen)</yellow>
      <blue>XBMC.ActivateWindow(ShutDownMenu)</blue>
      <zero>Number0</zero>
      <one>Number1</one>
      <two>JumpSMS2</two>
      <three>JumpSMS3</three>
      <four>JumpSMS4</four>
      <five>JumpSMS5</five>
      <six>JumpSMS6</six>
      <seven>JumpSMS7</seven>
      <eight>JumpSMS8</eight>
      <nine>JumpSMS9</nine>
      <ChanUp>PageDown</ChanUp>
      <ChanDown>PageUp</ChanDown>
    </remote>
    <universalremote>
        <obc111>XBMC.ActivateWindow(10025,plugin.video.youtube/,return)</obc111>
        <obc112>RunScript("script.audio.grooveshark")</obc112>
        <obc113>RunScript(script.games.rom.collection.browser)</obc113>
        <obc114>XBMC.ActivateWindow(10025,addons://sources/video/)</obc114>
        <obc115>RunScript(script.xbmc.pandora)</obc115>
        <obc116>XBMC.ActivateWindow(10025,videodb://1/7/21/,return)</obc116>
        <obc117>Hash</obc117>
        <obc118>Star</obc118>
    </universalremote>
  </global>

but none of the universalremote codes are working Sad

-=Jason=-
Reply
#77
@chemass: From the irw output you gave, do you by chance use a »Medion Digitainer Remote Control«, P/N 20018268, FCC ID B4S20018268?

This is the one I have (it features a scroll wheel), and it took me a while to adapt this one—none of the available lircd.conf files seems to fit.

If you want, try my adapted lircd.conf and Lircmap.xml versions:

lircd.conf
Code:
#
# Medion_Digitainer_X10_v3.lircd.conf --> /etc/lirc/lircd.conf
#
# Please make this file available to others
# by sending it to <[email protected]>
#
# this config file was automatically generated (and manually modified)
# using lirc-0.8.7(atilibusb) on Tue Nov  1 14:32:15 2011
#
# contributed by Moonbase ([email protected])
#
# brand: MEDION Digitainer Remote Control (with wheel, sold by Pearl.de)
# model no. of remote control: P/N 20018268, FCC ID B4S20018268, CE 0536
# devices being controlled by this remote: XBMC (via internal USB RF Receiver)
#
# To make the remote and its up/down wheel work smoothly,
# we set a long gap (0,5s) and suppress_repeat 4.
# Verify using irw - you MIGHT want to change the gap value (microseconds).
#
# Notes for this remote:
#
# 1. This is NOT an IR remote (even if pearl.de say so) but a 433 MHz RF remote.
#    It works with USB RF X10 receiver modules (either in the form of an USB plug
#    or as a module, like the one that's built into Medion's "Digitainer" case
#    and connects to an internal USB connector).
#
# 2. The "Setup" or "World" key is labelled with a stylized "D" (from "Digitainer").
#    It is the key also labelled "Select" (the one that lights blue when transmitting).
#
# 3. If using the lirc_atiusb kernel module, one can use more than one of these remotes
#    by appropriately setting the module's "channel acceptance bit mask" in either
#    /etc/modules.conf:
#      options lirc_atiusb mask=0xffff
#    (where 0xffff is default and masks all channels as allowed), or creating a new
#    /etc/modprobe.d/lirc_atiusb.conf.
#    Loading the lirc_atiusb driver with "unique=1,mask=0x10" makes it
#    recognize only ID 5.  Each bit in the mask corresponds to one ID,
#    counting from Bit #0 = ID #1 up to Bit #15 = ID #16.  So "mask=0x21"
#    will let it recognize both IDs #6 and #1, "mask=8" connects only to
#    ID #4, and "mask=0xffff" accepts all.
#    All current Linux variants I know of come with all 16 channels enabled as default,
#    so you only have to modify this if using more than one of these remotes (or your
#    neighbor's HTPC uses the same one, just behind the wall).
#
# 4. The channel on which the remote transmits can be set as follows:
#    a) Press SETUP ("D") until LED goes off; count the number of flashes that follow.
#       The number of flashes shows the channel number the remote is set to transmit on.
#    b) Enter the new channel # as 1..16.
#    c) Press SETUP again. The LED starts flashing again and shows the new channel
#       (= number of flashes).
#
# 5. UP and DOWN acceleration
#    The "up" and "down" key names have a trailing underscore followed by
#    numbers from 0 to 7 to reflect the motion speed of the up/down
#    wheel.  You might remove both characters if you aren't interested in
#    getting acceleration values.

begin remote

  name  Medion_Digitainer_X10
  bits           16
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  pre_data_bits   8
  pre_data       0x14
  post_data_bits  16
  post_data      0x0
#  gap          40030
#  above gap found by
#    irrecord --driver=atilibusb --device=/dev/input/event6 --disable-namespace Medion_Digitainer_X10
  gap        500000
  min_repeat      0
  suppress_repeat 4
#  uncomment to suppress unwanted repeats
  toggle_bit_mask 0x80800000

      begin codes
          Power                    0xD702
          TV                       0x012C
          Video                    0x82AD
          CD/DVD                   0xD904
          Teletext                 0x6B96
          Audio                    0xDB06
          Radio                    0x83AE
          Guide                    0x0631
          Photo                    0x5A85
          Info                     0x042F
          Menu                     0x6E99
          Back                     0xF520
          Left                     0x729D
          Right                    0xF41F
          Wheel-Button             0x739E
          Wheel-Up-0               0x4D78
          Wheel-Up-1               0x4E79
          Wheel-Up-2               0x4F7A
          Wheel-Up-3               0x507B
          Wheel-Up-4               0x517C
          Wheel-Up-5               0x527D
          Wheel-Up-6               0x537E
          Wheel-Up-7               0x547F
          Wheel-Down-0             0x4570
          Wheel-Down-1             0x4671
          Wheel-Down-2             0x4772
          Wheel-Down-3             0x4873
          Wheel-Down-4             0x4974
          Wheel-Down-5             0x4A75
          Wheel-Down-6             0x4B76
          Wheel-Down-7             0x4C77
          Volume+                  0xDE09
          Volume-                  0x5D88
          mute                     0xD500
          Select                   0x709B
          Program+                 0xE00B
          Program-                 0x618C
          Program-Cycle            0xF11C
          Red/Audio                0x87B2
          Green/Subtitle           0x0833
          Yellow/Angle             0x89B4
          Blue/Title               0x0A35
          Stop                     0x7DA8
          Pause                    0xFE29
          Play                     0x7AA5
          Skip-Previous            0xF621
          Snapshot                 0x6D98
          Skip-Next                0xF823
          Reverse                  0x79A4
          Record                   0xFC27
          Forward                  0x7BA6
          1                        0xE20D
          2                        0x638E
          3                        0xE40F
          4                        0x6590
          5                        0xE611
          6                        0x6792
          7                        0xE813
          8                        0x6994
          9                        0xEA15
          0                        0x6C97
      end codes

end remote
@chemass: The best way is to make the RC work correctly with irw first, then continue with XBMC. The repeat stuff you see is controlled here with "min_repeat 0" and "suppress_repeat 4" (mine also sends each key 5 times). The long "gap" in my file is mainly to support smooth handling of the scroll wheel.


Lircmap.xml
Code:
<!-- ~/.xbmc/userdata/Lircmap.xml -->
<!-- for MEDION Digitainer Remote Control P/N 20018268, FCC ID B4S20018268 -->
<!-- with accelerated scroll wheel -->
<!-- as specified in /etc/lirc/lircd.conf -->
<!-- 2011-11-04 Moonbase ([email protected]) -->

<lircmap>
  <remote device="Medion_Digitainer_X10">
        <left>Left</left>
        <right>Right</right>
    <!-- Wheel-Up-0 .. Wheel-Up-7 are steps of increasing acceleration of the wheel -->
    <!-- which cannot currently be handled by XBMC, so we translate all to simple UPs -->
        <up>Wheel-Up-0</up>
        <up>Wheel-Up-1</up>
        <up>Wheel-Up-2</up>
        <up>Wheel-Up-3</up>
        <up>Wheel-Up-4</up>
        <up>Wheel-Up-5</up>
        <up>Wheel-Up-6</up>
        <up>Wheel-Up-7</up>
    <!-- Wheel-Down-0 .. Wheel-Down-7 are steps of increasing acceleration of the wheel -->
    <!-- which cannot currently be handled by XBMC, so we translate all to simple DOWNs -->
        <down>Wheel-Down-0</down>
        <down>Wheel-Down-1</down>
        <down>Wheel-Down-2</down>
        <down>Wheel-Down-3</down>
        <down>Wheel-Down-4</down>
        <down>Wheel-Down-5</down>
        <down>Wheel-Down-6</down>
        <down>Wheel-Down-7</down>
        <select>Select</select>
        <back>Back</back>
        <menu>Menu</menu>
        <info>Info</info>
        <display>Program-Cycle</display>
        <title></title>
        <play>Play</play>
        <pause>Pause</pause>
        <reverse>Reverse</reverse>
        <forward>Forward</forward>
        <skipplus>Skip-Next</skipplus>
        <skipminus>Skip-Previous</skipminus>
        <stop>Stop</stop>
        <zero>0</zero>
        <one>1</one>
        <two>2</two>
        <three>3</three>
        <four>4</four>
        <five>5</five>
        <six>6</six>
        <seven>7</seven>
        <eight>8</eight>
        <nine>9</nine>
    <!-- additional keys from the media center extender for xbox remote -->
        <power>Power</power>
        <mytv></mytv>
        <mymusic>Audio</mymusic>
        <mypictures>Photo</mypictures>
        <myvideo>Video</myvideo>
        <record>Record</record>
        <start></start>
        <volumeplus>Volume+</volumeplus>
        <volumeminus>Volume-</volumeminus>
        <channelplus>Program+</channelplus>
        <channelminus>Program-</channelminus>
        <pageplus></pageplus>
        <pageminus></pageminus>
        <mute>Mute</mute>
        <recordedtv></recordedtv>
        <guide>Guide</guide>
        <livetv>TV</livetv>
        <star></star>
        <hash></hash>
        <clear></clear>
        <enter>Wheel-Button</enter>
        <xbox></xbox>
        <teletext>Teletext</teletext>
        <red>Red/Audio</red>
        <green>Green/Subtitle</green>
        <yellow>Yellow/Angle</yellow>
        <blue>Blue/Title</blue>
        <subtitle></subtitle>
        <language></language>
    <!-- additional keys on this remote, map to (free) obc# (see input/XBIRRemote.h) -->
    <obc148>Snapshot</obc148> <!-- Snapshot -->
    <obc149>Radio</obc149> <!-- Radio -->
    <obc150></obc150> <!-- Program-Cycle, currently used as Display -->
    <obc151></obc151> <!-- Wheel-Button, currently used as Enter -->
    </remote>
</lircmap>

(Sorry, didn’t find a way to attach a file here.)

Good luck!
Reply
#78
Got a small problem using a build of Eden - I can't get the <mytv> command to do anything.

I have these entries in remote.xml:

Code:
<mymusic>ActivateWindow(musiclibrary,artists)</mymusic>
        <myvideo>ActivateWindow(videolibrary,movietitles)</myvideo>
        <mytv>ActivateWindow(videolibrary, tvshowtitles)</mytv
If I hit the Video key, I see this in xbmc.log:

Code:
00:55:31 T:139915120195392   DEBUG: LIRC: Update - NEW at 131170:189 0 KEY_VIDEO devinput (KEY_VIDEO)
00:55:31 T:139915120195392   DEBUG: OnKey: 7 (07) pressed, action is ActivateWindow(videolibrary,movietitles)
00:55:31 T:139915120195392   DEBUG: Activating window ID: 10025

If I hit the TV key, it does this:

Code:
00:56:33 T:139915120195392   DEBUG: LIRC: Update - NEW at 192849:179 0 KEY_TV devinput (KEY_TV)
00:56:33 T:139915120195392   DEBUG: LIRC: Update - NEW at 193201:179 0 KEY_TV_UP devinput (KEY_TV_UP)

Any ideas?
Reply
#79
Thank you so much for this post, I finally got ChanUp/Down on my MCE remote mapped to audiodelayplus/minus! I took a stab at it a few weeks ago but failed to understand the link between Lircmap.xml and Keyboard.xml and its overrides. Now it all makes sense! Thanks again!
Reply
#80
Super Necro I suppose, but I got here through the wiki page so I am guessing this is the right place.

Ok I have a TV card with remote, its working fine with Lirc.

http://paste.ubuntu.com/1531537/

Up, down, left, right work with XBMC but OK does not, and some others (as you can appreciate Ok is an important button)

I have been sweaing a lot at it trying to work it out, can someone give me a hint.

This is with Frodo RC3.


I think it may have something to do with the lirc device name, but I dont know so here is a cat /proc/bus/input/devices


http://paste.ubuntu.com/1531528/


thanks in advance for any hints.

S.
Cant delete :/

As with everything within seconds of posting this I worked out that /dev/input/event4 was needed in Lircmap.xml

and it is now working
Reply
#81
Can someone help me, i cant get lirc working with XBMCBuntu 11.

I've bought an aureal based remote.
lsusb :
Code:
Bus 002 Device 002: ID 0755:2626 Aureal Semiconductor

I think lirc is working, irw output
Code:
00000000004f0000 00 KEY_RIGHT Aureal_ATWF@83
00000000004f0000 00 KEY_RIGHT Aureal_ATWF@83
00000000004f0000 00 KEY_RIGHT Aureal_ATWF@83
0000000000500000 00 KEY_LEFT Aureal_ATWF@83


Here are my config files :
/etc/lirc/lircd.conf
Code:
include "/usr/share/lirc/remotes/aureal/lircd.conf.atwf83"
/home/*/.xbmc/userdata/lircmap.xml
Code:
<lircmap>
  <remote device="Aureal_ATWF@83">
     <right>KEY_RIGHT</right>
  </remote>
</lircmap>
/home/*/.xbmc/userdata/keymaps/remote.xml
Code:
<keymap>
  <global>
    <remote>
        <right>Right</right>
    </remote>
  </global>
</keymap>

First i'm only trying to get the button right right working :-)
Reply
#82
@layzzzz: LIRC itself seems to be working (as irw works).

Do you get any errors when starting the LIRC daemon?

You could try removing remote.xml, it's not needed unless you want to do custom mapping (e.g. I have mapped Chan+- to AudioDelay+-). The Lircmap.xml should be all you need.

Enable debug logging, restart XBMC and press the right button a few times, then paste the log to xbmclogs.com so we can take a look.
Reply
#83
@negge

I think lirc started well :

Code:
13:29:49 T:4677392    INFO: LIRC Initialize: using: /dev/lircd
13:29:49 T:4677392    INFO: LIRC Initialize: sucessfully started

However if i search the log for lirc i get :

Code:
13:29:49 T:4677392    INFO: Loading special://xbmc/system/keymaps/mouse.xml
13:29:49 T:4677392    INFO: Loading special://xbmc/system/keymaps/remote.xml
13:29:49 T:4677392   ERROR: Keymapping error: no such action 'language' defined
13:29:49 T:4677392    INFO: Loading special://masterprofile/keymaps/noBS.xml
13:29:50 T:4677392    INFO: Loading special://masterprofile/keymaps/remote.xml
13:29:50 T:4677392    INFO: Loading special://profile/keymaps/noBS.xml
13:29:50 T:4677392    INFO: Loading special://profile/keymaps/remote.xml
13:29:50 T:4677392    INFO: Loading special://xbmc/system/Lircmap.xml
13:29:50 T:4677392   DEBUG: CButtonTranslator::Load - no userdata Lircmap.xml found, skipping

However i put another Lircmap.xml file in xbmc/system/ and now the right button works!
*Second edit : I deleted the Lircmap.xml in xbmc/system/ , the one in xbmc/profile was wrong. However i still dont understand why you need the remote.xml, i can remap the buttons with lircmap.xml? E.g MyVideo button starts Television atm.
Reply
#84
The first error means the contents of your remote.xml are invalid. The second one means your Lircmap.xml is in the wrong locations. It should be in .xbmc/userdata.
Reply
#85
I am trying to use my remote in XBMC-11.0 and i followed the procedure of this thread but i could not able to link my lirc to XBMC.

The steps i followed:

1) irw (If i pressed any button on my remote it will replayed the correct button)
Code:
0000000000fe00ff 00 POWER stm_pvr_1
0000000000fe58a7 00 UP stm_pvr_1
0000000000fed827 00 DOWN stm_pvr_1
0000000000fe8877 00 LEFT stm_pvr_1
0000000000feb04f 00 RIGHT stm_pvr_1

2) cat /root/.xbmc/userdata/Lircmap.xml
Code:
<lircmap>
    <remote device="stm_pvr_1">
        <left>LEFT</left>
        <right>RIGHT</right>
        <up>UP</up>
        <down>DOWN</down>
    </remote>
</lircmap>

3) cat /root/.xbmc/userdata/keymaps/remote.xml
Code:
<keymap>
  <global>
    <remote>
      <left>Left</left>
      <right>Right</right>
      <up>Up</up>
      <down>Down</down>
    </remote>
  </global>      
</keymap>

4) /etc/init.d/lirc restart

5) after starting the xbmc, the up,down,right,left keys of my remote is not responding by xbmc

6) ls -l /dev/lirc0
crw------- 1 root root 61, 0 Jan 1 2000 /dev/lirc0

where i did the mistake?
Reply
#86
Cant get custom remote working neither.
Interesting enough is "failed to connect to lirc".

xbmc.log :
Code:
22:09:59 T:3041182416    INFO: Loading special://profile/Lircmap.xml
22:10:52 T:2928669760  NOTICE: disable service: eventlircd
22:10:52 T:3041182416   DEBUG: LIRC device removed, disconnecting...
22:10:53 T:3041182416    INFO: LIRC Initialize: using: /var/run/lirc/lircd
22:10:53 T:3041182416    INFO: LIRC Initialize: connect failed: No such file or directory
22:10:53 T:3041182416   DEBUG: Failed to connect to LIRC. Retry in 10s.
...

[edit]
now there are also these :
22:29:20 T:2801792064 NOTICE: ES: Incoming connection from Starting LIRC
22:30:21 T:2801792064 NOTICE: ES: Client Starting LIRC from 127.0.0.1 timed out
[/edit]

Lircmap.xml :
Code:
<lircmap>
    <remote device="MyRemote">
        <altname>devinput</altname>
        <play>KEY_PLAYPAUSE</play>
        <back>KEY_ENTER</back>
        <start>KEY_MENU</start>
        <menu>KEY_CONTEXT_MENU</menu>
        <left>KEY_PREVIOUSSONG</left>
        <right>KEY_NEXTSONG</right>
        <up>KEY_VOLUMEUP</up>
        <down>KEY_VOLUMEDOWN</down>
    </remote>
</lircmap>
Reply
#87
I used raspbmc to put xbmc in my raspberry pi. i have a samsung remote.
i would like to use the red button to go to favorites in the xbmc. i want to know how to do it. please help me
Reply
#88
hi my remote is cheap mce i work with lirc ,suddenly it started to double press on commands why ? and how do i stop this ?
Reply
#89
Here is really awesome and most exciting publish. I completely believe the fact with you and would like to say thanks to you that you discuss this publish here with us. Keep it proceed please.
Reply
#90
Sorry for the thread necro, but a coupla questions for anyone who's a remote expert here:

1. When making changes to remote.xml (or whatever the config file is called - the wiki talks about keyboard.xml), when are these changes picked up? I've found restating XBMC does the trick, but was just curious if there was a better way.

2. Despite my remote working fine, I wanted to map some custom buttons and this guide talks about using "irw" to determine what button presses are seen by the underlying OS. I had no "irw" command but ubuntu prompted to install the "lirc" package. How come XBMC worked without lirc? Also after being installed, I got "connect: No such file or directory" when running "irw".

3. Having authored some technical stuff in the past I'm interested in updating and revamping the Wiki - trying to consolidate useful information mentioned here (Fishoil, Temar, etc) and also including some diagrams to help others through customising their remote controls. I don't want access to the wiki - but who should I talk to about discussing and submitting new content?
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] HOW-TO use all custom buttons of your remote control with LIRC2