XBMC and JSON-RPC

228 views
Skip to first unread message

Kevin Rasmussen

unread,
Jan 8, 2014, 8:36:09 AM1/8/14
to ope...@googlegroups.com
Hi Forum.

My OH server is also a HTPC in my rack (hidden away in a normal closet in my utillity room) connected to my HDAnywhere HDBT matrix.
I needs to be able to integrate to the JSON-RPC API in the XBMC webserver. I have found full documentation here http://wiki.xbmc.org/index.php?title=JSON-RPC_API/v6#Input and examples here http://wiki.xbmc.org/index.php?title=JSON-RPC_API :

NB! The POST example here below is from reverse engeneering the XBMC web based remote! But is confirmed and recognised via the API documentation from above URLs.

POST URL: http://<your-ip>:<your-port>/jsonrpc?Input.Up
POST Header:
{"jsonrpc": "2.0", "method": "Input.Up", "ID", 1}
GET Example: http://<your-ip>:<your-port>/jsonrpc?request={&quote;jsonrpc&qout: &qout;2.0&qout;, &qout;method&quot;: &quot;Input.Up&quot;, &quot;ID&quot;: 1} After this formula: http://<your-ip>:<your-port>/jsonrpc?request=<url-encoded-request>

However I cant seem to get this working propperly.

Can anyone give me an example on how I could use the SendHttpPostRequest() or SendHttpGetRequest() from rules?

Ben Jones

unread,
Jan 8, 2014, 2:16:05 PM1/8/14
to ope...@googlegroups.com
There is a built in action - sendHttpGetRequest(url) - which you can call from inside rules (https://github.com/openhab/openhab/wiki/Actions#core-actions).

BTW - another user is currently working on a proper XBMC binding apparently, so hopefully it won't be too far away. That should give much better control out-of-the-box for XBMC instances.

Kevin Rasmussen

unread,
Jan 9, 2014, 4:44:23 AM1/9/14
to ope...@googlegroups.com
And that action is what I try to use.
My challenge here is that nothing happens at the XBMC end.
 
Oh well. I will try and se how far the XBMC binding is from release.

wolffromthenorth

unread,
Sep 11, 2015, 5:52:00 AM9/11/15
to openhab
Did you find the answer ?
cause i'm trying the same without results.

kind regards
Reply all
Reply to author
Forward
0 new messages