JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174) +---- Thread: JSON-RPC (JSON Remote Procedure Call) interface protocol in development for XBMC (/showthread.php?tid=68263) Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
|
- Mnuu - 2010-08-11 Hi there I'm about to start work on a python library for the JSON api , just wanted to check nobody had one already working before I start this. I've read through the thread and nobody seems to be working in python besides topfs2 - topfs2 - 2010-08-11 Mnuu Wrote:Hi there Probably because few devices uses python but I don't know many that uses it beyond XBMC scripts (which can access jsonrpc). At any rate, if you want to use python outside XBMC I'd suggest the jsonrpc python library that already exist (not xbmc specific) since it wraps jsonrpc extremely nice. Somewhat like this: xbmc = JSONRPC.Connect(IP, port) xbmc.Ping() xbmc.Introspect() At some point I would like to do such a wrapping for xbmc scripts aswell which uses jsonrpc. - Mnuu - 2010-08-12 Could you point me in the direction of the particular library you are referencing, there seems to a large number of jsonrpc librarys for python, all of varying quality. An example of using said library to deal with announcements would be super nice also. - jonan - 2010-08-13 Any chance we could get an on screen notification function like the HTTP API ? Didn't see one looking through function list on built in development page index. -Jonan - spiff - 2010-08-13 an executebuiltin is definitely on the todo. - barrygordon - 2010-08-20 I have been through all 29 pages of this thread (kudos to all who have contributed) and believe I have gained the knowledge to convert what I have written for the HTTP API to the JSON API. My Application runs on a Pronto PRO remote control taking to XBMC (Asrock ION 330PR0) running XBMCLiveCD (9.11). My only aim is to control the presentation of the info on the main screen out of XBMC so it is basically control only (screen navigation, transport commands etc.). Before I knock my brains out trying to figure out why it is or is not working, does what I am running now (LiveCD 9.11) contain the JSON API code or just the HTTP API? If the anwer to the above is no (does not contain the JSON API code), what should I download and install to checkout the conversion of my application from the HTTP API to the JSON API? Thanks. - jmarshall - 2010-08-20 9.11 contains only the HTTP API. You'll need a Dharma nightly (you can try the ISO from xbmcfreak.nl which is pretty much identical to what is in SVN) to use the JSON-RPC interface. - jfcarroll - 2010-08-20 I just noticed this but I saw pieces of it in the code. I'm working on refactoring the Addon system so that different language choices can be plugged in. This means I'm separating the 4 builtin python modules into an "Addon API" and a set of Python bindings. I hope to have an alternate repository up this weekend (per spiff's request) to get feedback on the direction I'm taking. In any case, does it make sense that a json-rpc implementation would be simply another binding? - spiff - 2010-08-20 definitely makes sense. i'm not sure just how much overlap there will be though. - jfcarroll - 2010-08-20 Yeah - looking through the functionality there might not be a lot of overlap. But I tend to think there's no reason there shouldn't be. If I can call it using json-rpc why not from an addon? Anyway - it's way ahead of where I am now and maybe if what I'm doing works out they can be collapsed together later. - stevenD - 2010-08-21 I've made an iPhone app (Plexures) which is using the http api, and I'd like to implement support for this new JSON-RCP api. But I can't figure out how to send key commands. Any updates on the progress on this? These are the keys I'd like to be able to send: arrow up arrow down arrow left arrow right enter esc m i c tab With these ten keys you can do everything in XBMC, so I'd say they are essential to a client api. And it seems like I'm not the only one requesting this: Ishiro Wrote:Hello, - barrygordon - 2010-08-23 If the only thing you are running on the box is XBMC then you could send it a "Magic Packet" to perform Wake on LAN. That is how I use my ION 330. It is powered off normally and when it receives WOL it boots right to XBMC running from a HDD (9.11 Live CD). If you are running other things then it depends a lot on which OS is running. For example, building a little windows app that would be always be running in the background (or as a service) which monitors a particular Port on the win machine could then wait for a specific message at that port and launch the XBMC application. - Nick8888 - 2010-08-25 I'm currently trying to make the xbmc web interface available from my domain through an apache server. I've been successful in doing this for other programs such as sabnzbd, sick-beard, tvheadend, transmission and couchpotato. Using the following code to set up a virtual host in apache Code: ProxyRequests Off I am able to access it at http://mydomain.com/xbmc/ (css and all) however I am unable to browse any of my content (movies, music etc) as the json calls must not be going to the right location or something. The same behaviour occurs when using the Xbmc Web Media Manager (XWMM) package as well. Just wondering if you've had any success in achieving the json-rpc to work behind apache, if not I'll wait until development has finished before I request support. EDIT: Okay I did a bit of mucking around and found I need to change all references to "/jsonrpc" to "/xbmc/jsonrpc/" any chance of a urlbase setting or something along those lines? - marksoccer - 2010-08-26 Is there a way to swap and/or remove audio/video playlist items? I see the commands for virtual playlists, but I don't know how I can do it for AudioPlaylist and VideoPlaylist. Also, does the UnShuffle method work, because I can't get it to do anything. In addition, I cannot get the Shuffle method to shuffle more than once, is this by design? Python JSONRPC Proxy - andre_pl - 2010-08-29 I had some trouble using python-jsonrpc to interface with the jsonrpc api, I dont think it has support for jsonrpc 2.0. So I've written a bit of code that wraps the xbmc jsonrpc api. the code can be found here: http://pastebin.com/0YCe8n90 its completely lacking any documentation, but its very easy to use: Code: >>> import xbmcproxy I hope others find it helpful. |