Before I go into the details of editing the code, note that cw-kid's suggestion to get the fork (
go to github, click the "
download zip file" link, then from XBMC, install add-on from that zip file) is easier. I don't know what didn't work for some people; it worked fine for me.
You
do have to go into the settings, enable it, and enter a weather underground API key, available
from here, in the clearly labelled field.
To add your own Weather Underground API key to the
old add-on, you edit the file
Code:
c:\Users\%USERNAME%\AppData\Roaming\XBMC\addons\weather.wunderground\resources\lib\wunderground.py
(you can also hit Win+R and enter
Code:
%APPDATA%\XBMC\addons\weather.wunderground\resources\lib\wunderground.py
). Note that this has Unix (LF only) line endings, so simple Windows editors like notepad may display it messed up.
There's a variable in there
Code:
WAIK = 'NDEzNjBkMjFkZjFhMzczNg=='
This is an obfuscated form of the XBMC API key. The WAIK is decoded with
Code:
base64.b64decode(WAIK)[::-1]
, which base64 decodes it to "6373a1fd12d06314", then reverses it to the actual XBMC API key "6373a1fd12d06314" (which has stopped working).
Anyway, I replaced that with a new variable
Code:
WUID = "0000000000000000"
and edited the urrl= line to use the WUID variable directly rather than decoding WAIK:
Code:
url = WUNDERGROUND_URL % (WUID, features, settings, query, fmt)
Replace the zeros with your choice of API key, obviously.
You can try using my API key (log in to wunderground as "random@
mailinator.com", password "random", then go to
http://www.wunderground.com/weather/api/d/edit.html to find it) or create your own.