This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Control KODI
#6
(19.04.2017, 14:23)leonidas Wrote: One more simple KODI control solution:


Code:
require('socket.http')
socket.http.TIMEOUT = 5

-- play ---------------------------------------------------------------------------------------------
data1 = socket.http.request('http://192.168.1.79:8080/jsonrpc?request={ "jsonrpc": "2.0", "method": "Input.ExecuteAction", "params": { "action": "play" }, "id": 1 }')

-- pause --------------------------------------------------------------------------------------------
data1 = socket.http.request('http://192.168.1.79:8080/jsonrpc?request={ "jsonrpc": "2.0", "method": "Input.ExecuteAction", "params": { "action": "pause" }, "id": 1 }, "id": 1 }')

-- down ---------------------------------------------------------------------------------------------
data1 = socket.http.request('http://192.168.1.79:8080/jsonrpc?request={"jsonrpc": "2.0", "method": "Input.Down", "id": 1}')

-- up -----------------------------------------------------------------------------------------------
data1 = socket.http.request('http://192.168.1.79:8080/jsonrpc?request={"jsonrpc": "2.0", "method": "Input.Up", "id": 1}')

-- right --------------------------------------------------------------------------------------------
data1 = socket.http.request('http://192.168.1.79:8080/jsonrpc?request={"jsonrpc": "2.0", "method": "Input.Right", "id": 1}')

-- left ---------------------------------------------------------------------------------------------
data1 = socket.http.request('http://192.168.1.79:8080/jsonrpc?request={"jsonrpc": "2.0", "method": "Input.Left", "id": 1}')

-- home ---------------------------------------------------------------------------------------------
data1 = socket.http.request('http://192.168.1.79:8080/jsonrpc?request={"jsonrpc": "2.0", "method": "Input.Home", "id": 1}')

-- select -------------------------------------------------------------------------------------------
data1 = socket.http.request('http://192.168.1.79:8080/jsonrpc?request={"jsonrpc": "2.0", "method": "Input.Select", "id": 1}')

With this solution you have no incoming data, so you can't turn off your lights when a movie starts for example.
Reply


Messages In This Thread
Control KODI - by Superchango - 18.04.2017, 15:32
RE: Control KODI - by gjniewenhuijse - 19.04.2017, 05:45
RE: Control KODI - by Superchango - 19.04.2017, 07:44
RE: Control KODI - by baggins - 19.04.2017, 12:04
RE: Control KODI - by Bart - 11.09.2017, 21:02
RE: Control KODI - by baggins - 13.09.2017, 14:59
RE: Control KODI - by leonidas - 19.04.2017, 14:23
RE: Control KODI - by gjniewenhuijse - 19.04.2017, 14:28
RE: Control KODI - by leonidas - 20.04.2017, 07:25
RE: Control KODI - by gjniewenhuijse - 20.04.2017, 08:26
RE: Control KODI - by Kellystewart - 02.10.2018, 09:02

Forum Jump: