Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Json rpc?

  1. #11

    Default

    To Test send, should give you a short-ish list of methods it supports:

    {"jsonrpc": "2.0", "method": "JSONRPC.Introspect", "id": 1}

    To Initiate pair device, this will popup a window on your boxee with a code, "deviceid" can be anything, but it really should be the macaddress of the device your connecting from:

    {"jsonrpc": "2.0", "method": "Device.PairChallenge", "params": {"deviceid": "############", "applicationid": "testapp", "label": "test", "icon": "http://blah.com/test.jpg", "type": "tablet"}, "id": 1}

    To Finish Pair device, "code" is the number that pops up on boxee after pair challenge command sent :

    {"jsonrpc": "2.0", "method": "Device.PairResponse", "params":{"deviceid": "############", "code": "####"},"id": 1}

    To connect , this is really important. Its what gives to permissions to access the other methods

    {"jsonrpc": "2.0", "method": "Device.Connect", "params":{"deviceid": "############"}, "id": 1}

    Then try this again should report loads more methods
    {"jsonrpc": "2.0", "method": "JSONRPC.Introspect", "id": 1}

    or try this:
    {"jsonrpc": "2.0", "method": "Files.GetSources", "params":{"media": "video"}, "id": 1}

    lemme know if you have any problems

  2. #12
    Join Date
    Sep 2010
    Posts
    809

    Default

    Thank you very much Anthony for taking the time to write this tutorial, worked like a charm.

    How are you handling the JSON for larger packets like the Files.GetDirectory over raw TCP and from what platform?

  3. #13

    Default

    Boxee wrote a nice class for it to use in python, have a look here:

    https://github.com/Boxee/Boxee-Tools...eeboxclient.py

    Unfortunately for apps there is no way to avoid the pairing sequnce at the moment, seems strange to pair an app...
    Have a look at my repo at www.bartsidee.nl

  4. #14
    Join Date
    Sep 2010
    Posts
    809

    Wink

    Quote Originally Posted by bartsidee View Post
    Boxee wrote a nice class for it to use in python, have a look here:

    https://github.com/Boxee/Boxee-Tools...eeboxclient.py

    Unfortunately for apps there is no way to avoid the pairing sequnce at the moment, seems strange to pair an app...
    I didn't realize Rob wrote that, nice. I have a working client now in Android after finding the newline delimiter (sadly many many builds later). The pairing isn't all that bad, and it's a one time deal once it's paired (unless you unpair it).

    All in all I'm just disappointed there isn't A, support for HTTP Json-rpc like on XBMC, and that the older now defunct original HTTP API has functionality not available in the json-rpc on Boxee, at least not now. So I'm stuck using both.

    We also need a clever way to get artwork. It's boring having just a list of files, but at least we now have a list of files. lol

    It'd also be nice to get these back in file arrays for movies...
    fields = new string[] { "title", "genre", "year", "rating", "director", "file",
    "trailer", "tagline", "plot", "plotoutline", "originaltitle",
    "lastplayed", "duration", "playcount", "writer", "studio",
    "mpaa", "movieid" };

  5. #15

    Default

    This no longer works. Or I'm holding my mouth wrong.


    {"jsonrpc": "2.0", "method": "JSONRPC.Introspect", "id": 1}

    {
    "error": {
    "code": -32601,
    "data": "JSONRPC.Introspect",
    "message": "Method not found"
    },
    "id": "1",
    "jsonrpc": "2.0"
    }


    the only method i can find that does anything is version

    {"jsonrpc": "2.0", "method": "version", "id": 1}

    {
    "id": "1",
    "jsonrpc": "2.0",
    "result": 1.0
    }

    What gives?

  6. #16
    Join Date
    Apr 2009
    Location
    Orbiting Venus
    Posts
    16,162

    Default

    Answered here: http://forums.boxee.tv/showthread.php?t=65315

    No need to post this multiple times (though your first post was moderated, it has since been approved).
    Note: This is a users' community forum. For official support, submit a Support Request.
    You can also find out how to Get Help or read the Boxee TV and Boxee Box Documentation.

    SageTV Server 7.1.x w/Gemstone and Plex Home Theater v0.9.9.7.146 w/PlexPass
    HD-PVR w/v1.5.6 drivers / Hauppauge IR blaster / FiOS Extreme HD / Motorola QIP6200 / SPDIF+720p Fixed Output
    on HP Media Center 8400F (Phenom 9500 QuadCore 2.2GHz, nVidia GeForce 8500 GT)
    via Olevia 247TFHD/Onyko TX-SR606/Harmony 550/HP MediaSmart EX490 WHS w/12TB
    Plex Media Server v0.9.7.22 on HP Touchsmart 600-1105xt
    Sonos Play:3, Connect / Simple.TV / Roku 2 XS+Plex / iPhone 5 / iPad 2

    "Some people just aren't happy unless they're disappointed or angry."

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •