[MAC] HOW-TO use Sony PS3 Bluetooth Remote to control XBMC for Mac
#1
Thumbs Up 
Yeh, I know this is dirty hack.
Yeh, I know this is ugly.
Yeh, I know this is unfinished in all ways.
Yeh, I know this is not customizeable in any way.
Yeh, I know this might crash.

Okay, someone asked for this in blog's comments. This is about my first cocoa/obj-c apps so it is ugly and poorly made and full of things that are not implemented.

So this is small app which connects to PS3 BD remote via Bluetooth and binds buttons to keyboard presses and that way is able to control XBMC. No, keys are not rebindable yet. No, it doesnt support long presses yet.

Usage:
Start ps3remote.app
Press enter and start simoltaneously and click connect, keep pressing enter and start until connect.
If it gets connection, it should work, just start XBMC and start using it. If it didn't, try again.
UI hides itself when not in focus (click from dock to see it again)

Keys binded. Arrows, enter, back, return, play, stop, scanfwd, scanrew, stepfwd and steprew. Works with default keymap.xml.

As I said, I'm cocoa newb so development will be slow. Next goal is to get long presses working. Sourcecode will come when I have cleaned it up. Then later maybe implement this straight to XBMC but there is not

Nothing more to say, I hope this will be usefull to someone (I doubt that)

Alpha 0.01: [HTML]http://tv.aninga.net/ps3remote.app.zip[/HTML]
Reply
#2
Thanks for posting this!

-elan
Reply
#3
Hrm. I wish I could offer to write something like this, but I really don't have the skills. It seems to me that eventually XBMC should have a built in bluetooth sync menu and a remote selection menu.
Reply
#4
No one's really tried this yet? Oh well, I'm off for a week. But when I got back in business, I'll try to include this to OSXBMC. Elan, could you post full compilation information somewhere (which macports I need, which ffmpeg it uses and configs and so on). There is no way to do controls modularily? Would there even be someone intrested in using ps3 remote for their OSXBMC?
Reply
#5
_tv_ Wrote:No one's really tried this yet? Oh well, I'm off for a week. But when I got back in business, I'll try to include this to OSXBMC. Elan, could you post full compilation information somewhere (which macports I need, which ffmpeg it uses and configs and so on). There is no way to do controls modularily? Would there even be someone intrested in using ps3 remote for their OSXBMC?

I just did. I went to Best Buy today and bought the PS3 BT remote. And It works quite well !!Nod

Thank you for your contribution. I'm not a programmer, but I did look at the resources inside your app hoping I could find some means to assign the keys, but unfortunately I didn't.

AS it looks right now, the app is useful for basic navigation, which is pretty good, especially if you consider it's the only game in town.

Is there a way to add some sort of a configuration, even if it's via a "config" file (text, xml, etc), where you can define the key binding? Tha would really go a long way to make this really useful. It doesn't have to be pretty, just workable.

Thanks again.


DudemanBig Grin
Reply
#6
Dudeman Wrote:Is there a way to add some sort of a configuration, even if it's via a "config" file (text, xml, etc), where you can define the key binding? Tha would really go a long way to make this really useful. It doesn't have to be pretty, just workable.

Okay I'm back. Yeh, It doesn't have it yet, but I promise there will be some sort of config coming. Dont really know how to do it easily but I'll look for it. There are two ways to make this progg awesome: 1) Make it like RemoteBuddy or 2) integrate it to XBMC. Either way, I cant do it yet. But which do you users think was better?
Reply
#7
_tv_ Wrote:Okay I'm back. Yeh, It doesn't have it yet, but I promise there will be some sort of config coming. Dont really know how to do it easily but I'll look for it. There are two ways to make this progg awesome: 1) Make it like RemoteBuddy or 2) integrate it to XBMC. Either way, I cant do it yet. But which do you users think was better?


Any update on getting a config for the PS3 remote?
Reply
#8
Working on it, trying to get pushed down buttons work but I cant really think get it to work as it should.. I think I'll skip that feature for now and try to do configs first. I'll look what I can do tonight or tomorrow.

ps. Could some obj-c guru tell me why doesnt push button down but only taps it, maybe it's because that kCGSessionEventTap? I could'nt find anything better for that..

event = CGEventCreateKeyboardEvent(NULL, key, TRUE);
CGEventPost(kCGSessionEventTap, event);
Reply
#9
_tv_ Wrote:Okay I'm back. Yeh, It doesn't have it yet, but I promise there will be some sort of config coming. Dont really know how to do it easily but I'll look for it. There are two ways to make this progg awesome: 1) Make it like RemoteBuddy or 2) integrate it to XBMC. Either way, I cant do it yet. But which do you users think was better?

Just a chime in here... The answer I feels fits best is both.

1) A a stand alone app this could have the possibility to integrate with so many other programs, such as frontrow, Powerpoint, etc.

2) Having to open a program to get remote support working in XBMC is a hassle and very un-mac like. Integration with XBMC and some sort of BT pairing option inside it's settings would make for the ultimate simplicity.
Reply
#10
Okay, here it is. new version of ps3remote. This time with basic configurability. Config file can be found from ~/Library/Preferences/com.yourcompany.ps3remote.plist , lauch new version once and it will create necessary data there and then you are good to go with configurations.. Only drawback is you have to use CGkeyCode numbers found in example here http://developer.apple.com/documentation...xt-33.html. There are some tools for this too but I haven't look for them too much.

Release 0.2: http://tv.aninga.net/ps3remote0.2.app.zip

Next version will come with something daemon-like OR "sticky" buttons OR something else nice. Better configurationpanel would be nice too.. Good luck and see you later!
Reply
#11
_tv_ Wrote:Okay, here it is. new version of ps3remote. This time with basic configurability. Config file can be found from ~/Library/Preferences/com.yourcompany.ps3remote.plist , lauch new version once and it will create necessary data there and then you are good to go with configurations.. Only drawback is you have to use CGkeyCode numbers found in example here http://developer.apple.com/documentation...xt-33.html. There are some tools for this too but I haven't look for them too much.

Release 0.2: http://tv.aninga.net/ps3remote0.2.app.zip

Next version will come with something daemon-like OR "sticky" buttons OR something else nice. Better configurationpanel would be nice too.. Good luck and see you later!

I've having an issue with key repeating. Then I press any button on the PS3 remote it keeps repeating until I press another button, and then that button keeps repeating.

Any help ?
Reply
#12
Hmm.. Sounds funny.. I just tested the version I have uploaded and it seems to work properly atleast for me.. This could be possible and I think it would be good if it were (I could do the repeating key on hold easily with this).. But could you give some information about your hardware and software, I'll try to look why this differs to my setup..
Reply
#13
_tv_ Wrote:Hmm.. Sounds funny.. I just tested the version I have uploaded and it seems to work properly atleast for me.. This could be possible and I think it would be good if it were (I could do the repeating key on hold easily with this).. But could you give some information about your hardware and software, I'll try to look why this differs to my setup..

I tried re-lauching the app, reconnecting the remote, connecting while holding down the buttons, connecting while tapping the buttons, restarting, and I still get the repeating. The display window for the app shows the key in repeat until I press another key and then it shows that key. Can't seem to get it too stop repeating the last used key, so the remote is just sitting here. =( H/W & S/W config is bellow. Thanks for your help.


MAC Hardware / Software

  • Apple Mac Mini
  • 2 GHz Core 2 Duo
  • 4GB Ram (3.3GB usable)
  • OSX 10.5.2
  • XBMC For Mac OSX v0.1.6
Reply
#14
Does the first release work? If yes, I'll make another release for you, which definitely "unpushes" the button like first one making push will be just tap. I removed that code as I thought it would be obsolete. In my comp it just taps the button, doesn't hold down. Dont really know why I can't reproduce this. Do you have any other bluetooth devices(it shouldn't matter but asking anyway)?
Reply
#15
Okay, try this one, If first release works for you, this should work too..
Release 0.2.1: http://tv.aninga.net/ps3remote0.2.1.app.zip
Reply

Logout Mark Read Team Forum Stats Members Help
[MAC] HOW-TO use Sony PS3 Bluetooth Remote to control XBMC for Mac0