The example commands below work from Vera for me.
All the other Kodi Leia v18.X API commands can be seen here.
EDIT: And Kodi Matrix v19.X API commands can be seen here.
Update Video Library
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc":"2.0","id":1,"method":"VideoLibrary.Scan"}\'')
Pause / Play
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc": "2.0", "method": "Player.PlayPause", "params": { "playerid": 0 }, "id": 1}\'')
Navigation
UP
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc":"2.0","id":1,"method":"Input.Up"}\'')
DOWN
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc":"2.0","id":1,"method":"Input.Down"}\'')
LEFT
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc":"2.0","id":1,"method":"Input.Left"}\'')
RIGHT
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc":"2.0","id":1,"method":"Input.Right"}\'')
INPUT SELECT
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc":"2.0","id":1,"method":"Input.Select"}\'')
INPUT BACK
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc":"2.0","id":1,"method":"Input.Back"}\'')
INPUT INFO
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc":"2.0","id":1,"method":"Input.Info"}\'')
INPUT HOME
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc":"2.0","id":1,"method":"Input.Home"}\'')
INPUT CONTEXT MENU
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc":"2.0","id":1,"method":"Input.ContextMenu"}\'')
INPUT SHOW OSD
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc":"2.0","id":1,"method":"Input.ShowOSD"}\'')
INPUT SHOW PLAYER PROCESS INFO
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc":"2.0","id":1,"method":"Input.ShowPlayerProcessInfo"}\'')
INPUT SHOW CODEC
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc":"2.0","id":1,"method":"Input.ShowCodec"}\'')
Launch Kodi Add-on
(Change the addonid
to your addon)
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc":"2.0","id":1,"method":"Addons.ExecuteAddon","params":{"addonid":"script.frontgardencam"},"id":"1"}\'')
Disable Kodi Add-on
(Change the addonid
to your addon)
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc":"2.0","method":"Addons.SetAddonEnabled","params":{"addonid":"script.kodi.hue.ambilight","enabled":false},"id":1}\'')
Enable Kodi Add-on
(Change the addonid
to your addon)
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.:1018080/jsonrpc -d \'{"jsonrpc":"2.0","method":"Addons.SetAddonEnabled","params":{"addonid":"script.kodi.hue.ambilight","enabled":true},"id":1}\'')
Send a popup Notification to Kodi
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc": "2.0", "method": "GUI.ShowNotification", "params": { "title": "HERE ADD THE TITLE", "message": "ADD THE MESSAGE HERE" }, "id": 1}\'')
Shutdown Kodi System
os.execute('curl -X POST -H "content-type:application/json" http://username:password@192.168.1.101:8080/jsonrpc -d \'{"jsonrpc":"2.0","id":1,"method":"System.Shutdown"}\'')