• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 8
XBOX 360 Media Remote on XBMCbuntu
#16
Just wanted to say thanks FishOil! Your script worked PERFECTLY and got me up and running in seconds!

(2013-03-20, 18:41)bbkmods Wrote: I hope you two don't mind me jumping in on this. I've been using XBMC on my Xbox for 9 years now. Ive now made the switch over to XBMCbunto Frodo on a Acer Revo 3610. The hardest part was convincing my wife. Big Grin She hates the remote that I set it up with though. I have the Intec version of the Xbox 360 Media remote (you know, the white long one) its identical to the one picture on the original post. This bash script thing is what I think I need. Can one of you walk me through the steps. I have no idea what a bash is or more importantly how I would run it.) its identical to the one picture on the original post. This bash script thing is what I think I need. Can one of you walk me through the steps. I have no idea what a bash is or more importantly how I would run it.

First, you need to put the script on your XBMC machine, so download it to your home directory.

Then, you need to make sure it is executable by doing chmod +x <script_filename>

Then, execute it by type sudo ./<filename>

Type in your password for sudo and it should execute the script. Make sure you give the script the username of the account that runs XBMC. That's it! Worked perfectly for me. Let me know if you need additional help.
Reply
#17
(2013-03-22, 09:21)stunt Wrote: Just wanted to say thanks FishOil! Your script worked PERFECTLY and got me up and running in seconds!

You're welcome. Glad it worked out.
Reply
#18
Hello FishOil &@all!

I recently got myself the "old" XBOX Media remote (the one that lights up when a key is pressed). The remote already works quite well "out of the box" with my Arctic MC-001 and Openelec.

Probably it will work even better if I go and use FishOil's keyboard.xml?

Problem is, I use a modified keyboard.xml already for my RF mini keyboard. This keyboard.xml does not seem to have "<remote>" sections, see here: http://diffchecker.com/baajnbzk
(my keyboard.xml is on the left hand side, FishOil's on the right hand side).

So what would be the best way to merge these two keyboard.xml files in order to keep my "<keyboard>" sections, and at the same time include FishOil's "<remote>" sections?

Will I have to do the merge manually? Rolleyes

Thanks everyone already,
Cheers David.P
Reply
#19
Has anyone used this script, and modified it to have the record button act as 'stop', and have the other power button power off the system?
Reply
#20
(2013-06-23, 11:18)David.P Wrote: Hello FishOil &@all!

I recently got myself the "old" XBOX Media remote (the one that lights up when a key is pressed). The remote already works quite well "out of the box" with my Arctic MC-001 and Openelec.

Probably it will work even better if I go and use FishOil's keyboard.xml?

Problem is, I use a modified keyboard.xml already for my RF mini keyboard. This keyboard.xml does not seem to have "<remote>" sections, see here: http://diffchecker.com/baajnbzk
(my keyboard.xml is on the left hand side, FishOil's on the right hand side).

So what would be the best way to merge these two keyboard.xml files in order to keep my "<keyboard>" sections, and at the same time include FishOil's "<remote>" sections?

Will I have to do the merge manually? Rolleyes

Thanks everyone already,
Cheers David.P

I dont use keyboard.xml
Are you referring to remote.xml?

You can customize this remote is many ways.
Let me know if you have questions.
Reply
#21
Hi FishOil,

sorry for the late answer, I somehow was not notified of your reply.

I use Openelec, and there the keymapping seems to be done with the file
\XBMC\userdata\keymaps\keyboard.xml

The file looks like this:
Image

I hope it is the correct one -- at least my customizations seem to work.

I actually merged your remote.xml file with my keyboard.xml, and it seems to work.

Therefore, my main question at the moment is, that large Xbox button at the top of the remote, does it send any command when pressed? I can't see anything in the xbmc.log when I press that button (and debugging is active).

Btw., I have started another thread on customization of the remote key actions here:
Key mapping for dummies

...and would appreciate any help or hints over there as well Blush

Thank you and
Cheers David.P
Reply
#22
Oops, even some more questions @FishOil Blush

Your script seems to include a section for Lircmap.xml like below:

Code:
<lircmap>
    <remote device=Microsoft_Xbox360>
    [...]
    </remote>
</lircmap>

Question A:
What is the reason that this section is needed? In Openelec at least, the Xbox360 remote works already out of the box, especially without that Lircmap.xml file section (and also without the other parts of your script). Does that mean that, other than in XBMCbuntu, in Openelec that <lircmap> file snippet for
<remote device=Microsoft_Xbox360>
is already there?

OTOH, in Openelec's Lircmap.xml, there is no mention of a remote called
<remote device=Microsoft_Xbox360>.

However, in Openelec's Lircmap.xml there is already a section for a remote called
<remote device="devinput">
and the latter seems to contain the key names of the Xbox360 remote (for example "KEY_VOLUMEDOWN", "KEY_FASTFORWARD" and so on).

Additionally, <remote device="devinput"> seems to be the actual name of the remote that Lirc seems to see if keys are pressed on the Xbox360 remote, because the xbmc.log file says:

Code:
DEBUG: LIRC: Update - NEW at 13969417:d0 0 KEY_FASTFORWARD devinput (KEY_FASTFORWARD)

Thus:

Question B:
Will XBMC read the section called <remote device=Microsoft_Xbox360>, or the section called <remote device="devinput"> of Lircmap.xml (or both?) when keys at the Xbox360 remote are pressed...?

Question C:
How come that the Lircmap.xml section called <remote device=Microsoft_Xbox360> has entries of the form

Code:
<left>LeftArrow</left>

...while
the Lircmap.xml section called <remote device="devinput"> has entries of the form

Code:
<left>KEY_LEFT</left>

...where only the latter, but not the former, seem to match with what the Xbox360 remote actually does send (by looking at the xbmc.log file which says:

Code:
DEBUG: LIRC: Update - NEW at 14048367:69 0 KEY_LEFT devinput (KEY_LEFT)

Huh

Thanks for any enlightenment regarding these mysteries (to me)

Cheers David.P
Reply
#23
Still one more:

in Lircmap.xml, there is:

Code:
<lircmap>
    <remote device=Microsoft_Xbox360>
        <star>OpenClose</star>
    </remote>
</lircmap>

This means, if the Xbox360 remote sends "OpenClose" on a certain keypress (possibly the "eject" key?), then this "OpenClose" (for whatever reason) is translated to the XBMC button <star> by Lircmap.xml.

Then, in Keyboard.xml, there is:

Code:
<keymap>
  <global>
    <remote>
      <star>EjectTray()</star>
      <xbox>info</xbox>
    </remote>
  </global>
</keymap>

This means that (for whatever reason again) then that XBMC button <star> is translated into the "EjectTray" command by Keyboard.xml.

Question D:
What sense on earth does it make to translate "OpenClose" to "star", and then "star" to "EjectTray"....!?

And then after all, why does my Openelec DVD drive open when I press, you guessed it, the "star" key on the remote -- instead of opening after pressing the "eject" key...?

This is all very confusing and nearly impossible to understand if you ask me.

Cheers David.P
--
PS: here's the translation path from the remote via Lircmap.xml and Keyboard.xml into a XBMC command action:

Image
Source: TechNazgul, Making sense of XBMC remote mapping
Reply
#24
I understand your confusion. Its sometimes difficult to grasp the relationship of lirc button names vs the xbmc names and the function they perform.

openclose is the lirc name of that particular button on the remote.
You cant simply make up button names within xbmc. Star is a name for a button within xbmc that is unused by me. I used this unused button name to perform a function of my choice.
I have repurposed this one (star) as they are limited.
EjectTray does exactly what it implies.

OpenClose (lirc name of the button on the remote /etc/lirc/lircd.conf). then /home/xbmc-user-name/.xbmc/userdata/lircmap.xml <star>OpenClose</star>
star (xbmc internal name of a button)
EjectTray (the function the button performs) /home/xbmc-user-name/.xbmc/userdata/keymaps/remote.xml under global <star>EjectTray()</star>

The star button name no longer functions as star. Star now takes the place of the OpenClose (eject) button on the remote.

I imagine your dvd opens when star is pressed because the button has not been mapped properly.
On mine its done like above. When I press the eject button its does exactly that.

When you see "star" it has NOTHING to do with the actual star button on the remote. This is simply a name within xbmc.

xbmc has names (not buttons) that perform functions.
Trace it backwards
in order for the tray to eject.
xbmc sends the EjectTray() COMMAND which is tied to the star NAME which is tied to the OpenClose BUTTON on the remote

Clear as mud? Smile
Reply
#25
It might be easier if I just make the "Any IR Remote You Can Find" tutorial I was planning to post before someone on this board pissed me off.

You can make ANY IR remote work in xbmc in about 20 min. Any button , any function.
I have yet to find a remote I cant make work. I have about 8 or 10 remotes laying around the house that all work at the same time.
Reply
#26
Sorry. Your main question. Smile

The large button
/etc/lirc/lircd.conf XboxFancyButton (The Actual Button)
/home/xbmc-user-name/.xbmc/userdata/lircmap.xml <xbox>XboxFancyButton</xbox> (The xbmc Name)
/home/xbmc-user-name/.xbmc/userdata/keymaps/remote.xml <xbox>scanitem</xbox> (The Command)

When a video item is selected, like a TV show series ("The Big Bang Theory" for example)
The large button will scan the series for new episodes that have not yet been scanned into the library without updating the entire library. Its like a quick scan.
Reply
#27
(2013-07-16, 08:44)FishOil Wrote: Clear as mud? Smile

OK! And thanks very much for your patience! Your differentiation between

BUTTON (what the remote sends to Lircmap.xml),
NAME (what Lircmap.xml sends to Keyboard.xml a.k.a. Remote.xml), and
COMMAND (what XBMC does when "hearing" a NAME)

...is very helpful indeed! Thank you also for your explanation what for and how the "XboxFancyButton" can be used.

(2013-07-16, 09:58)FishOil Wrote: It might be easier if I just make the "Any IR Remote You Can Find" tutorial I was planning to post

Yess PLEASE!

If that is possible, maybe you also can have another quick look at my above questions "A" to "C" Blush regarding the roles (if any) of the sections overwritten

<remote device=Microsoft_Xbox360> and
<remote device="devinput">

respectively, in the Lircmap.xml file?

Ever so much grateful,

Cheers David.P
Reply
#28
(2013-07-16, 10:23)David.P Wrote: maybe you also can have another quick look at my above questions "A" to "C" Blush regarding the roles (if any) of the sections overwritten

<remote device=Microsoft_Xbox360> and
<remote device="devinput">

respectively, in the Lircmap.xml file?

Ever so much grateful,

Cheers David.P

Question A
These are names you will make up that identify the particular remote to xbmc and lirc.
As you found out when you press a button in irw it says the name of the remote. Either "Microsoft_Xbox360" or "devinput". You can call it whatever you want but it should be descriptive of the remote, as in Microsoft_Xbox360.
When a button is pressed this will tell xbmc what remote is currently being used and how to respond.

It starts here.
/etc/lirc/lircd.conf
Then goes here.
/home/xbmc-user-name/.xbmc/userdata/lircmap.xml

You can have every IR remote in you house configured to control xbmc. As in, every remote ready to be used at any given moment.
Each remote would have a section in /etc/lirc/lircd.conf and /home/xbmc-user-name/.xbmc/userdata/lircmap.xml

Question B
It will not see both unless configured so. I doubt it is in your case.

Question C

When you see an entry that is prefixed by <left>KEY_LEFT</left> its a custom key/button name.
I will show you how to do that in the tutorial. Those names are also limited in quantity but there are a whole bunch of them and they are pretty descriptive.
If you want to see a list of the available "actual" button names, in a console type

Code:
irrecord -list namespace

The tutorial will
1. Give your remote a name.
2. Get the code of the buttons on your remote.
3. Give that code a descriptive button name to lirc.
4. Tell xbmc what that name is.
5. Tell xbmc how to respond to that name.


I am slightly hesitant to make this tutorial as it will likely create a large amount of reply traffic that I dont have time to respond to.
I might do it as I have a little time in the next day or two.
Its VERY surprising that nobody has made it yet. It gives you a lot of freedom with IR remotes.
Reply
#29
Thank you very much, @FishOil!

(2013-07-16, 15:49)FishOil Wrote:
(2013-07-16, 10:23)David.P Wrote: [...] <remote device=Microsoft_Xbox360>
[...] <remote device=devinput>

These are names you will make up that identify the particular remote to xbmc and lirc.
As you found out when you press a button in irw it says the name of the remote. Either "Microsoft_Xbox360" or "devinput". You can call it whatever you want but it should be descriptive of the remote, as in Microsoft_Xbox360.
When a button is pressed this will tell xbmc what remote is currently being used and how to respond.

It starts here.
/etc/lirc/lircd.conf
Then goes here.
/home/xbmc-user-name/.xbmc/userdata/lircmap.xml

OK, I understand now that these names ("Microsoft_Xbox360", "devinput"...) have been made up by someone, and then written into the lircd.conf file.

(2013-07-16, 15:49)FishOil Wrote: When you see an entry that is prefixed by <left>KEY_LEFT</left> its a custom key/button name.
I will show you how to do that in the tutorial. Those names are also limited in quantity but there are a whole bunch of them and they are pretty descriptive.
If you want to see a list of the available "actual" button names, in a console type

Code:
irrecord -list namespace

I used Debug mode in XBMC and then got the following key names in XBMC.log:

KEY_EJECTCD, KEY_STOP, KEY_PAUSE, KEY_REWIND, KEY_PLAY, KEY_FASTFORWARD, KEY_PREVIOUS, KEY_NEXT, KEY_EPG, KEY_DVD, KEY_SUBTITLE, KEY_EXIT, KEY_INFO, KEY_LEFT, KEY_OK, KEY_RIGHT, KEY_DOWN, KEY_YELLOW, KEY_BLUE, KEY_GREEN, KEY_RED, KEY_VOLUMEUP, KEY_MUTE, KEY_MEDIA, KEY_OK, KEY_RECORD, KEY_DELETE, KEY_NUMERIC_1, KEY_NUMERIC_2, KEY_NUMERIC_3, KEY_NUMERIC_4, KEY_NUMERIC_5, KEY_NUMERIC_6, KEY_NUMERIC_7, KEY_NUMERIC_8, KEY_NUMERIC_9, KEY_NUMERIC_STAR, KEY_NUMERIC_0, KEY_NUMERIC_POUND

(2013-07-16, 15:49)FishOil Wrote: The tutorial will
1. Give your remote a name.
2. Get the code of the buttons on your remote.
3. Give that code a descriptive button name to lirc.
4. Tell xbmc what that name is.
5. Tell xbmc how to respond to that name.

Sounds incredibly useful!

(2013-07-16, 15:49)FishOil Wrote: I am slightly hesitant to make this tutorial as it will likely create a large amount of reply traffic that I dont have time to respond to.
I might do it as I have a little time in the next day or two.
Its VERY surprising that nobody has made it yet. It gives you a lot of freedom with IR remotes.

Maybe other users can chime in and answer some of the questions. I'll do my best to contribute with possible answers.

Therefore, PLEASE put together your planned IR Remote Tutorial!

Best regards
David.P
Reply
#30
I will get the latest live CD and do a fresh install. Then I will document the process so there is no question as to if it works on an "out of the box" install.
Might happen this weekend.
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 8

Logout Mark Read Team Forum Stats Members Help
XBOX 360 Media Remote on XBMCbuntu3