Kodi Community Forum
Release OzWeather - Australian Weather Addon using BOM data inc. animated radar support - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Weather Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=155)
+---- Thread: Release OzWeather - Australian Weather Addon using BOM data inc. animated radar support (/showthread.php?tid=116905)



RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - bossanova808 - 2012-05-30

I can probably get it to just try in there as an alternative if the normal spot fails...can't hurt really.

I need to look at the code a bit as well to get it to refresh the bg images if > 1 month has passed or whatever, as at the moment it just gets them once and then tests if they are there and skips over if they are - meaning it would never get updated images, for example. When I do that I will look into this alternate source issue....but very busy right now with work...



RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - wrxtasy - 2012-05-31

Hi I'm wondering if anyone can help.

I'm getting python script errors with this plugin when running on Crystalbuntu. It appears to be using Python 2.6.

14:47:05 T:2722581392 INFO: -->Python script returned the following error<--
14:47:05 T:2722581392 ERROR: Error Type: <type 'exceptions.ImportError'>
14:47:05 T:2722581392 ERROR: Error Contents: No module named PIL
14:47:05 T:2722581392 ERROR: Traceback (most recent call last):
File "/root/.xbmc/addons/weather.ozweather/default.py", line 24, in <module>
from PIL import Image
ImportError: No module named PIL
14:47:05 T:2722581392 INFO: -->End of Python script error report<--


line 23/24 of default.py:

import time
from PIL import Image




RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - bossanova808 - 2012-05-31

You'll need to ask the Crystalbuntu developer to add the PIL - python image library. It's essential if you want the advanced features (ie radar). I could stop the import of the PIL library if these are switched off I guess, but really PIL is supposed to come with XBMC....I'm sure he'd be willing to add it.

http://www.stmlabs.com/contact/


RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - wrxtasy - 2012-05-31

Thanks. Time to contact Sam then.

For the time being I have removed the line:
from PIL import Image

from the default.py script and the plugin works, except the Radar Background Image does not appear.

BTW Cracker of a Thunderstorm overhead here in Perth at the moment. :-)




RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - bossanova808 - 2012-05-31

I am about to commit and then request a pull of a new version...once they look at it it will make its way out to the wide world...

V0.3.8
- Only import PIL if extended features are activated (means on platforms like Crystalbuntu without PIL you can still get BOM weather data at least without having to edit any code)
- some radars (e.g. IDR072) - were not on the ftp server, they now get pulled in by http if they're available that way (thanks youngman!)
- backgrounds are refreshed every 24 hours to pick up any changes at the BOM




RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - wrxtasy - 2012-05-31

(2012-05-31, 09:43)bossanova808 Wrote: You'll need to ask the Crystalbuntu developer to add the PIL - python image library. It's essential if you want the advanced features (ie radar). I could stop the import of the PIL library if these are switched off I guess, but really PIL is supposed to come with XBMC....I'm sure he'd be willing to add it.

http://www.stmlabs.com/contact/

To help fellow Perth users [IDR703] that may happen to be running Crystalbuntu and have no PIL library, nor have the correct links in the OzWeather default.py script to the 128Km Perth Radar backgrounds. I have converted the idx files to RGB ones that now display properly inside the Plugin.

Download here:

http://dl.dropbox.com/u/27641650/background.png
http://dl.dropbox.com/u/27641650/catchments.png
http://dl.dropbox.com/u/27641650/legend.png
http://dl.dropbox.com/u/27641650/locations.png
http://dl.dropbox.com/u/27641650/range.png
http://dl.dropbox.com/u/27641650/topography.png

These need to be put in these appropriate directory(s):

ATV1 running Crystalbuntu
/root/.xbmc/userdata/addon_data/weather.ozweather/radarbackgrounds/IDR703/

ATV2
/User/Library/Preferences/XBMC/userdata/addon_data/weather.ozweather/radarbackgrounds/IDR703/

Wink




[RELEASE] OzWeather - Australian Weather Addon using BOM data - bossanova808 - 2012-05-31

That's very good work


That said once my update flows through I don't think this will be necessary....as long as those other radars live on the end of that http link we should be right...


RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - Hopelessone - 2012-06-02

Hi,

Thanks for making a weather app in OZ!

I have the following error:
Quote:11:03:29 T:139938414716672 NOTICE: -->Python Interpreter Initialized<--
11:03:29 T:139938414716672 NOTICE: CommonFunctions-0.9.2
11:03:29 T:139938414716672 NOTICE: Oz Weather-0.3.7: Getting weather from , Extended features = false
11:03:29 T:139938414716672 ERROR: Error Type: <type 'exceptions.KeyError'>
11:03:29 T:139938414716672 ERROR: Error Contents: ('content',)
11:03:29 T:139938414716672 ERROR: Traceback (most recent call last):
File "/home/blade/.xbmc/addons/weather.ozweather/default.py", line 585, in <module>
forecast(location, radar)
File "/home/blade/.xbmc/addons/weather.ozweather/default.py", line 233, in forecast
propertiesPDOM(data["content"], extendedFeatures)
KeyError: ('content',)
11:03:36 T:139939974326144 NOTICE: Storing total System Uptime
11:03:36 T:139939974326144 NOTICE: Saving settings
11:03:36 T:139939974326144 NOTICE: stop all

Heres the log with debug enabled:
Quote:11:09:49 T:140285702567680 NOTICE: -->Python Interpreter Initialized<--
11:09:49 T:140285702567680 DEBUG: Process - The source file to load is /home/blade/.xbmc/addons/weather.ozweather/default.py
11:09:49 T:140285702567680 DEBUG: Process - Setting the Python path to /home/blade/.xbmc/addons/weather.ozweather:/home/blade/.xbmc/addons/script.module.simplejson/lib:/usr/share/xbmc/addons/script.module.pil/lib:/home/blade/.xbmc/addons/script.common.plugin.cache/lib:/home/blade/.xbmc/addons/script.module.parsedom/lib:/home/blade/.xbmc/addons/script.module.elementtree/lib:/usr/share/xbmc/addons/script.module.pysqlite/lib:/usr/lib/python2.7:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages/PIL:/usr/lib/python2.7/dist-packages/gst-0.10:/usr/lib/python2.7/dist-packages/gtk-2.0:/usr/lib/pymodules/python2.7:/usr/lib/python2.7/dist-packages/ubuntu-sso-client:/usr/lib/python2.7/dist-packages/ubuntuone-client:/usr/lib/python2.7/dist-packages/ubuntuone-control-panel:/usr/lib/python2.7/dist-packages/ubuntuone-couch:/usr/lib/python2.7/dist-packages/ubuntuone-installer:/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol:
11:09:49 T:140285702567680 DEBUG: Process - Entering source directory /home/blade/.xbmc/addons/weather.ozweather
11:09:49 T:140285702567680 DEBUG: Instantiating addon using automatically obtained id of "weather.ozweather" dependent on version 2.0 of the xbmc.python api
11:09:49 T:140286532552448 DEBUG: CPVRChannelGroup - Persist - persisting channel group 'SDTV' with 12 channels
11:09:49 T:140285702567680 NOTICE: CommonFunctions-0.9.2
11:09:49 T:140286532552448 DEBUG: CPVRChannelGroup - Persist - persisting channel group 'Seven Network' with 4 channels
11:09:49 T:140285702567680 NOTICE: Oz Weather-0.3.7: Getting weather from , Extended features = false
11:09:49 T:140285702567680 INFO: -->Python script returned the following error<--
11:09:49 T:140285702567680 ERROR: Error Type: <type 'exceptions.KeyError'>
11:09:49 T:140285702567680 ERROR: Error Contents: ('content',)
11:09:49 T:140285702567680 ERROR: Traceback (most recent call last):
File "/home/blade/.xbmc/addons/weather.ozweather/default.py", line 585, in <module>
forecast(location, radar)
File "/home/blade/.xbmc/addons/weather.ozweather/default.py", line 233, in forecast
propertiesPDOM(data["content"], extendedFeatures)
KeyError: ('content',)
11:09:49 T:140285702567680 INFO: -->End of Python script error report<--

XBMC (11.0 Git:4ed6a0c), Platform: Linux (Ubuntu 12.04 LTS, 3.2.0-24-generic x86_64). Built on Apr 19 2012, Sydney location 2095, with [IDR714]

What seems to be the problem?


[RELEASE] OzWeather - Australian Weather Addon using BOM data - bossanova808 - 2012-06-02

At first glance looks like you didn't hit ok when doing your settings, just back. Thus it didn't save them and in the debug log you can see it doing a call with empty config data... Can you double check that?


RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - bossanova808 - 2012-06-03

Ok finally got my pull request for 0.3.8 right (third time's a charm) - should be flowing through to you soon...



RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - youngman - 2012-06-04

(2012-05-31, 14:35)bossanova808 Wrote: - some radars (e.g. IDR072) - were not on the ftp server, they now get pulled in by http if they're available that way (thanks youngman!)
Works like a charm! Thanks mate!




RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - bossanova808 - 2012-06-04

No probs - basically it jsut ties http if ftp fails, seems to mostly work.

I was going to get it to force open the settings panel if the settings aren't set and weather is called, but none of the other weather addons do that so I though maybe that was too much for a weather addon that is called every 30 mins or something, might be hard for newbies or something...



RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - Hopelessone - 2012-06-04

Works ok, now when using the remote instead of the keyboard. Thanks


RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - bossanova808 - 2012-06-04

You'd have to hit enter on the 'ok' button to get it to save your settings with the keyboard instad of the usual escape/backspace you might normally use to navigate backwards.





RE: [RELEASE] OzWeather - Australian Weather Addon using BOM data - Hopelessone - 2012-06-04

Hi,
How do you get the 7 day forecast? I cleared the temp dir..

Screenshot:
http://imageshack.us/photo/my-images/502/screenshotat20120104140.png/