JSON help
#1
Hi

I updated xbmc on ATV2 to frodo and have discovered that i have to use json to control xbmc now.

I use www.iruleathome.com as my home automation system.

there are a few codes i cant seem to get if anyone can help.

This is an example of a code i have got to work jsonrpc?request=%7B%22jsonrpc%22%3A%222.0%22%2C%22method%22%3A%22Input.Back%22%2C%22id%22%3A1%7D

this is the old codes i would like to get converted from the old API to JSON

xbmcCmds/xbmcHttp?command=ExecBuiltIn(activatewindow(settings))
xbmcCmds/xbmcHttp?command=ExecBuiltIn(activatewindow(videolibrary,movietitles))
xbmcCmds/xbmcHttp?command=ExecBuiltIn(activatewindow(videolibrary,tvshowtitles))
xbmcCmds/xbmcHttp?command=ExecBuiltIn(activatewindow(musiclibrary))
xbmcCmds/xbmcHttp?command=ExecBuiltIn(activatewindow(home))
xbmcCmds/xbmcHttp?command=ExecBuiltIn(activatewindow(videosettings))
xbmcCmds/xbmcHttp?command=ExecBuiltIn(activatewindow(appearancesettings))
xbmcCmds/xbmcHttp?command=ExecBuiltIn(activatewindow(osdaudiosettings))
xbmcCmds/xbmcHttp?command=ExecBuiltIn(activatewindow(osdvideosettings))
xbmcCmds/xbmcHttp?command=SendKey(0xF04D)
xbmcCmds/xbmcHttp?command=Action(18)

thanks




Reply
#2
Hi

You can find the ressource to convert this request on this link
API Method documentation http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v5
and some example of syntax here http://wiki.xbmc.org/index.php?title=JSON-RPC_API

Old request
Quote:xbmcCmds/xbmcHttp?command=ExecBuiltIn(activatewindow(home))
New request to send to http://ip xbmc/jsonrpc in ajax or websocket
Quote:{"jsonrpc": "2.0", "id": 1, "method": "GUI.ActivateWindow", "params": {"window": "home"}}

For the SendKey(0xF04D) i dont know what is 0xF04D but i think you can found in the previous link to send Input (arrow or play/pause action etc...)

Bye
Reply
#3
thanks for your reply i have looked at both links and i still have 2 commands i can not get to work with Json.

the command with old api for the first one was

xbmcCmds/xbmcHttp?command=Action(18)

it is the display button on the official xbmc android app.

the other one i would like to get to work that i didn't list above is to open a favorite

if any one can help many with the command string it would be greatly appreciated.
Reply

Logout Mark Read Team Forum Stats Members Help
JSON help0