Kodi Community Forum

Full Version: Weather Addons.ExecuteAddon
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

I've recently begun playing around with XBMC and have been very impressed with how quickly I was able to get it running on a RaspberryPi. I have been focusing on JSON-RPC interactions with XBMC to allow me to control certain aspects through my home control system and I was able to get the the Input.Right,Left,etc... working with my home controller using a node.js application I wrote to act as a bridge between json-rpc commands and the simple serial commands my home controller is capable of issuing over TCP sockets. I'm now trying to bring the Weather menu to the screen with a json-rpc command and am having some difficulty. To my knowledge (and forgive me if I'm off the mark here) the default Weather app is essentially an Add-on and so my thinking is that I should be able to run it using the Addons.ExecuteAddon command. I'm issuing the following json-rpc command to my XBMC:

Code:
{ 'jsonrpc': '2.0', 'method': 'Addons.ExecuteAddon', 'params': { 'wait': false, 'addonid': 'weather.wunderground', 'params': ['null']}, 'id':0}

The response I receive is:

Code:
{ id: 0, jsonrpc: '2.0', result: 'OK' }

But XBMC remains on the main system menu and doesn't load the weather app for me. I'm not sure if there are some parameters I should be passing to the weather.wunderground add-on, I've searched but haven't been able to find any info on what parameters I should be passing it. Maybe I'm off the mark and I'm misusing the Addons.ExecuteAddon command? Any help would be greatly appreciated.

Thanks!
I don't think you need to talk with the weather addon to bring up the weather screen on XBMC. I use the ActivateWindow command to change to a selected screen.
Here's the json-rpc command I use to switch to the Weather screen on XBMC.


Code:
"{\"jsonrpc\":\"2.0\",\"method\":\"GUI.ActivateWindow\",\"params\":{\"window\":\"weather\"},\"id\":1}"

Hope this helps.

Kabooga
Hi Kabooga,

Many Thanks!! That worked great! I guess I was looking at it wrong, I should have been looking at it as main menu window instead of an add-on, live and learn...

Thanks again!

~mrteve