Using JSON to control XBMC

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Roboss Offline
Junior Member
Posts: 9
Joined: Jul 2012
Reputation: 0
Post: #1
I have a PC at home running XBMC on Ubuntu, and have installed a Push system (http://www.pushcontrols.com) to control everything. Here's an example of the page i have made for my iPhone app.
[Image: photo5a.png]
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...
find quote
Roboss Offline
Junior Member
Posts: 9
Joined: Jul 2012
Reputation: 0
Post: #2
Is there anyone able to help?
find quote
artrafael Offline
Team-XBMC Forum Moderator
Posts: 4,424
Joined: Jul 2010
Reputation: 78
Location: USA
Post: #3
You'd probably have more luck in the Development subforum. If you like, I can move this thread there.
find quote
Roboss Offline
Junior Member
Posts: 9
Joined: Jul 2012
Reputation: 0
Post: #4
(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
find quote
_Andy_ Offline
Senior Member
Posts: 128
Joined: May 2010
Reputation: 0
Location: Germany, Milky Way Galaxy
Post: #5
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.
find quote
Jasp Offline
Junior Member
Posts: 49
Joined: Jan 2012
Reputation: 0
Post: #6
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.
find quote