Running a script from a webinterface addon
#1
Hi All,

Situation is this. I have a service addon and I'm trying to write a web ui for it. My issue is how to get communication between the two.
I get the feeling I've missed something incredibly obvious, because, short of adding an rpc server directly to the service addon, I don't see how it can be done Confused


Closest I've come so far is having the web interface call (via jsonrpc) "Addons.ExecuteAddon", which calls the script portion of the service addon (this works, and can even pass parameters), but I've no idea how to return a value here. The "result" from "Addons.ExecuteAddon" is always just "OK".

Can anyone give me any pointers here?

Any help appreciated Smile



Edit: I'm making this sound rather complicated, when it's not. To rephrase: Is there a way I can return a value from Addons.ExecuteAddon?
Reply
#2
Well, I think the answer to my question above is a simple No. Smile

The closest thing I could find to what I was asking was to call Files.GetDirectory on the addon, which kinda gives you a way to return values - but it's far too hackish and, I expect, illegal is several states.

Anyway, in my case, it made much more sense to put a jsonrpc server in the service addon (I effectively had one anyway, it just wasn't and rpc standard) and use that.
Reply
#3
(2013-11-20, 16:33)therealbricky Wrote: Anyway, in my case, it made much more sense to put a jsonrpc server in the service addon (I effectively had one anyway, it just wasn't and rpc standard) and use that.
Hi there.

I'm more or less trying ti do the same thing.

I know it has been a long time since, but could you share some details on your solution? I'm new to Kodi and am not understanding what you did.
Bye and thanks
Reply

Logout Mark Read Team Forum Stats Members Help
Running a script from a webinterface addon0