BOM Radar and Oz Weather in Kodi (Media Player)



Originally posted 2018-02-15 11:44:33.

kodi runs on a raspberry piThis article will help you configure the BOM Radar and weather forecasting in Kodi and make the skin persistent. Read on and I’ll explain.

As part of my Home Theatre systems, I use a device that runs the open source media player, Kodi.

Kodi is the ‘new’ name for an open source program that started as the Xbox Media Centre (XBMC).

Way back when I first started running this, there were a few ways to run it on a Raspberry Pi. There was a product called Openelec (still around I think) and a modified version of Raspbian (the official operating system for a Raspberry Pi) called Raspbmc. This was retired in 2013 and the developer wrote a whole new product called OSMC (Open Source Media Centre). The developer, (main developer anyway) Sam Nazarko also developed a specialised piece of hardware called a Vero that he has for sale on his OSMC site.

I did originally purchase the Vero version 1 and when the Vero 4k came out I upgraded to one of those as well – I believe in supporting great open source products. OSMC also has a vibrant user community forum here.

One of the features of Kodi is that it can be configured with a weather forecast application and will show temperature on the main screen and also weather forecasts if you go into the application. The ‘Gold’ standard for weather applications in Australia is the Australian Bureau of Meterology’s BOM forecasts. You can find BOM online here. Comprehensive weather information and weather radars for all around Australia are available.

Kodi uses what they call ‘skins’ that change the look and feel of the end user experience – the underlying software is the same for any skin but the way information is presented and the GUI (graphical user interface) varies with different skins.

If you run the Oz Weather add-on in Kodi and use the default Estuary skin, here is what the weather forecast looks like:

BOM Weather with Radar in Kody Estuary skin

 

All looks great right? Well actually I’m fibbing a bit. To make the forecast screen look like this, you need to download an extra file that modifies the skin.

I’ll back up a bit. First things first. To run BOM weather, you need to install the Oz Weather add-on. Click the link to go to the page and install that add-on first. To configure the add-on, you will also need to visit the BOM site to get the code number for the radar (like IDR024 in the screen shot above). What you also need to do is to look in the section on that site – 1.4 Skin Changes and download the skin changes for the skin you are using. The default Kodi skin is Estuary and the old default (pre Kodi Krypton) was confluence. I quite like the estuary skin but it seems the add-on author hates it for some reason. There are additional skin customisation files there for a few different Kodi skins.

Where do I copy those files to?

This is where it gets interesting. The zip file with the skin customisations contains 2 or 3 files. For Estuary, there are only 2 files – MyWeather.xml and DialogSeekBar.xml. The cryptic instructions tell you to copy those files to your ‘720p or xml folder in your local skin installation folder’. Very helpful. NOT!

So I had to go on a hunt and search to find the local skin installation folder. I found it at:

/use/share/kodi/addons/skin.estuary/xml/

Note – you will need to install WinSCP or similar so you can access the file system. See my article Connecting to Linux using PuTTY and WinSCP for details.

osmc vero 4 winscp bom radar

Here you can see the skin folder (on the right hand side) and my local folder on the left with the xml files to be copied. These are copied from left to right and overwrite the existing skin files. Note if you use a different skin, you will have to work out where the skin files are but use my example as a guide.

I thought I was done! I restarted Kodi and the BOM Radar was displaying perfectly. Then, a few days later, I had an update for Kodi and my skin modification was lost.

What happens to BOM Radar when Kodi updates?

Well, what happens is all the changes are lost and it goes back to just showing a list of temperatures forecast for the next week with no radar.

It appears that this will happen every time I get an update for Kodi. So there are a number of things you can do to stop this happening.

  1. First thing you can do is you can not apply any updates. Not a great idea in my opinion.
  2. Second, you could create a new skin – a copy of the original so I could create a copy called estuary-mod for example. To do this you would copy the Estuary skin entirely and rename the skin name to create your own skin. To do this:
    Using PuTTY execute: cp -a /usr/share/kodi/addons/skin.estuary /usr/share/.kodi/addons/skin.estuary-mod (Note the .kodi in the destination folder – if it is copied to .kodi it will be backed up with other files as part of your regular backups)
    Go into the mod directory (/usr/share/.kodi/addons/skin.estuary-mod) and edit addon.xml, changing the add-on ID (to match the folder name) and name (to something you’ll recognize as the mod).
    Restart Kodi
    Go into the add-ons section in Kodi and enable the mod and then switch to it
    Sounds like fun doesn’t it?
    The disadvantage of doing this is you won’t get any updates or changes to the skin. Personally I don’t like that idea.
  3. Third way is to manually overwrite the files everytime there is an update. Not ideal in my opinion.
  4. Fourth way is to sync the files on some kind of schedule. To do this you will need to have rsync (to sync the files) and cron (to schedule rsync to run) installed. On my OSMC system. neither of these were installed by default. To install them, from PuTTY run the following commands:
    sudo apt-get install rsync
    sudo apt-get install cron

    Next, create a bash script
    sudo nano skin.sh

    Copy and paste this code there and save:
    #!/bin/bash
    /usr/bin/rsync -a /home/osmc/.kodi/addons/BOM-Krypton/ /usr/share/kodi/addons/skin.estuary.xml

    Then we need to make that script executable
    chmod +x /home/osmc/skin.sh

    Then to add the cron so it runs at say midnight every night
    sudo crontab -e

    And paste in this line
    0 0 * * * /home/osmc/skin.sh

    This will copy the files over every night at midnight. I know it looks like a lot of lines but it’s pretty quick to do and it’s a once off. You should still probably be on the lookout for changes to the skin itself but these are rare and if the skin stops working, you should check the add-in site to see if there is an update for these files.

Hope this is helpful. I love having the BOM Radar skin in Kodi and this keeps it running nicely on my system. Just one final note – if the skin is updated and the files get copied at midnight, the next day or the next time you see the radar is not displaying correctly, you may need to restart Kodi so it reloads the skin.



Leave a Reply