[LINUX] PS3 BD remote (again) ps3d.py & ps3_remote.py..
#1
Question,

I'm using these under Ubuntu 9.04, and I installed XBMC from the PPA.
With usb keyboard, i can do everything offcourse, and XBMC works fine.

After reading some positive reports on the PS3 BD remote, i went out and got one. I had a BT stick around that seemed to work as well, so this was the cheapest way. It also looks much better than the crappy MCE remotes the stores around here have.

After searching around the forums, i find several ways to make this work.
Most of them have the drawback that you need to turn off the remote manually, otherwise it would drain the batteries.

The two most common ways:
1. LIRC + some form of tool to pair the remote and link it with LIRC
2. Python scripts, eventserver

I've gone for #2 since i don't want to run lirc and any other scripts/tools under x. My box just boots clean to XBMC in an X session that's not running GDM or anything else Smile

So far needed on clean 9.04 install:
1. apt-get python-dev
2. wget http://xbmc.svn.sourceforge.net/viewvc/x...z?view=tar
3. Drop that into /usr/share/xbmc/system/python/Lib ?
4. Start ps3_remote.py py hand. Which works. (as root)


Questions so far:

- I can shove those scripts into rc somewhere to run on reboot. But i still need to pair it each reboot, right ?
- What's up with ps3d.y ? Earlier posts seem to suggest to use it as well ?
- This post shows some nice pictures, i don't get those messages. The url it points to is also dead, or seems moved. Is the message functionality removed ?

Also, i was under the impression, these scripts are to be placed into the XBMC folder (/usr/share/xbmc) and should be 'turned on' somewhere, does XBMC have a rc folder with things it would run on the start ?

I'm happy it works so far, but i guess i must be doing some thing(s) wrong somewhere Smile

Edit: Figured out the root of the problem.
ps3_remote.py attempts to send multiple lines of text, in a way that worked before, but doesn't work now. (2 lines?)
Example:
Code:
xbmc.send_notification("Action Required!",
                               "Hold Start+Enter on your remote.",
                               bticon)
This generates an error in xbmc's log :
Code:
WARNING: CEventClient::AddPacket - received packet with same sequence number (1) as previous packet from eventclient

I modified the messages to be a single entry in brackets "message", bticon.
Now it displays the caption, and message as "../../icons/bluetooth.png". Not what i wanted.

Edit: If i change the first message to be a single line 'caption only', it will work correctly. Seems like a bug in eventserver ?

Workaround for this, add on line 27:
xbmc.send_notification("BT Script started.", "please wait")
time.sleep(1)
Messages after that one, would display correctly.
Reply
#2
Hi all,

I think the examples in Eventclients svn are somewhat broken or half-functional.

All: Icons do not seem to work ?
ps3_remote: displays no messages unless modified. (remove icon..)

ps3_remote generates an error when the icon is used like below:
Code:
xbmc.send_notification("BT Script started.", "Please wait", "bluetooth.png")
xbmc log:
Code:
CEventClient::AddPacket - received packet with same sequence number (1) as previous packet from eventclient
Python errors out when changing code:
Code:
xbmc.send_notification("BT Script started.", "Please wait", ICON_PNG, "bluetooth.png")
TypeError: send_notification() takes at most 4 arguments (5 given)
(i see only 4 args there..?)

Can someone tell me the correct format to talk to xbmc, to show a header, message and an icon ? It used to be like this:
Code:
packet = PacketNOTIFICATION("New Mail!",            # caption
                                "RE: Check this out",   # message
                                ICON_PNG,               # optional icon type
                                "../../icons/mail.png") # icon file (local)

Right now it only works with 'caption', 'message', otherwise it displays nothing. Sad

Wiki has no info for me, search turns up nothing. There must be more people using eventserver / xbmc.send_notification right ?
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] PS3 BD remote (again) ps3d.py & ps3_remote.py..0