Android JSON-RPC port 9090 closed on Ouya?
#1
Has anyone been able to connect to or control their Ouya XBMC installation through the JSON-RPC protocol? The reason I'm asking is because I want to use the Control4 XBMC driver found here: http://forum.xbmc.org/showthread.php?tid=128714

It's written to interface with XBMC using JSON-RPC. I've attempted to telnet to my Ouya box on port 9090 but it's refusing the connection. My guess is that the Android OS is configured with port 9090 closed despite having XBMC side loaded.

To test this, I've installed the official XBMC remote app for iOS on my iPhone. This app will control XBMC by either HTTP or JSON-RPC. The remote app controls it just fine but I was able to confirm that it's strictly controlling it using HTTP rather than JSON-RPC.

I guess the main question is, how do I open port 9090 on the Ouya? I should also point out that I do have the "allow XBMC to be controlled by a program on another computer" feature found in the services section in settings.

A symptom I'm seeing also is that sometimes I'll get an error message saying something like, "Remote Control Server failed to start." or something like that when I enable that setting in services.

I'm running the recommended XBMC Gotham Alpha 1 build.
Reply
#2
(2013-08-03, 12:16)dutsnekcirf Wrote: A symptom I'm seeing also is that sometimes I'll get an error message saying something like, "Remote Control Server failed to start." or something like that when I enable that setting in services.

If the Remote Communication Server is failing to start, that would explain why you have no JSON RPC access on port 9090.

Try restarting XBMC and hopefully that will restart the Remote Communication Server.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#3
Thanks for your response MilhouseVH. I did restart XBMC a couple times but that didnt seem to fix it. Also I only got that message a couple times. I also read somewhere that I could get that message if there's another service running on that port but I don't know what it could possibly be.

Are you running XBMC on an Ouya as well? If so were you able to telnet on port 9090 to your Ouya?
Reply
#4
No, Raspberry Pi.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#5
I've made some progress...sorta.

I also happen to have an AppleTV running XBMC and so I attempted to telnet to it over port 9090 and it behaved exactly as my Ouya did. It did nothing, right up until I started a movie and it spat out some output. I realized that I've been able to telnet to my Ouya just fine, I just didn't get the behavior I was expecting. It's not the sort of session where you have a prompt at all times. In fact there isn't a prompt at all.

I took a look at the JSON-RPC API page in the wiki and it provides some commands that I can send through the telnet session for various tasks.

I was able to query the Movie and TV Shows libraries using the commands provided there.

One of the commands it also provides is Player Play/Pause. Which looks like this:

Code:
{"jsonrpc": "2.0", "method": "Player.PlayPause", "params": { "playerid": 0 }, "id": 1}

I assume this is issued when a video is currently playing, and so I started a movie on both the AppleTV and the Ouya and then issued that command in my telnet window to both of them.

I got this response:

Code:
{"error":{"code":-32100,"message":"Failed to execute method."},"id":1,"jsonrpc":"2.0"}

So this is progress...I know that JSON-RPC is in fact working on port 9090. It just isn't behaving the way I expect. I don't know why I got the above error message but it's encouraging to know that the error appears on both my AppleTV and the Ouya so it's not an issue strictly with the Ouya.

I think I just have more to learn about JSON-RPC in general.
Reply
#6
Follow proper bug reporting procedure. Read carefully what you need. If you do not follow the procedure with proper attachments you cannot get anything but guesses.

Edit: just read your second post that you got it working. Read the docs more carefully. I think you just have the wrong player id. A bit of a guess though. Execute player.getactiveplayers.

Cheers,
Tobias
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply

Logout Mark Read Team Forum Stats Members Help
JSON-RPC port 9090 closed on Ouya?0