Kodi Community Forum

Full Version: Controlling XBMC using RPi GPIO's
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

I am trying to alter XBMC running on a raspberry pi so that I can control the GUI (Up, down, left, right etc) using external push buttons that are connected to the GPIO's of the RPi.

I have determined that I need to use JSON to forward the commands onto XBMC but I am struggling to find the correct syntax to use. If someone could point me in the right direction I would appreciate it.
Code:
{ "jsonrpc": "2.0", "method": "Input.Left", "id": 1 }
I haven't been able to get that to work. The way I have just worked out is to use the following code:

Code:
from xbmcjson import XBMC

xbmc = XBMC("http://192.168.1.114/jsonrpc")

xbmc.Input.Right()

This works after installing the python-pip application and then installing the xbmc-client and xbmc-json python libraries using the pip command.

Thank you for your help though