Kodi Community Forum
[WINDOWS] HOW-TO use MCE remote in XBMC under Windows the easy way - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59)
+---- Thread: [WINDOWS] HOW-TO use MCE remote in XBMC under Windows the easy way (/showthread.php?tid=78179)



- elitegamer360 - 2011-06-01

I can't see what is going wrong without looking at your debug log. Please enable debug log then go to XBMC home screen press the button several times then open a video and also press the button again several times then quit XBMC.

Please post the the link to the debug log here, after you upload the debug log details on pastebin.com

Can you please confirm your subtitles script location, double check it against the script that I gave you. Can you also let me know what XBMC version are you running.

Edit: what does this button do in the past did it do anything at all in xbmc? How did you configure your remote? Does your remote use the "ehome" driver?

Cheers,
EG.


- stolek5 - 2011-06-01

elitegamer360 Wrote:I can't see what is going wrong without looking at your debug log. Please enable debug log then go to XBMC home screen press the button several times then open a video and also press the button again several times then quit XBMC.

Please post the the link to the debug log here, after you upload the debug log details on pastebin.com

Can you please confirm your subtitles script location, double check it against the script that I gave you. Can you also let me know what XBMC version are you running.

Edit: what does this button do in the past did it do anything at all in xbmc? How did you configure your remote? Does your remote use the "ehome" driver?

Cheers,
EG.

I've tried with next button "dvd" which previous work by default as "backspace" in fullscreen video:

Image

Code:
<backspace>XBMC.RunScript("C:\Users\Moni\AppData\Roaming\XBMC\addons\script.xbmc.subtitles\default.py")</backspace>

and now working perfectly Smile

I use XBMC 10.1 Git:e9e9099 (Complide: Mar 8 2011)
And that button Image previously does nothing in all XBMC Smile
I'm not sure how I configure my remote, that was more than half year ago, but from what I remember I use this reg: Config.v1.24.reg or Config.v1.23.reg but really I'm not sure, sorry...

xbmc.log

I noticed a strange thing, because in ShowKey.exe both buttons Image and "DVD" have the same KeyID Huh

btw thanks for help again

P.S. sorry for my english


- elitegamer360 - 2011-06-01

stolek5 Wrote:I've tried with next button "dvd" which previous work by default as "backspace" in fullscreen video:

Image

Code:
<backspace>XBMC.RunScript("C:\Users\Moni\AppData\Roaming\XBMC\addons\script.xbmc.subtitles\default.py")</backspace>

and now working perfectly Smile

I use XBMC 10.1 Git:e9e9099 (Complide: Mar 8 2011)
And that button Image previously does nothing in all XBMC Smile
I'm not sure how I configure my remote, that was more than half year ago, but from what I remember I use this reg: Config.v1.24.reg or Config.v1.23.reg but really I'm not sure, sorry...

I noticed a strange thing, because in ShowKey.exe both buttons Image and "DVD" have the same KeyID Huh

btw thanks for help again

P.S. sorry for my english

Ok great to hear its working now. I just wanted to see the debug log because I suspected that this button does actualy send back. Great that you figured it yourself.

Cheers,
EG.


- stolek5 - 2011-06-01

elitegamer360 Wrote:Ok great to hear its working now. I just wanted to see the debug log because I suspected that this button does actualy send back. Great that you figured it yourself.

Cheers,
EG.

debug log (with button Image in action) attached in previous post


- rugbymad - 2011-06-03

elitegamer360 Wrote:Thats better thank you :-)

Regarding the Power button I've set it to XBMC Power menu because you can configure exactly what you want in XBMC. But if you want it to send your PC to sleep then do as follows:- We are going to use the conventional way of editing the the reg file manually instead of using MCEremotemapper :-)

1- On your Keybopard hit "Win+R" keys to start the "Run" dialogue, then paste %AppData%\Xbmccustomregis\ and hit OK. It should open "Xbmccustomregis" installation folder.

2- Right click on "Config.v1.25.reg" and select "Edit"

[Power Button]
3- Look for
Code:
0c,00,00,00,04,00,16,\ ; [Power]         - Sends "S"

Hi Eg..

Soz but i need your help again pse.. first of all you were right!!! i changed my power button settings back to yours,, they are better..

i am setting up my sons profile as per http://forum.xbmc.org/showthread.php?tid=61779. as i'm fed up of his cartoons showing in my tvshows. in this post it says you can set up remote button B to switch between profiles, could you pleas post the code i would have to do in the reg to enable me just to switch back and forth with the press of 1 button

4- Change it to
Code:
0c,00,00,00,03,82,00,\ ; [Power]         - Sends "PC to Sleep"

[Blue Button]
5- look for
Code:
5E,00,00,00,04,00,1a,\ ; [Blue]           - Sends "W"

6- change it to
Code:
5E,00,00,00,04,08,07,\ ; [Blue]           - Sends "Win-D"

[Yellow Button]
7- look for
Code:
5D,00,00,00,04,01,1C,\ ; [Yellow]        - Sends "Ctrl-Y"

8- change it to
Code:
5D,00,00,00,04,05,05,\ ; [Yellow]        - Sends "Ctrl-Alt-B"

[Red Button]
9- look for
Code:
5B,00,00,00,04,00,2b,\ ; [Red]        - Sends "TAB"

1- change it to
Code:
5B,00,00,00,04,05,06,\ ; [Red]        - Sends "Ctrl-Alt-C"

Save and exit notepad. Double click on the config file to apply the new settings. It will require a restart but will restart later.

Now Move to the GSB Script before restarting! Use the script below instead of the one posted above. We only need the last two because the blue button is sorted already.
Code:
        ^!VK42::
        Run C:\Program Files\Internet Explorer\iexplore.exe
        ;Hit "Ctrl+Alt+B" "MCE Yellow Button" to "Internet Explorer"
        Return
        
        ^!VK43::
        Run C:\Program Files (x86)\Skype\Skype.exe
        ;Hit "Ctrl+Alt+C" "MCE Red Button" to start "Skype"
        Return

So copy this script and paste it below your current GSB script, just double check that the "Skype" installation location is correct, if so then SAVE, close notepad and Now finally restart your PC.

Now this edit should do what you want, you can now backup your Config.v1.25.reg because if you ever want to install Xbmccustomregis again and want your old settings again you can just apply Config.v1.25.reg over it to load your custom settings.

I hope this helps.

Cheers,
EG.


Hi eg,

sorry to bother you but i need your help pse... first of you were right i changed my power button back to your settingss they are much better..

i am setting up a profile for my son as i'm fed up of his stuff in my library as per this http://forum.xbmc.org/showthread.php?tid=61779.

it says you can setup a button to switch between profiles, could you pse post the code to set up the geen button to switch between profiles.

thx

it uses the b button as a keybord press if that helps


- rugbymad - 2011-06-03

AM I RIGHT IN THINKING THIS IS THE NEW CODE FOR A B PRESS ON GREEN

5C,00,00,00,04,00,05,\ ; [Green] - Sends "B"


- rugbymad - 2011-06-03

Ingone last post ive sussed it out.

yhx


- frieten - 2011-06-04

been using this for ages and its still running fine but just a quick question.

this works fine on all versions of XBMC?

im about to update to a SVN build and want to make sure it will still work.


- elitegamer360 - 2011-06-04

rugbymad Wrote:Ingone last post ive sussed it out.

yhx

I'm sorry rugbymad I only seen your posts today! I'm glad you have it sorted.

Sorry again, I've been extremely busy Rolleyes



frieten Wrote:been using this for ages and its still running fine but just a quick question.

this works fine on all versions of XBMC?

im about to update to a SVN build and want to make sure it will still work.


Again I have been extremely busy frieten and sorry for the late reply, but yes my setup should work fine with all the latest XBMC SVN revs. If you use the manual install some of the functions might not work if you do not use my keyboard.xml. If you use the auto-setup then all will be fine I hope.

If anything goes wrong or if you find a bug let me know and I'll fix it in the next release. I have not tried any of the new SVN XBMC revions because they are not stable for my liking.

Cheers,
EG.


- uncola - 2011-06-05

I'm using the nightly from june 1 and my remote still works great. I used the 1.99 auto install


- A_GroundedPilot - 2011-06-07

I just registered here to tell you, eg, you are the MAN. There is no way that 99% of us would have a remote working like this if it weren't for you. And then for you to hang in the thread and write custom code for all these people on an individual basis is truly awesome. You are the man.

Also, I've been trying to get my Harmony One to wake my Win7 Ult pc for a long time. I finally chucked the crappy $2 ebay remote I was using and picked up a Pinnacle PCTV remote, which is the same as the Hauppauge Media Center Remote Control Kit listed in the wiki (it has a slightly different receiver). It is an RC6 remote (and as an aside, is a lot snappier than the cheapie I was using). Anyways, only a few buttons were working until I found this reg hack. How freakin' awesome are you? Quite. So the meat of my story is that I changed the code for the power button to put the PC to sleep, but it didn't work. In fact, I stumbled upon the fact that the power button would wake it up. So I tried a few codes and what I found works for me is this:

03,81,00 puts the PC to sleep

03,82,00 wakes the PC back up

This is in conflict with what the wiki says. Again, this is on Win 7 Ultimate 64 with a Pinnacle PCTV/Happague remote. Now I think I may have finally cleared the last hurdle to getting my wife to use my home-brew home theater. Hope it helps somebody else out there too. Oh yeah, one more thing. EG, you are the MAN!


- elitegamer360 - 2011-06-08

A_GroundedPilot Wrote:I just registered here to tell you, eg, you are the MAN. There is no way that 99% of us would have a remote working like this if it weren't for you. And then for you to hang in the thread and write custom code for all these people on an individual basis is truly awesome. You are the man.

Also, I've been trying to get my Harmony One to wake my Win7 Ult pc for a long time. I finally chucked the crappy $2 ebay remote I was using and picked up a Pinnacle PCTV remote, which is the same as the Hauppauge Media Center Remote Control Kit listed in the wiki (it has a slightly different receiver). It is an RC6 remote (and as an aside, is a lot snappier than the cheapie I was using). Anyways, only a few buttons were working until I found this reg hack. How freakin' awesome are you? Quite. So the meat of my story is that I changed the code for the power button to put the PC to sleep, but it didn't work. In fact, I stumbled upon the fact that the power button would wake it up. So I tried a few codes and what I found works for me is this:

03,81,00 puts the PC to sleep

03,82,00 wakes the PC back up

This is in conflict with what the wiki says. Again, this is on Win 7 Ultimate 64 with a Pinnacle PCTV/Happague remote. Now I think I may have finally cleared the last hurdle to getting my wife to use my home-brew home theater. Hope it helps somebody else out there too. Oh yeah, one more thing. EG, you are the MAN!

Hey A_GroundedPilot, thank you for the nice comments and I'm really happy you like what I'm doing here Big Grin I'm trying my best to help as much as I can so that everyone can enjoy XBMC without wasting time in the technicalities :-)

and regarding the the sleep and wake reg bytes, I've written them down somewhere in this thread as follows and I'm sure that they are correct since the last time I tested.

Code:
System Power        [SHUTDOWN]    "03,81,00"    0c,00,00,00,03,81,00,\ ;
System Sleep        [SLEEP]        "03,82,00"    2a,00,00,00,03,82,00,\ ;
System Wake        [WAKEUP]    "03,83,00"    29,00,00,00,03,83,00,\ ;

Are you sure your PC is not actually shutting down or hibernating and then you are waking it up using the "Wake" reg code? Whats the make of your HTPC, or what Motherboard are you using if you built the PC your self?

1- Usualy from what I tested and "this is different" from system to system, that when using the "System Power [SHUTDOWN]" code the PC will never wake up because not all PC's has this ability. It depends on the Bios which should have the option to keep the USB ports live after shutdown or go to "S4" state, which is "Hibernate" becuase usually you can select what the power button do in the BIOS. If it Hibernates then you can start it again using the "System Wake [WAKEUP]" reg code from your remote.

2- Almost all PC nowadays can sleep using "S3" "System Sleep [SLEEP]" i.e. Suspend all your windows session to the Random access memory and by using as little power as possible the RAM and specific USB ports will remain powered, therefore when pressing the "System Sleep [SLEEP]" button again you should have an instant recovery of your Windows system session on screen. There will be no Windows loading or any kind of delay of any sort.

3- Not all systems can use "S3" or "S2" but usually old systems might use "S1" which does not have the ability to fully stop the CPU and other parts of the motherboard and with such systems you might hear a fan or two still spinning.

So what I think here actually that your system goes to "S4" hibernate thats why the "Sleep" reg code does not work because you need "Wake" to trigger your PC out of "hibernation" which will actually load your Windows session from your hard drive and it will take sometime compared to "S3" which is an instant start like switching an "iPhone, iPad" on. Correct me if thats not the case with your system!

I might be wrong but as far as I know the wiki is correct because I checked it out when JR wrote it as I had uncovered some of the unknown reg codes by experment Wink any ways I'll double check this weekend on a new system that I recently built. The Bios have some new interesting options that I will play with, then will see what happens.

Cheers,
EG.


- A_GroundedPilot - 2011-06-08

Wow, thanks for all the insight. I didn't even think about the fact that it might be hibernating. I did a little more experimentation this morning, and here's what I found:

The codes I posted earlier were accurate.

I have 03,82,00 set to 0c, which as you know, is the power button. If I push this while the computer is active, nothing happens.

I have 03,81,00 set to 5B, or red. If I push this while the computer is active, the following occurs:
  • The video display blacks in approximately 1.5 seconds.
  • There is a flurry of hard drive activity for another 9.5 seconds, then all is quiet. No LEDs.

Now that the machine is in its low power state, if I push the red button again (03,81,00), nothing happens. However, if I push the power button (03,82,00), the power LED lights up and again I get a flurry of HDD activity. Within approximately 3-4 seconds I have a responsive PC sitting right where I left it.

Also, I changed the blue (5E) button to 03,83,00 just for the sake of experimentation. It is unresponsive in all states. Huh

The hardware is an RC6 Pinnacle remote kit for MCE, a Zotac IONITX-P-E mini-ITX mobo with Win 7 Ultimate 64 loaded on an internal HDD. This board has an Intel SU2300 dual core cpu and a GF9400 on the chipset. The BIOS is American Megatrends v02.61. There is an option in the AHCI menu to change the standby state from auto to S1 or S3. I changed it to S3, and there was no observable difference from the behavior described above. In Windows power options, the PC is set to never hibernate, to allow hybrid sleep, and to sleep when the power button is pushed. The hybrid sleep setting is what I believe is causing the 9-10 seconds of HDD activity just before everything goes quiet when I push the red button. My understanding is that with hybrid sleep, Vista/7 writes the RAM image to the hibernation file just prior to entering the low power state, but keeps the RAM powered as well. If all goes as planned, the system resumes from RAM. In the event of a power failure, the system can still be resumed, but it rewrites the RAM from hiberfil.sys. The fact that it resumes and is very responsive within 3-4 seconds makes me believe that the RAM is staying powered the whole time, as I would expect more delay if the entire RAM image had to be pulled back off the HDD. That said, it is responsive more quickly if I'm sitting at an empty desktop than if I have XBMC running. The HDD light behavior is identical in either case (3-4 seconds of activity, then not much), but there is another 6-7 seconds delay before it's responsive if I have XBMC up. I can live with that.

For whatever reason, the PC often doesn't respond to the first push of the red button, and I have to push it twice to get it to sleep. Occasionally, it works on the first shot. No idea why. To get around this, I used MCERemoteMapper to set the green button to end, which triggers the suspend command in XBMC. If XBMC isn't in the foreground for whatever reason when that keypress is invoked, the PC is set to sleep in 30 minutes anyways. I will program everything into the Harmony so I (my wife) won't have to worry about what is getting powered up and down, it should all (hopefully!) just work. As an aside, is there a list of hex codes for all of the keyboard keys? I prefer using your reg file rather than MCE remote mapper for whatever reason, and now I can't anymore because it'll overwrite what I did in remotemapper.

So I guess, in conclusion, my response is that I don't know what the hell it's doing, but it's kinda working alright for me! Laugh


- elitegamer360 - 2011-06-09

Hmmmm, very interesting the Shutdown "03,81,00" IR signal does actually send your PC to sleep! First time I hear about this.. I guess there is a first time for every thing :-)

and the fact that the Sleep "03,82,00" IR signal wakes your PC up without being able to send your PC back to sleep is bizarre to say the least. In all the PC that I use the Sleep "03,82,00" IR signal does both actions! A-sends the PC to sleep and B- wakes it up. And if I use the Shutdown "03,81,00" IR signal on any of my PC's they will shutdown but nothing will start them up because they are totally dead "LOL".

Very interesting indeed! I will definitely look in to it this weekend and try to reproduce what you are experiencing :-) but I'm sure of the results I doubt there will be anything to do anyways. If you are happy with what you have then I guess all is good. Laugh

BTW I understand why you do not want to use the remote mapper, at least for me it lacks the IR signals! Rolleyes

And for all the Keyboard keys use my tutorial it will tell you exactly what to do and how to read the codes and combine them to full seven bytes! you can download it from my site Option B or click here, it has all the info you might need in page "5" or use the wiki you refered to in the previous post! You will find all the bytes in the "table of key codes". :-)

I'm sure the full list of the IR codes that I made are somewhere in this thread, I think that they might be a little complicated to convert back to seven bytes from the tables but if you ever need them and still cant find them I'll post the full converted lot again.

Cheers,
EG.


- xinxilas - 2011-06-17

Hey.. i bought an Remote control from Dealextreme(one of those fake "Keyboard/Mouse IR remote), 've already read many things about customizing with autohotkey, keyboard.xml etc..

BUT...

It works okay out-of-box with XBMC, the only problem is the "MEDIA CENTER BUTTON" which opens Windows Media Center...

The keys pressed by it is the native windows shortcut to open Windows Media Player: WIN+ALT+ENTER

Which is my options to make this button open XBMC? I've tried many things