Add-on:Oz Weather: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Bossanova808
m (Addon-Bot Update)
(184 intermediate revisions by 9 users not shown)
Line 3: Line 3:
|provider-name=Bossanova808
|provider-name=Bossanova808
|ID=weather.ozweather
|ID=weather.ozweather
|latest-version=0.3.7
|latest-version=2.1.1
|extension point=xbmc.python.weather
|extension point=xbmc.python.weather
|provides=
|provides=
|Summary=Weather forecasting and radar images for Australia using Bureau of Meteorology data
|Summary=Weather forecasting and radar images for Australia using Bureau of Meteorology data
|Description=Weather forecast data scraped from the Australian Bureau of Meteorology via WeatherZone - www.bom.gov.au and www.weatherzone.com.au.  For full features (e.g. radar) make sure you install the skin file you can find in the addon directory. Contributed files for other skins welcome.
|Description=Weather forecasting and radar images for Australia using Bureau of Meteorology data.  For full features (animated radars & ABC weather videos) - make sure you install the replacement skin files - see information at the addon wiki (https://kodi.wiki/index.php?title=Add-on:Oz_Weather).
|Platform=all
|Platform=all
|Language=en
|License=GPL-3.0-only
|Forum=https://forum.kodi.tv/showthread.php?tid=116905
|Website=https://kodi.wiki/index.php?title=Add-on:Oz_Weather
|Source=https://github.com/bossanova808/weather.ozweather
|broken=
|broken=
|icon url=http://mirrors.xbmc.org/addons/eden/weather.ozweather/icon.png}}
|icon url=http://mirrors.kodi.tv/addons/nexus/weather.ozweather/icon.png}}


This Add On (for XBMC 11 Eden and above only!) is based on Ronie's new default weather add on for XBMC.
This Add On is for Kodi Matrix plus (There is an old version that runs on Leia and below, but support from now on is Matrix and on only, due to the extensive Python 3 and BOM API re-write).


Support, discussion, release notification:[http://forum.xbmc.org/showthread.php?t=116905 on the xbmc forum thread].
Support, discussion, release notification:[https://forum.kodi.tv/showthread.php?tid=116905 on the Kodi forum thread]
(If you like it and use it, and want to support it surviving into the future, there is a 'buy me a coffee' link in the first post in the form thread).


It has been adapted to source it's data from the BOM (Australian Bureau of Meteorology) - as this is really the only authoritative weather data in Australia.
It has been adapted to source it's data directly from the BOM API (Australian Bureau of Meteorology) - as this is really the only authoritative source for weather data in Australia.


==== Features ====
You may also be interested in a companion project - a '2nd Screen' system to display Kodi Now Playing and Australian Weather information (again, source from the BOM).  Information on that is [https://github.com/bossanova808/kodi.ozweather.2nd.screen here].


* Live BOM radar maps
===== Features =====
 
* Animated BOM radar maps (auto locates your closest radar, but you can override this and choose any BOM radar loop if you wish. See notes on an addon to perform the skin changes needed for this, below)
* 7 Day Forecasts
* 7 Day Forecasts
* Today's extended forecast
* Today's extended forecast
* Direct access to ABC National Weather Update in 90 Seconds
* Direct access to 'ABC National Weather Update in 90 Seconds'
* Mini weather when you pause video etc. if you want
* Utility provided below to make patching skin files easy (Estuary/Estouchy/Confluence/Xonfluence/OSMC/Amber/Aeon Nox Silvo/Aeon Tajo - more by request...)
* Mini weather when you pause video & display video information etc. if you want (Confluence/Estuary only currently).


It looks like this:
Version 2 of the addon (June 2021 on), looks like this:


<img src="http://bossanova808-xbmc-addons.googlecode.com/git/repository-downloads/Other%20Downloads/Screenshot.png">
<gallery>
File:OzWeather_V2_Estuary.jpg|OzWeather in Estuary
File:OzWeather V2 Confluence.jpg|...in Confluence
File:OzWeather-Amber.jpg|...in Amber
</gallery>
 
...you get the idea... (all of these are using the SkinPatcher mentioned below to customise the Weather section)


==== Instructions ====
==== Instructions ====


Go into Get More Add-Ons and choose Weather -> OzWeather... (Oz Weather is now in the official XBMC repo for Eden).
Go into Get More Add-Ons and choose Weather -> OzWeather... (Oz Weather is in the official Kodi repo).  For radar support, see notes below on skin changes and a tool to help with this.
 
'''NB if you experience errors running OzWeather, particularly if using profiles other than the Master profile, please check in Settings->System->Addons->Manage Dependencies and make sure that the pytz, requests and urllib3 modules are all enabled!'''
 
To Configure - First, go to Kodi settings->Weather and choose the OzWeather add on as your selected weather information add on.  


To Configure - First, go to XBMC settings->Weather and choose the OzWeather add on as your weather add on. In the add on settings you can add up to three locations - you do this using their postcode - it will prompt you with matching locations if more than one area uses that postcode.
In the add on settings you can add up to three BOM locations - you can enter either your postcode or suburb - it will prompt you to choose from a list of matching locations.  Ideally, enter locations in the 'Fallback' settings page as well - this will mean that if ever the BOM API is not available, the add-on will fall back to scraping data from an alternative site (WeatherZone).  That data is not as accurate, but it's still a lot better for Australian data than other weather addons.


If you enable the extended features (see skin changes required below!) - then you need to direct input the BOM radar codes for the radar's you want displayedGo to the BOM site and find the radar you want, then check the url:
If you enable the extended features (see skin changes required below!) - you can have animated radars.  The addon auto-selects the closest radar to you, but you can overrule this if you wish by manually putting in any BOM radar codeTo find a radar code, go to the BOM site and find the radar you want, then check the url:


http://www.bom.gov.au/products/'''IDR023'''.loop.shtml#skip
http://www.bom.gov.au/products/'''IDR023'''.loop.shtml#skip
Line 42: Line 62:
...the code you need to enter (precisely) is '''IDR023'''
...the code you need to enter (precisely) is '''IDR023'''


...there is also a list of Radar IDs and what they are on the BOM site here. Note not all codes actually work all the time, as some radars are only in part time use. The main capital city ones work well, e.g. IDR023 above which is the Melbourne 128km loop, or try IDR00004 for a nice national radar.
...there is also a list of Radar IDs and what they are on the BOM site. Note not all codes actually work all the time, as some radars are only in part time use. The main capital city ones work well, e.g. IDR023 above which is the Melbourne 128km loop, or try IDR00004 for a nice national radar.
 
There is a map here with radar locations - if you hover your mouse over one of the radar diamonds, you can read the code you need from there:
http://www.bom.gov.au/australia/radar/
 
Notes:
If ever you experience issues with missing radar background images, wait a day or two, then use the 'purge backgrounds on next refresh' option in the add-on settings, and with luck your backgrounds will be re-downloaded on the next run.


Notes
If you get just the rain and no backgrounds on your radar, re-start XBMC and it will reload the skin & textures and the radar should come up ok.  Don't hammer the location/refresh button - it can take up to 30 seconds or so to update, and you can confuse it if you go too fast...


==== Skin Changes ====
==== Skin Changes ====


If you enable the long forecasts & radar, skin changes are needed.  I only provide files for Confluence and its variants, you'll need to make your own for other skins.
If you enable the extended forecasts & radar, skin changes are needed.
 
'''Utility to Patch Skins'''
 
If you're on Kodi Matrix and above, and you're using Estuary, Estouchy, Amber, Aeon Nox Silvo, Aeon Tajo, OSMC, Confluence or Xonfluence as your skin, I have written a utility tool to make this MUCH easier.   
 
'''Note that your skin folder MUST be writeable by the addon''' for this to work (for the -elec version of Kodi, see below, and if you're on some Android platforms, you _may_ need a rooted device - nothing I can do about this, sorry!).
 
I am ''in theory'' happy to add support for other skins (and especially if you can develop & supply working skin files for the current Kodi version!) - just let me know what skin support you're after in the OzWeather forum thread.
 
To install the utility - you will need to install my repo...download the latest .zip for that here: https://github.com/bossanova808/repository.bossanova808/tree/master/repository-downloads/repository.bossanova808
 
Install that, and then install the 'OzWeather Skin Patcher' add-on from that repo.  Then, just run it.  It can both patch and restore the skin files as needed.
 
With Confluence and Estuary you get the added bonus of some weather info during playback when you show the video info. With Confluence either the Info (i) or Menu (m) will bring it up, with Estuary just the Menu (m). It looks roughly like this:
 
<gallery>
File:OzWeather Estuary - Seek.jpg|Now Playing Radar Support
</gallery>
 
'''Using Corelec / LibreElec with Estuary?'''
 
In the case of the -Elec Kodis, unfortunately the main skin folder is not writeable.  This is unfortunately just part of how the -elec versions of Kodi are set up.  Here are your options:
* Don't use Estuary!  Use one of the other supported skins (as, let's face it, Estuary is a low point for Kodi default skins anyway, so you're not missing much...)
* Or - create your own version of Estuary.  Copy the whole estuary folder into your (writeable) addons folder, modifying the addon id in addon.xml to give your version a unique name (e.g. skin.estuary-mymod).  To then keep your special version of the skin up to date, create a script and set it up to run by cron (or alternatively add these commands to your autostart.sh if you're using one of those) - with the following content (changing the folder name to whatever you've named your personal skin of course):
 
            #!/bin/sh
            rsync -a --exclude 'addon.xml' --exclude 'MyWeather.xml' --exclude 'VideoFullScreen.xml' /usr/share/kodi/addons/skin.estuary/ /storage/.kodi/addons/skin.estuary-mymod/
            /usr/bin/python /usr/bin/kodi-send -a ReloadSkin
 
'''The Manual Approach'''
 
Otherwise, if you're some sort of masochist, you can take a manual approach to patching your skin files , using these instructions/files...note that there are updates to these files in the skin patcher add on so use that if at all possible.
 
You just need to copy some files into your skin/720p or skin/xml folder. Note this *will* break compatibility with other weather add ons, so best to back up the original files first if you're worried about this.  Also, you'll have to do some manual search and replacing in the skin files, as the skin patcher uses a 'template tags' system to let folks change text and background colours.  You'll need to manually do the equivalent of this python code:
 
            new_data = new_data.replace('_colour_text_default_', ADDON.getSetting('colour_text_default'))
            new_data = new_data.replace('_colour_text_dim_', ADDON.getSetting('colour_text_dim'))
            new_data = new_data.replace('_colour_text_dimmer_', ADDON.getSetting('colour_text_dimmer'))
            new_data = new_data.replace('_colour_text_high_temp_', ADDON.getSetting('colour_text_high_temp'))
            new_data = new_data.replace('_colour_text_low_temp_', ADDON.getSetting('colour_text_low_temp'))
            new_data = new_data.replace('_background_visible_', 'yes' if ADDON.getSettingBool('background_visible_bool') else 'no')
            new_data = new_data.replace('_background_opacity_', ADDON.getSetting('background_opacity'))


Download the zip [http://bossanova808-xbmc-addons.googlecode.com/git/repository-downloads/Other%20Downloads/Skin%20files%20for%20extended%20features%20(copy%20to%20Confluence%20720p).zip here].
(Another approach, perhaps, would be to run the skin patcher once, then grab the skin files it has generated with your preferred colours, and save those off somewhere for your later purposes...but of course you won't benefit from any future updates to those skin files...)


In this zip are two files, Font.xml and MyWeather.xml - these much be copied to the 720p folder in your local Confluence installation folder. Re-start XBMC after doing this so it reloads the skin files.
The latest version of the skin files can be found at: https://github.com/bossanova808/repository.bossanova808/tree/master/staging/script.ozweather-skinpatcher/resources/skin-files


(If you are using openelec like me, you will find the system Confluence folder is not writeable, so I suggest installing Confluence Mod and using that, and copying these files therefore into the Confluence Mod folder.  Alternatively you can also copy the system Confluence skin to your add ons directory, change the name in addon.xml, and start using your own modded Confluence!).
'''...but for 99% of folks, the skin patcher add on above is the ''much'' easier alternative - so try that first!'''


In the blade menu on the left you will also find a link to ABC's Weather in 90 Seconds video.
=== Support & Troubleshooting ===


There is also a DialogSeekBar.xml that you can use if you want a mini forecast on your pause screen.
I've been supporting this add on for more than 10 years now. I use it myself, of course, and I keep it working as smoothly as the upstream sources allow me to.


==== Release Info ====
If things don't work as expected and you need to ask for help - always supply a link to a FULL DEBUG LOG so I have some real chance of helping you.  I '''will''' check it and help, if you supply it.  But log snippets, or logs without debug logging, are NOT enough.


*'' 20th March 2012 - 0.3.7 - OzWeather is now available from the official XBMC repository''
If you're having problems running the add on (and especially if you use Kodi profiles) - make sure the pyzt module is installed AND enabled, for the profile you're using specifically. (System -> Addons -> Manage Dependencies...).
*'' 7th March 2012 - 0.3.7 - Moved this page to wiki''
*''20th Jan 2012 - 0.3.1 - Pinched some Weather+ code and added ABC weather videos - copy the new MyWeather.xml to you r720p folder as normal!''
*''19th Jan 2012 - 0.2.7 - Deals with WeatherZone not supplying data''
*''18th Jan 2012 - Release 0.2.3 - Bug fixes. Limited workaround - background support for ATV2 wierdness with the Python Image Library. On other systems backgrounds now have topography and radar range indicators. Better updates, as properties are now cleared before each forecast.''
*''16th Jan 2012 - Release 0.1.9 - first release with radar and 7 day forecasts!''
*'' 11th Jan 2012 - Release 0.1.1 - moved repo to Google Code and fixed some minor buglets with icons, and improved fire warnings.''
*''16th Dec 2011 - Release 0.0.7 - now in a repository for easy automatic updates!''
*''16th Dec 2011 - Release 0.0.4 - initial release


=== Support ===
If using a manual radar code, do check your radar code carefully - is it _exactly_ as the BOM one - i.e. '''IDR023''' or similar. You '''must''' include the '''IDR''' part! Does the URL in the debug log load if you paste it in to your browser?


Any issues, please post them [http://forum.xbmc.org/showthread.php?t=116905 on the xbmc forum thread].
Any issues, please post them [https://forum.kodi.tv/showthread.php?tid=116905 on the Kodi forum thread].


[[Category:Eden add-on repository]]
[[Category:Add-ons with license tag]]
[[Category:Add-ons with source tag]]
[[Category:Add-ons with website tag]]
[[Category:All add-ons]]
[[Category:Weather add-ons]]
[[Category:Gotham add-on repository]]
[[Category:Helix add-on repository]]
[[Category:Isengard add-on repository]]
[[Category:Jarvis add-on repository]]
[[Category:Krypton add-on repository]]
[[Category:Leia add-on repository]]
[[Category:Matrix add-on repository]]
[[Category:Nexus add-on repository]]

Revision as of 01:00, 22 January 2024

Oz Weather
icon.png

See this add-on on the kodi.tv showcase

Author: Bossanova808
Website: link
Type: Weather information
Repo: Kodi.tv repo v21
Kodi.tv repo v20
Kodi.tv repo v19

License: GPL-3.0-only
Source: Source code
Summary: Weather forecasting and radar images for Australia using Bureau of Meteorology data
Home icon grey.png   ▶ Add-ons ▶ Oz Weather
Attention talk.png Need help with this add-on? See here.

Weather forecasting and radar images for Australia using Bureau of Meteorology data. For full features (animated radars & ABC weather videos) - make sure you install the replacement skin files - see information at the addon wiki (https://kodi.wiki/index.php?title=Add-on:Oz_Weather).

Installing

This add-on is installed from the Add-on browser located in Kodi as follows:

  1. Settings
  2. Add-ons
  3. Install from repository
  4. Weather information
  5. Oz Weather
  6. Install

This Add On is for Kodi Matrix plus (There is an old version that runs on Leia and below, but support from now on is Matrix and on only, due to the extensive Python 3 and BOM API re-write).

Support, discussion, release notification:on the Kodi forum thread. (If you like it and use it, and want to support it surviving into the future, there is a 'buy me a coffee' link in the first post in the form thread).

It has been adapted to source it's data directly from the BOM API (Australian Bureau of Meteorology) - as this is really the only authoritative source for weather data in Australia.

You may also be interested in a companion project - a '2nd Screen' system to display Kodi Now Playing and Australian Weather information (again, source from the BOM). Information on that is here.

Features
  • Animated BOM radar maps (auto locates your closest radar, but you can override this and choose any BOM radar loop if you wish. See notes on an addon to perform the skin changes needed for this, below)
  • 7 Day Forecasts
  • Today's extended forecast
  • Direct access to 'ABC National Weather Update in 90 Seconds'
  • Utility provided below to make patching skin files easy (Estuary/Estouchy/Confluence/Xonfluence/OSMC/Amber/Aeon Nox Silvo/Aeon Tajo - more by request...)
  • Mini weather when you pause video & display video information etc. if you want (Confluence/Estuary only currently).

Version 2 of the addon (June 2021 on), looks like this:

...you get the idea... (all of these are using the SkinPatcher mentioned below to customise the Weather section)

Instructions

Go into Get More Add-Ons and choose Weather -> OzWeather... (Oz Weather is in the official Kodi repo). For radar support, see notes below on skin changes and a tool to help with this.

NB if you experience errors running OzWeather, particularly if using profiles other than the Master profile, please check in Settings->System->Addons->Manage Dependencies and make sure that the pytz, requests and urllib3 modules are all enabled!

To Configure - First, go to Kodi settings->Weather and choose the OzWeather add on as your selected weather information add on.

In the add on settings you can add up to three BOM locations - you can enter either your postcode or suburb - it will prompt you to choose from a list of matching locations. Ideally, enter locations in the 'Fallback' settings page as well - this will mean that if ever the BOM API is not available, the add-on will fall back to scraping data from an alternative site (WeatherZone). That data is not as accurate, but it's still a lot better for Australian data than other weather addons.

If you enable the extended features (see skin changes required below!) - you can have animated radars. The addon auto-selects the closest radar to you, but you can overrule this if you wish by manually putting in any BOM radar code. To find a radar code, go to the BOM site and find the radar you want, then check the url:

http://www.bom.gov.au/products/IDR023.loop.shtml#skip

...the code you need to enter (precisely) is IDR023

...there is also a list of Radar IDs and what they are on the BOM site. Note not all codes actually work all the time, as some radars are only in part time use. The main capital city ones work well, e.g. IDR023 above which is the Melbourne 128km loop, or try IDR00004 for a nice national radar.

There is a map here with radar locations - if you hover your mouse over one of the radar diamonds, you can read the code you need from there: http://www.bom.gov.au/australia/radar/

Notes: If ever you experience issues with missing radar background images, wait a day or two, then use the 'purge backgrounds on next refresh' option in the add-on settings, and with luck your backgrounds will be re-downloaded on the next run.


Skin Changes

If you enable the extended forecasts & radar, skin changes are needed.

Utility to Patch Skins

If you're on Kodi Matrix and above, and you're using Estuary, Estouchy, Amber, Aeon Nox Silvo, Aeon Tajo, OSMC, Confluence or Xonfluence as your skin, I have written a utility tool to make this MUCH easier.

Note that your skin folder MUST be writeable by the addon for this to work (for the -elec version of Kodi, see below, and if you're on some Android platforms, you _may_ need a rooted device - nothing I can do about this, sorry!).

I am in theory happy to add support for other skins (and especially if you can develop & supply working skin files for the current Kodi version!) - just let me know what skin support you're after in the OzWeather forum thread.

To install the utility - you will need to install my repo...download the latest .zip for that here: https://github.com/bossanova808/repository.bossanova808/tree/master/repository-downloads/repository.bossanova808

Install that, and then install the 'OzWeather Skin Patcher' add-on from that repo. Then, just run it. It can both patch and restore the skin files as needed.

With Confluence and Estuary you get the added bonus of some weather info during playback when you show the video info. With Confluence either the Info (i) or Menu (m) will bring it up, with Estuary just the Menu (m). It looks roughly like this:

Using Corelec / LibreElec with Estuary?

In the case of the -Elec Kodis, unfortunately the main skin folder is not writeable. This is unfortunately just part of how the -elec versions of Kodi are set up. Here are your options:

  • Don't use Estuary! Use one of the other supported skins (as, let's face it, Estuary is a low point for Kodi default skins anyway, so you're not missing much...)
  • Or - create your own version of Estuary. Copy the whole estuary folder into your (writeable) addons folder, modifying the addon id in addon.xml to give your version a unique name (e.g. skin.estuary-mymod). To then keep your special version of the skin up to date, create a script and set it up to run by cron (or alternatively add these commands to your autostart.sh if you're using one of those) - with the following content (changing the folder name to whatever you've named your personal skin of course):
            #!/bin/sh
            rsync -a --exclude 'addon.xml' --exclude 'MyWeather.xml' --exclude 'VideoFullScreen.xml' /usr/share/kodi/addons/skin.estuary/ /storage/.kodi/addons/skin.estuary-mymod/
            /usr/bin/python /usr/bin/kodi-send -a ReloadSkin

The Manual Approach

Otherwise, if you're some sort of masochist, you can take a manual approach to patching your skin files , using these instructions/files...note that there are updates to these files in the skin patcher add on so use that if at all possible.

You just need to copy some files into your skin/720p or skin/xml folder. Note this *will* break compatibility with other weather add ons, so best to back up the original files first if you're worried about this. Also, you'll have to do some manual search and replacing in the skin files, as the skin patcher uses a 'template tags' system to let folks change text and background colours. You'll need to manually do the equivalent of this python code:

           new_data = new_data.replace('_colour_text_default_', ADDON.getSetting('colour_text_default'))
           new_data = new_data.replace('_colour_text_dim_', ADDON.getSetting('colour_text_dim'))
           new_data = new_data.replace('_colour_text_dimmer_', ADDON.getSetting('colour_text_dimmer'))
           new_data = new_data.replace('_colour_text_high_temp_', ADDON.getSetting('colour_text_high_temp'))
           new_data = new_data.replace('_colour_text_low_temp_', ADDON.getSetting('colour_text_low_temp'))
           new_data = new_data.replace('_background_visible_', 'yes' if ADDON.getSettingBool('background_visible_bool') else 'no')
           new_data = new_data.replace('_background_opacity_', ADDON.getSetting('background_opacity'))

(Another approach, perhaps, would be to run the skin patcher once, then grab the skin files it has generated with your preferred colours, and save those off somewhere for your later purposes...but of course you won't benefit from any future updates to those skin files...)

The latest version of the skin files can be found at: https://github.com/bossanova808/repository.bossanova808/tree/master/staging/script.ozweather-skinpatcher/resources/skin-files

...but for 99% of folks, the skin patcher add on above is the much easier alternative - so try that first!

Support & Troubleshooting

I've been supporting this add on for more than 10 years now. I use it myself, of course, and I keep it working as smoothly as the upstream sources allow me to.

If things don't work as expected and you need to ask for help - always supply a link to a FULL DEBUG LOG so I have some real chance of helping you. I will check it and help, if you supply it. But log snippets, or logs without debug logging, are NOT enough.

If you're having problems running the add on (and especially if you use Kodi profiles) - make sure the pyzt module is installed AND enabled, for the profile you're using specifically. (System -> Addons -> Manage Dependencies...).

If using a manual radar code, do check your radar code carefully - is it _exactly_ as the BOM one - i.e. IDR023 or similar. You must include the IDR part! Does the URL in the debug log load if you paste it in to your browser?

Any issues, please post them on the Kodi forum thread.