Kodi Community Forum
Using JSON to control 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: Using JSON to control XBMC (/showthread.php?tid=138268)



Using JSON to control XBMC - Roboss - 2012-08-14

I have a PC at home running XBMC on Ubuntu, and have installed a Push system (www.pushcontrols.com) to control everything. Here's an example of the page i have made for my iPhone app.
Image
I can assign HTTP Requests to buttons, which is perfect for the HTTP API as i just want to use all the simple command controls (play, pause, forward, back, stop, up, down, left, right, Select, return, Home, TV Shows, Movies, Music, Shutdown, and Info), but given that API is being depreciated i have to try and make use of JSON API. I've read through all the information regarding this topic on the Wiki but am still not too sure on how i need to set it up. It appears I can't just send the command using a URL but it now has to be wrapped in a POST command. Not sure how i can do this using my current system.

I Believe i can add scripts to the push system then assign method/function calls to the buttons, so that could be the best way to go, but does anyone have a suitable script available where i can call the functions from?

Hope i'm making sense here... Brain is dead after a long day at work...


RE: Using JSON to control XBMC - Roboss - 2012-08-20

Is there anyone able to help?


RE: Using JSON to control XBMC - artrafael - 2012-08-20

You'd probably have more luck in the Development subforum. If you like, I can move this thread there.


RE: Using JSON to control XBMC - Roboss - 2012-08-23

(2012-08-20, 23:59)artrafael Wrote: You'd probably have more luck in the Development subforum. If you like, I can move this thread there.
yes please. Thanks




RE: Using JSON to control XBMC - _Andy_ - 2012-08-24

If your system is only able to do HTTP GET requests you could setup a HTTP (e.g. apachefriends.org) server on your local LAN and use some PHP scripts to wrap the JSON requests.

The disatvantage is the HTTP server need to stay online all the time.




RE: Using JSON to control XBMC - Jasp - 2012-08-26

I'm currently working on a couple of Push Modules, one is utilising the newer JSON schema.
Not as easy to find commands and correctly implement them, but getting there.

HTTP API was a lot easier, especially after the introduction of httpRequest function from Push.