Kodi Community Forum

Full Version: OzWeather - Australian Weather Addon using BOM data inc. animated radar support
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
One thing to note is that my repo _does_ need an upgrade for V20 - https://github.com/bossanova808/reposito...-0.2.5.zip - for future updates to the Skin Patcher side of things.  But that doesn't affect OzWeather itself.
Hi Bossanova

Thanks for the quick reply.  How do I do the debug log for you?

Cheers
Please disregard, I found the instructions for the debug log
Hey folks 

Bit of OzWeather news.  There are some alarming signs the API that OzWeather uses (...as do a whole host of other weather things...) - might be going away in March 2023.  This is....a long way from ideal.  I mean, the BOMs government mandated role is to supply accurate weather info to the Australian population, but they have a long term bad/closed attitude about how they do that.

(I noticed this via an issue on the BOM Home Assistant card I imagine some of you are using - https://github.com/Makin-Things/bom-rada.../issues/29 - if anyone has any resources/ideas to contribute, that would be a good place!).

This may then require a re-engineer of OzWeather (for about the 4th time in the 12 odd years of OzWeather's history, sigh...).  I am not aware of any other open API from the BOM.  So it may mean a return to scraping (of the 'new' weather 'places' I guess - http://www.bom.gov.au/places/ ?), ...which is actually how OzWeather worked for about 10 of those 12 years. 

I will bite the bullet and do that work, if required - but since I don't know for sure this is happening (is it just the public pages closing, or the API as well?? -  I am not sure I can be motivated to pre-emptively do this work. 

So - fair warning - there may be a period in March when OzWeather stops working, due to circumstances I can't control.  My aim would be to have it back up and running (if I don't pre-emptively code this alternative path before then...) - within a couple of weeks from the date it breaks, if it indeed does do so.  I'm still crossing my fingers it won't.

As it happens I have also been working on a side project that also uses BOM weather.  It's a Kodi '2nd Screen' thing - something that shows time/weather info by default, and switches to an artwork + time remaining display when Kodi is playing any media.  It's a simple web app, that cam be run on anything with a browser basically (except for iOS devices due to some annoying 'security' limits on local network access, sigh).  So I use old/cheap tablets for this.  (It's designed for a screen size of about 7 to 10 inches, and to be legible from a normal couch viewing distance of 3 to 5m).  This _also_ uses this API, so would need to be fixed before I even publicly put it out there...kind of annoying, but there you go - always a risk with an undocumented open API, I suppose.

@DavidFW1960 You're normally well informed about this stuff - if you know any other good BOM weather data channels, now would be the time to let me know Wink
The main BOM page is at bom.gov.au. The page above is weather.bom.gov.au. They link you back to their main page from the page above. This is just adjusting the User Experience of their services, not a reduction in services.
Well, the api runs on weather.bom.gov.au and hence one could reasonably conclude it is also likely to be affected.  It's very much not clear, but best to think about a problem before it happens, if one can.  But I am certainly hoping not...
\
Thanks for a great add-on @bossanova808.  I appreciate your efforts and, having been a scraper myself in the past, understand the cat-and-mouse you need to do in the absence of an API.
Good luck!
So, looks like the API is indeed carrying on - huzzah!
Am aware that ABC have re-jigged their site and this has broken the ABC weather video button thingy - am working on a fix (see: https://github.com/bossanova808/weather....r/issues/9) - but it just needs a few days testing before I release it...
Hi Bossa, for the past month or so it takes ages (3-4 minutes) to load a new radar map and the weather predictions. It gets there eventually but it used to be fast, like 10-20 seconds max  to show the new data. My ISP/network hasn't changed, any suggestions? Or is this just the way it is now?
When you say a new radar map, you mean one you haven't used before?

Have you got the 'force download new backgrounds' setting set to on by any chance?  Meaning it will re-download all the backgrounds each time.

I just tried a couple new radars here, about 10 seconds each time, even from scratch (all new backgrounds etc).   So I think the issue must be at your end...but not really sure what it could be?  New firewall, some sort of ISP specific routing thing??

I'll look out for other reports but (from two locations, including one over a VPN from the US) - it is well within 20 seconds from a blank slate here.
Same location, just the new rainfall data. So shouldn't need to re-download terrain backgrounds etc. The "force download new backgrounds" is off.

Pinging www.bom.gov.au on the pi4 running libreelec works ok:

LibreELEC:~ # ping www.bom.gov.au
PING www.bom.gov.au (23.214.109.48): 56 data bytes
64 bytes from 23.214.109.48: seq=0 ttl=56 time=28.246 ms
64 bytes from 23.214.109.48: seq=1 ttl=56 time=28.563 ms
.
.
.

but the radar data only comes in dribs and drabs, judging by the network interface's flashing lights.
Can you post a debug log please - I've no idea really.  But in this case (if it's the radar that's the thing causing the issue) - it would be the BOM ftp -

ftp://anonymous:someone%[email protected]/
(I haven't used/tested Kodi 19 in a while - any particular reason you're not on Nexus yet?)

That exact radar (IDR403) too 12 seconds from scratch for me here.  On your machine 45 seconds it seems (for the radar loop, the backgrounds are already cached in this log). 

But there's nothing odd in the log, that I can see, it's just...slower. 

2023-05-30 15:25:01.991 T:1041 DEBUG <general>: ### Oz Weather 2.0.6 - Retrieving new radar image: ftp://anonymous:someone%[email protected]
2023-05-30 15:25:01.991 T:1041 DEBUG <general>: ### Oz Weather 2.0.6 - Output to file: 001685424268.IDR403.T.202305300514.png
2023-05-30 15:25:07.418 T:1041 DEBUG <general>: ### Oz Weather 2.0.6 - Retrieving new radar image: ftp://anonymous:someone%[email protected]

...about 7 seconds to retrieve and write out each image.  Here that's less than one sec (these are small images!).

Is it possible it's actually not about the retrieval, but the write to disk - a slow or overly full disk, perhaps??

Can you test a desktop or laptop or something on the same network?  If that is also slow, I'd say network issue (but not sure what) - but if not, I'd think disk issue on the Pi.