New weather plugin - Australian BOM data
#1
Ok now that the weather system is based on add ons, I have downloaded Ronie's weather.wunderground and have started to hack (and I do mean hack!) a plugin to pull date from the Australian Bureau of Meteorology data.

https://github.com/bossanova808/bossanova808-xbmc-addons

Fair warning - I am entirely new to git AND python AND xbmc at a coding level. I may break things, have set up the repo stupidly etc. I really have no idea - help appreciated!

As every Aussie knows, the BOM is the only good weather data in Australia. Most other sources are off in both current and forecast decisions by several degrees at a minimum.

I have currently hardcoded (as these happen to be near me) at the top of default.py

Essendon Airport Current Observations
Melbourne Metro Forecast

************* Working & displayed in XBMC:

Current conditions
4 day for 'precis' forecast (missing the minimum for the current day as BOM don't supply that)

************* Not working:

Locations - currently hardcoded - the BOM use some highly obscure location IDs and for most users the best way will be to go to the BOM site and from there determine the best feed URLs and maybe input these URLs as a plug in setting? I can't really see how to map XBMC locations BOM IDs and quite frankly the BOM don't provide an API or even a decent index as far as I can tell...

Icons - I am not sure how this works in XBMC and I am not really sure what to map here, as there is no neat table of possible descriptions/forecasts from the BOM to work rom - it's 30 chars of free text I think.

Can anyone explain roughly how these icons work in XBMC and how one might map in a forecast of 'Thunderstorms then showers later' to an icon??

* I really am no expert at all in this and have very limited time so if anyone with Python and XBMC skills wants to run with this that would be awesome!!

@ronie or other XBMC dev - anyone want to run through the basics of a weather plugin, particularly the harder parts of icons/locations??
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#2
In the meantime, if you want to try it out:

Download the zip from https://github.com/bossanova808/weather..../downloads

Save it into your userdata/addons folder in a folder called weather.bomaustralia

Edit the 4 URLs at the top of default.py for your location. You will need to dig around the BOM site for your URLs (I'll put tips in later!), and change the hardcoded 'Melbourne' strings to something appropriate for you.
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#3
Maybe ask brightsr if he wants to add this to Weather+

He is far more experienced on this and you may get some nice options to Smile
http://forum.xbmc.org/showthread.php?tid=95329
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#4
I shall ask, but also keep plugging away myself as it's a good learning exercise!
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#5
bossanova808 Wrote:I shall ask, but also keep plugging away myself as it's a good learning exercise!

He may give you some pointers on how to do things Smile
There's no better way of learning than just doing it.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#6
I think it's not good to dig that website. They has no function to look up a location, and their information is somewhat not organized well.
What about this website? : http://www.weatherzone.com.au/
They are based on data from the Bureau of Meteorology and has a nice function to look up city name or zip code.
Reply
#7
So write it as a scraper type thing? Using the BOM data direct is free and legal and that's why I started there.

I don't suppose it's any great shakes to scrape that site and get the weather though. They provide a free embeddable tool that could easily be hacked I think

(sample url and output here: http://pastebin.com/5MqNA0nJ - strip the document.writes off and it should be easy to get the data out.

I wanted to use something that has a semi official API rather than a scraper reallly - part of the BOMs mandate is to provide public weather informaton as a government organisation.
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#8
Yes, it should be a kind of scraper if they don't have API service.
If you need any help for coding or handling properties, feel free to ask me.
Cheers! Cool
Reply
#9
Ok initial release is up and here:

http://forum.xbmc.org/showthread.php?tid=116905

It's a scraper based on WeatherZone and structured as a default xbmc plugin of the new style. Would be great to look at bringing this in to weather plus and maybe adding the local radars etc, which might yet be out of my skill level!!
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#10
bossanova808 Wrote:Ok initial release is up and here:

http://forum.xbmc.org/showthread.php?tid=116905

It's a scraper based on WeatherZone and structured as a default xbmc plugin of the new style. Would be great to look at bringing this in to weather plus and maybe adding the local radars etc, which might yet be out of my skill level!!

Very nice work! Smile
In order to add this provider to Weather Plus, it should be able to cover 36 hour, hourly and extended(up to 10 days) forecast with wind, chance of precipitation and so on as well as high/low temperature and outlook. If not, it's better to be an independent weather addon.
This must help you get an idea and know what information needed.
link : http://code.google.com/p/xbmc-addons/wik...Properties
Reply
#11
hmmm most of that is do-able I think.

THere's a 48 hour forecast

Basic 7 day: http://www.weatherzone.com.au/vic/melbourne/ascot-vale (I've got all of this already)

48 Hour: http://www.weatherzone.com.au/vic/melbou...d-forecast

Hourly I am not so sure about but once could probably fudge that a little from the 3 hourly data available, is that ok??

So the data I think I can get to near enough, after that though is it jsut a question of supplying the URLs for radar feeds etc, that shouldn't be too hard?? E.g. http://www.weatherzone.com.au/radar/vic/melbourne/128km and http://www.weatherzone.com.au/satellite/vic

Obviously if it is integrated into yours it will have better reach for people and you provide the infrastructure to show the videos etc....

I am happy to write the code to pull all the data if you can help me when I get stuck on the harder stuff like vids etc??
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#12
Weather plus has been updated to v.3.0.0.
You can look into weather.py,wunderground.py or etc. in resource/lib/, and make a new one of weatherzone.com. It became even more easier to add a new provider.

I think supporting other maps than weather.com's maps is complicated to me. for that, I may have to make some new options and functions to support various map sources. So I prefer weather.com as a common map source.

hourly forecast doesn't need to be "Every Hour" forecast. Every 3 or 4 hours.. that is really enough. Wunderground.com provides "every 4 hours" forecast but they say it is hourly forecast. yes. that's enough, I think.
Reply
#13
hmm, I will look at what it will take to pull radar images....I might just build a single page 7 day version with radar for Aussies as that's what most of us look at it in our weather apps...
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply

Logout Mark Read Team Forum Stats Members Help
New weather plugin - Australian BOM data0