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.

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.
{ "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:

from xbmcjson import XBMC

xbmc = XBMC("")


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