Remote control emulation via TCP/IP socket?
#1
Are there already HTTP (or some other tcp/ip socket) commands that allow for simple remote control or controller emulation?


Thanks a lot.
Reply
#2
XBMC has both an HTTP API (TCP/IP) and an Event Server (UDP).

Use the HTTP API if you want to communicate bidirectionally with XBMC (obtain current status, current song, album art etc). The XBMC Remote iPhone App, for example, uses the HTTP API.

Use the Event Server, when you simply want to send XBMC button or analog events at high speeds with low latency. The Apple Remote support, for example, is implemented using the Event Server protocol.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Please read and follow the forum rules.
For troubleshooting and bug reporting, please make sure you read this first.


Image
Reply
#3
Ah, thanks a lot m8.

Can you point me toward any documentation on the event server protocol? I just want to mimic basic button presses.
Reply
#4
There are many example event clients here. For C++, you can use this header. There are Python and Java examples as well.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Please read and follow the forum rules.
For troubleshooting and bug reporting, please make sure you read this first.


Image
Reply
#5
Ahh...

I guess what I meant is.. is there already something like

http://xbox/button_1
http://xbox/button_2
http://xbox/up
http://xbox/down
http://xbox/left
http://xbox/right
Reply
#6
Yes, that is possible using the HTTP API which is very well documented here. Look for the SendKey command as that is probably what you're after.

Similarly if you want to use the Event Server protocol, you can use the send_button() function from the Python library, compressed snipped from this example.
Code:
xbmc = XBMCClient("Example Remote", "../../icons/bluetooth.png")
xbmc.connect()
xbmc.send_keyboard_button("right")

I'm moving this thread to the development subforum.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Please read and follow the forum rules.
For troubleshooting and bug reporting, please make sure you read this first.


Image
Reply
#7
Anyone know how to enable this stuff in XBMC live? I cant get the webserver to function nor the event server.

Yes XBMC is working, I'm playing stuff off the network. I also can ping an dtelnet into it. but when I enable the webserver or event server and set to allow external access I never get any ports open even after a reboot.
Reply

Logout Mark Read Team Forum Stats Members Help
Remote control emulation via TCP/IP socket?2