Addon to activate custom window ID
#1
Hi All...Nice weekend for all

I made this addon to be able to pen custom window ID through json-rpc:

the addon structure:
1-addon.xml
2-icon.png
3-license.txt
4-readme.txt
5-script.py

the script.py:
import xbmc
import xbmcgui

xbmc.executebuiltin('ActivateWindow(1199)')

and the json-rpc:
import requests

headers = {
    'Content-Type': 'application/json',
}

data = '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.activatewindowid"},"id":0}'

response = requests.post('http://192.168.1.253:8080/jsonrpc',
headers=headers,
data=data,
auth=('kodi', '1234'))

when I excute the json-rpc script I see this log in the receiver user but the window didn't activated?!!!

16:26:37.678 T:139921770186496 DEBUG: CWebServer[8080]: request received for /jsonrpc

How can I solve this issue?
Reply
#2
full Debug Log please.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
@ronie

Here is full logs related to JSON-RPC

Log file
Reply
#4
sorry, that's not what i am looking for. i need your full kodi Debug Log from start to finish.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
"ronie" @

Sorry this is the full log file:
full log
Reply
#6
ok, your json command isn't triggering the addon to run... start by double-checking if the addon is enabled.

once enabled, run the addon manually the check if it activates the window.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#7
I tried to run by : runscript command locally and worked with me fine
<onclick>XBMC.Runscript(special://home/addons/scipt.activatewindowid/script.py)</onclick>

Is there another way to check it rather than runscript command?

Actually I did it by my self and paste it in .kodi/addons/ folder
Reply
#8
My friend!

I tried to activate plugin.video.youtube instead of my addon and worked!

Is the problem with the script addon?
Reply
#9
(2018-09-08, 22:21)networkmad Wrote: Actually I did it by my self and paste it in .kodi/addons/ folder
 that will install an addon, but not enable it, which is most likely your issue.

so find your addon under Settings > Addons > My Addons > Program Addons  and enable it.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#10
Solved My bro

Thanks I got the issue

Many thanks
Reply
#11
What is the use of this parameter in jsaon-rpc: "params":{"windowid":"12002" ?

Thanks
Reply

Logout Mark Read Team Forum Stats Members Help
Addon to activate custom window ID0