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: OzWeather - Australian Weather Addon using BOM data inc. animated radar support - DavidFW1960 - 2021-05-17

Oops double


RE: OzWeather - Australian Weather Addon using BOM data inc. animated radar support - bossanova808 - 2021-05-28

Annoyingly, am seeing more of those blocked background image requests...the BOM seems to be ramping that up.

In better news, though, I am hoping to complete the BOM API work this weekend, and have re-worked the background downloading to another method, which doesn't seem to be hitting their block, so hopefully the new version will bring back the better BOM data, and more reliable radar background downloading.

It's basically done, just need to test it across some different installs...and then submit to the Kodi folks for review...


RE: OzWeather - Australian Weather Addon using BOM data inc. animated radar support - DavidFW1960 - 2021-05-28

(2021-05-28, 04:31)bossanova808 Wrote: Annoyingly, am seeing more of those blocked background image requests...the BOM seems to be ramping that up.

In better news, though, I am hoping to complete the BOM API work this weekend, and have re-worked the background downloading to another method, which doesn't seem to be hitting their block, so hopefully the new version will bring back the better BOM data, and more reliable radar background downloading.

It's basically done, just need to test it across some different installs...and then submit to the Kodi folks for review...

Yeah even though I had followed earlier advice to turn off background refresh they all disappeared last night (the backgrounds) Maybe we can just add gif or png images for the various radars manually? Can I assist with testing?


RE: OzWeather - Australian Weather Addon using BOM data inc. animated radar support - bossanova808 - 2021-05-28

@DavidFW1960 You can do it manually via the BOM's anonymous FTP (which is what the addon will now we doing...in the past it wasn't possible to get all the bgs this way but seems like it is now). 

I think somewhere along the way I introduced a bug where it ignored that setting (looking at the code now!) - it was only ever put in for one user, and they've been refreshing weekly for everyone since God knows when, as far as I can see, as it isn't checking the setting.  No idea when I broke that Wink

I've damn near re-written the whole thing at this point anyway.

Let me just tidy it over the weekend a bit and then yeah, thanks, I will get you to test it - it's not quite there yet (fine on Windows but I know from experience that python imports behave differently Win vs Linux, so need to try at home on my Odriods...)

I'll be in touch!


RE: OzWeather - Australian Weather Addon using BOM data inc. animated radar support - bossanova808 - 2021-05-28

Code:

anonymousConfusedomeone%[email protected]//anon/gen/radar_transparencies/

with ftp:// on the front (forum keeps truncating the url, sigh)

...is the url for the radar backgrounds, if you can be bothered manually fixing it...


RE: OzWeather - Australian Weather Addon using BOM data inc. animated radar support - DavidFW1960 - 2021-05-28

(2021-05-28, 05:58)bossanova808 Wrote:
Code:

anonymousConfusedomeone%[email protected]//anon/gen/radar_transparencies/

with ftp:// on the front (forum keeps truncating the url, sigh)

...is the url for the radar backgrounds, if you can be bothered manually fixing it...
so bom.py has this:
```
FTPSTUB = "ftp://anonymous:someone%[email protected]//anon/gen/radar/"
HTTPSTUB = "http://www.bom.gov.au/products/radar_transparencies/"
```
at line 29 and 30 - are you saying to change the httpstub to that ftp?

EDIT: I changed just the httpstub and it seemed to work but only for the first map... I just changed both the ftp and http one and restarting..
EDIT2: Still only first location background map showing.


RE: OzWeather - Australian Weather Addon using BOM data inc. animated radar support - bossanova808 - 2021-05-28

No, I mean you'd need to manually ftp to the url and grab your radar backgrounds...the changes are a bit more than that...


RE: OzWeather - Australian Weather Addon using BOM data inc. animated radar support - DavidFW1960 - 2021-05-28

(2021-05-28, 06:36)bossanova808 Wrote: No, I mean you'd need to manually ftp to the url and grab your radar backgrounds...the changes are a bit more than that...

ah ok... well it's non intuitive... (No idea how to pick right ones to d/l there..)


RE: OzWeather - Australian Weather Addon using BOM data inc. animated radar support - bossanova808 - 2021-05-28

I'll have a test version for you tomorrow morning anyway...so prob not worth it


RE: OzWeather - Australian Weather Addon using BOM data inc. animated radar support - bossanova808 - 2021-05-29

Ok, @DavidFW1960  (and anyone else who has time to try it out!)

Here is a test version of the new OzWeather (the intention is this will be released as V2.0.0. This zip is marked as 1.9.92 so that when the official version comes along you still get that...should work!)

The major change here is it now uses the BOM api directly, vs. scraping WeatherZone data.

https://www.dropbox.com/s/44fxj0qi8cxpu1o/weather.ozweather-1.9.92.zip?dl=0

If you are testing, please test like this:
  • Enable debug logging (https://kodi.wiki/view/Log_file/Easy)
  • Start Kodi fresh (i.e. if running, reboot it)
  • Install new OzWeather from the above linked zip file
  • First, check your OzWeather page without doing any re-configuring
    OzWeather should continue to fetch any previously configured weather locations.  If you see any errors - please upload your full debug log & post a link to it.
  • You should see a note in your extended forecast area about OzWeather using 'FALLBACK WeatherZone data'
    Any existing old WeatherZone locations are now used as fallback locations
    (Leave the WeatherZone locations in place as fallbacks and is the BOM api is every unavailable, it will automatically drop back to the legacy data source)
  • The next step is to go in to the addon settings and configure your new BOM locations. 
  • You should then be getting official BOM data for those locations (notably faster!) - If you see any errors - please post your full debug log
  • I have removed the periodic updating of radar backgrounds. 
    Instead, there is a new option in the addon settings to force a purge/refresh of addon background on your next weather fetch. 
    Use this if you encounter / have encountered any missing background issues.
    I have modified how the backgrounds are retrieved and believe this is much less likely to encounter issues going forward

Note - available via my private repository - https://github.com/bossanova808/repository.bossanova808/raw/master/repository-downloads/repository.bossanova808/repository.bossanova808-0.2.0.zip
I have also released OzWeather Skin Patcher 0.1.1 which can be used to install new Oz Weather skin files for Confluence, Estuary, and Estouchy .. these have been tweaked slightly as there are slight differences in the BOM data vs. Weatherzone.

Note:
Bugs are likely - it's almost a complete re-write.
** If you see any errors - please upload your full debug log & post a link to it.
** If you see any missing outlook icons (they have a diagonal yellow stroke through them) - please post the code shown in that day's outlook, exactly as you see it (e.g. [storm] Showers, storm likely.)

STILL TO DO:
Update the first post of this thread
Update the Kodi Wiki entry
Fix any bugs...
Submit the new version to the Kodi overlords

REMEMBER:
The BOM JSON API does not 'officially' exist.  (Indeed, I have an email from them where they simply deny it exists altogether!). 
Thus there's no guarantee it will continue working, or e.g. at some point require some sort of login. 
Thus, the addon will fallback to WeatherZone if needed (but this no longer supplies BOM forecast data unfortunately). 
However, there are lots of things using that BOM API out there on github, and it's apparently been around for a while now already
.....so fingers crossed all will go well from here and we'll be back to having that excellent BOM forecast data!

UPDATES
1.9.9 initial test release
1.9.91 fixed reported issue with setting BOM locations, add mapping for 'storm' outlook icon. Missing icons descriptors will now appear in the GUI (short outlook for that day, in square brackets) - for easy bug reports for missing icon issues.
1.9.92 Removed no longer needed setting, and fixed ABC weather video


RE: OzWeather - Australian Weather Addon using BOM data inc. animated radar support - DavidFW1960 - 2021-05-29

Seems ok but very slow to get info to display on first run. I also don't seem to be able to change the locations once I entered them in? (All but first is greyed out in the settings menu)

Good news it's agreeing with Home Assistant now (which it should of course because it uses the same source) Also my radar backgrounds are back. It's pretty slow switching between locations.

Didn't see the legacy message anywhere.


RE: OzWeather - Australian Weather Addon using BOM data inc. animated radar support - bossanova808 - 2021-05-29

It will indeed be slow the first time as it has to go off and get a bunch of stuff.  But only that time (once per location).  Then should be generally be very fast really - but the speed is up to your machine/connection/the BOM, ultimately.  Switching here takes about 4 seconds max from blank -> full data.

I'll fix that settings bug...missed that, sorry.

Any missing icons (i.e. with the yellow stroke through them)?


RE: OzWeather - Australian Weather Addon using BOM data inc. animated radar support - bossanova808 - 2021-05-29

@DavidFW1960  Please re-install and try the new one, from the zip linked above (v1.9.91).   Has settings fix.  

(You did not see the 'legacy' info as you did not run it before re-configuring....or else you would have seen it, it definitely appears if it is using WeatherZone locations...which is will only do if the BOM location is not configured, or the BOM API doesn't return appropriate results).


RE: OzWeather - Australian Weather Addon using BOM data inc. animated radar support - DavidFW1960 - 2021-05-29

(2021-05-29, 05:21)bossanova808 Wrote: @DavidFW1960  Please re-install and try the new one, from the zip linked above (v1.9.91).   Has settings fix.  

(You did not see the 'legacy' info as you did not run it before re-configuring....or else you would have seen it, it definitely appears if it is using WeatherZone locations...which is will only do if the BOM location is not configured, or the BOM API doesn't return appropriate results).
Actually I followed your instructions to the letter (ie I didn't reconfigure before going itto it but I think I ran the patcher for the skins) Anyway I didn't see the legacy message.
I also changed your videofullscreen.xml as it was duplicating and overlaying the temp data - grey on transparent background and also the black box version on top but offset a bit so it looked ugly... probably not the look you were going for... I can send the file to you if you want to change your skin patch. I am still using my own one now that I updated with your fixes for the new API anyway.


RE: OzWeather - Australian Weather Addon using BOM data inc. animated radar support - DavidFW1960 - 2021-05-29

(2021-05-29, 05:21)bossanova808 Wrote: @DavidFW1960  Please re-install and try the new one, from the zip linked above (v1.9.91).   Has settings fix.  

(You did not see the 'legacy' info as you did not run it before re-configuring....or else you would have seen it, it definitely appears if it is using WeatherZone locations...which is will only do if the BOM location is not configured, or the BOM API doesn't return appropriate results).
All good with settings fix now. Looking good. Great work.