Open ghuntley opened 12 years ago
Communication is done directly via TCP on _boxee-jsonrpc._tcp (typically port 9090)
{"jsonrpc": "2.0", "method": "Files.GetSources", "params":{"media": "video"}, "id": 1}
{"id":1,"jsonrpc":"2.0","result":{"limits":{"end":2,"start":0,"total":2},"shares":[{"file":"smb://NAS/media/tv/","label":"tv on NAS"},{"file":"smb://NAS/media/movies/","label":"movies on NAS"}],"success":true}}
{"jsonrpc": "2.0", "method": "XBMC.Play", "params":{"file": "smb://NAS/media/tv/How I Met Your Mother/Season 07/How I Met Your Mother - 7x12 - Symphony of Illumination.mkv"}, "id": 1}
{"id":1,"jsonrpc":"2.0","result":"OK"}
{"jsonrpc": "2.0", "method": "VideoPlayer.PlayPause", "id": 1}
{"id":1,"jsonrpc":"2.0","result":{"paused":false,"playing":true}}
{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params":{"directory": "smb://NAS/media/tv/How I Met Your Mother/"}, "id": 1}
{"id":1,"jsonrpc":"2.0","result":{"files":[{"file":"smb://NAS/media/tv/How I Met Your Mother/Season 07/","filetype":"directory","label":"Season 07"}],"limits":{"end":1,"start":0,"total":1},"success":true}}
{"jsonrpc": "2.0", "method": "Files.GetDirectory", "params":{"directory": "smb://NAS/media/tv/How I Met Your Mother/Season 07"}, "id": 1}
{"id":1,"jsonrpc":"2.0","result":{"files":[{"file":"smb://NAS/media/tv/How I Met Your Mother/Season 07/How I Met Your Mother - 7x12 - Symphony of Illumination.mkv","filetype":"file","label":"How I Met Your Mother - 7x12 - Symphony of Illumination.mkv"}],"limits":{"end":1,"start":0,"total":1},"success":true}}
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": "6c:f0:49:58:d5:48", "applicationid": "Maraschino", "label": "Maraschino", "icon": "http://www.maraschinoproject.com/static/images/maraschino_logo.png", "type": "other"}, "id": 1}
{"id":1,"jsonrpc":"2.0","result":{"success":true}}
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": "6c:f0:49:58:d5:48", "code": "1234"},"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": "6c:f0:49:58:d5:48"}, "id": 1}
{"id":1,"jsonrpc":"2.0","result":{"success":true}}
I don't use Boxee and don't have much interest in supporting it myself, but if a developer who uses Boxee wants to come along and add support for it then that is totally cool :)
What sort of functionality would you like ghuntley? I've gone through the v1 API's for XMBC (which are undocumented) by trying out XBMC API v2 commands and it doesn't look like the API included on boxee has any Library commands to get recent movies or tv shows, so control functionality is pretty limited. I recommend upgrading your boxee to Kodi 13 which is available, and trying to add it as a XBMC server on Maraschino that way.
No doubt, I won't be the last person to seek Boxee integration.
Relevant (python) example: https://github.com/cold12/Trakt-for-Boxee
Documentation: http://developer.boxee.tv/
Let's get the ball rolling shall we?