2018-09-08, 09:11
Hi All
In my case I want to Activate custom window by using Jason RPC and I created an addon to open new window with ID :1199" and here is the script.py in addon:
import xbmc
import xbmcgui
xbmc.executebuiltin('ActivateWindow(1199)')
After that I created another script python to execute a Jason rpc :
import requests
headers = {
'Content-Type': 'application/json',
}
data = '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.activatewindowid,"params":{"windowid":"1199"}}}'
response = requests.post('http://192.168.1.250:8080/jsonrpc',
headers=headers,
data=data,
auth=('kodi', '1234'))
the jaso rpc script is out from kodi sender successfully I saw it in log.
But the kodi receiver I got this log:
ERROR: JSONRPC: Failed to parse '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.activatewindowid,"params":{"windowid":"1199"}}}'
What is the problem here?
Thanks for you guys
In my case I want to Activate custom window by using Jason RPC and I created an addon to open new window with ID :1199" and here is the script.py in addon:
import xbmc
import xbmcgui
xbmc.executebuiltin('ActivateWindow(1199)')
After that I created another script python to execute a Jason rpc :
import requests
headers = {
'Content-Type': 'application/json',
}
data = '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.activatewindowid,"params":{"windowid":"1199"}}}'
response = requests.post('http://192.168.1.250:8080/jsonrpc',
headers=headers,
data=data,
auth=('kodi', '1234'))
the jaso rpc script is out from kodi sender successfully I saw it in log.
But the kodi receiver I got this log:
ERROR: JSONRPC: Failed to parse '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.activatewindowid,"params":{"windowid":"1199"}}}'
What is the problem here?
Thanks for you guys