Ps3 remote and battery drain

Thanks for pointing out the differences in the ps3remote.evmap file. I didn’t notice them.
My remote seems to sleep out of the box. At least it behaves the same way as under Raspbian where I patched bluez. I don’t mind having to change the batteries once a month, if necessary.

Yes, it took me 30 seconds to find that link, among hundreds of other links which I all read from top to bottom.
If you think, I’m just waiting here for kind replies, then you’re wrong. I’ve spent at least 20 solid hours trying to solve this.
In fact, I’ve spent the last 2 hours looking at every single search result of “openelec ps3 remote” which ultimately led me to this project: Sony PS3 Remote / Code / [r47] /bluez/patches
They do seem to have patched versions of bluez 5. Tomorrow I will try and see what I can achieve.
If I solve it, of course I will present the solution here. Also, I’m obviously going to give the openelec version of ps3remote.evmap a try. Though it appears that kodi ignores that file as is.

Thanks again for your help, I really don’t get the rudeness though.

Please don’t take offense. I find it the easiest to just be direct. It seems you did the homework regarding what causes mainline bluez to not function correctly with the ps3 remote. So like I said, there’s 3 ways you slash this. Use the old bluez, rebase the patch to a newer version of bluez, or just let (event)lirc handle this as OE seems to do. (I think they have added some code to be able to autosleep bluetooth devices when the screensaver kicks in)

As I have used the old patch with 100% success, I would try the new patch on Bluez 5.x. I like to have my timeout set to 60seconds, instead of relying on the screensaver kicking in. This way the batteries will easily last 1,5 years or so.

Also the (patched) bluez way of doing this seems to wake up the remote (or the subsequent repairing) much faster than eventlirc (as done in OE). Therefore there’s no need to have the remote active throughout a whole movie.

@DBMandrake don’t you have a PS3 remote?

No. I have never owned a PS3.

My mistake

Sam

Okay, so exchanging the .evmap file for the OpenELEC version didn’t do anything.
One (hopefully last) question:
http://sourceforge.net/p/sonyps3remote/code/HEAD/tree/README
Can this be applied “as is” to OSMC? I don’t want to mess up my system.
We don’t have a file called /etc/lirc/hardware.conf, would it have to be created?

@Soli: Are you currently using the PS3 remote in OSMC and if so do you notice any disadvantage being on bluez 4.101 ?
This is growing way over my head and if there’s a way that has been tested I’d be happy to just use it.

Trying to build bluez with the newer patch I get
make[3]: *** No rule to make target 'patches/bluez-5.23-sonyps3.diff.gz', needed by 'bluez-5.23-sonyps3.patch'. Schluss. make[3]: Leaving directory '/home/osmc/bluezpatch/sonyps3remote-0.4/bluez' Makefile:231: recipe for target 'all-recursive' failed make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory '/home/osmc/bluezpatch/sonyps3remote-0.4/bluez' Makefile:328: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/osmc/bluezpatch/sonyps3remote-0.4' Makefile:250: recipe for target 'all' failed make: *** [all] Error 2
I think that “might” be related to this:
osmc@****:~/bluezpatch/sonyps3remote-0.4$ sudo ./configure --prefix=/usr --sysconfdir=/etc --enable-bluezpatch=5.23 --enable-systemd configure: WARNING: unrecognized options: --enable-systemd

And to be honest I just don’t understand enough of Linux to go on from there. It’s all basically Chinese to me. Google doesn’t seem to know much about --enable-systemd or its equivalents.

I guess I should have known, that I’d just end up wishing the stupid remote would evaporate into thin air. :wink:

Edit100: Apparently this is unfinished software. The file I’ve downloaded is a previous version, that doesn’t contain bluez>5.0 patches.

Those patches are totally different from the Kitlaan patches. I’m staying with bluez 4.101, so I can’t help you.

Thanks for all your input. That’s probably what I’ll end up doing, too.

Btw: Kodi sees keystrokes as numbers when remapping them using Keymap Editor inside Kodi., e.g.:

<keymap> <global> <keyboard> <key id="61453">select</key> </keyboard> </global> </keymap>

The patch will let the ps3 remote simulate a keyboard, so you don’t ever have to mess with the keymap editor. The only thing you need update/downgrade is bluez itself. (Not bluez-alsa or the other stuff). It should be a direct swapin unless there’s some serious ABI incompatibility going on.

You could build it and manually overwrite the bluez executable, or make a deb. In either case it should be easy to get back to old by forcing apt-get install.

I can’t figure out, what I’m doing wrong. After downgrading bluez with patched 4.101 it still doesn’t work. Paired the remote with ps3_pair.py and all.
Also, the command sudo /usr/share/doc/bluez/examples/list-devices does nothing (no such file or directory).
I think, if I’d spend another month trying hard 10 hours per day, I might be able to fix it.
I do have a family though, so that’s not an option. Thanks anyway.

I got most of the keys working.
All i had to do was copy the file from OE
https://github.com/OpenELEC/OpenELEC.tv/blob/master/packages/sysutils/eventlircd/udev.d/98-eventlircd.rules
into /etc/udev/rules.d/

It tells eventlircd to use /etc/eventlircd.d/ps3remote.evmap

Haven’t checked the sleep mode so far.

Kodi 17 now has an input mapper for gamepads built in :slight_smile:

Yes but the PS3 BD Remote is no gamepad but a remote control.
The input mapper from Kodi 17 doesn’t seem to work with it.

Sorry. Read that wrong.

Sry to dig this up again!

Is there a straight forward way of connecting the PS3 IR to Bluetooth adapter to the RPi3 yet?

I have an adapter lying around and would love to use it to control my OSMC PRi3 with an older IR Harmony. As I understand this thread, that’s exactly what it is about, right?
Until now I’ve just managed to pair the adapter via Bluetooth, but after a short while the connection is lost again and I have to re-pair.

If I’m not at the wrong place here for my questions, could somebody maybe help me to get this working? :see_no_evil:

It’s supposed to auto pair, after it wakes up after sleep. (the adapter auto sleeps after a few minutes) I don’y know why it doesn’t on your setup…

But you better finalize the programming of that old Harmony soon. Logitech are shutting down the legacy Harmony 7.7.x application sometime in 2018Q1.

I’ll test soon again… But it should work without any problems? How would I configure the commands? Just set up my Harmony as a Ps3 remote and it should just work out of the box?

Well, it’s not that old - it’s a Harmony One. Which I just considered old :joy:

I have no experience using OSMC with it. I just know that it worked for several years without issues on my own Kodibuntu setup (patched Bluez 4), and probably works fine in LE (Bluez5 along some ps3 specific LIRC config? I have no clue…) OSMC is also using Bluez5, but if no devs are using a ps3 remote or the ir adapter, it might not work right out of the box.

The Harmony one was reviewed in PCMAG in January 2008, so it’s pretty old. It will keep working as long as you have it programmed and don’t upgrade your devices much. I wll eventually turn into a brick when you replace your TV.