This binding retrieves Australian weather forecast and meteorological images from Bureau of Meteorology for use in openHaB/Eclipse Smarthome.
This binding maps most fields from BOM data-feed. For today's observation and forecast these are available:
For future forecasts the following fields are available:
BOM images, like rain radar, rainfall and satellite images, can retrieved and processed. You have the option of:
See below for more details.
For openHAB install Eclipse IoT Market add-on under MISC tab in openHAB Paper UI. Then install Australian BOM Weather Forecast Binding from the Bindings page.
For Eclipse SmartHome install from https://marketplace.eclipse.org/content/australian-bom-weather-forecast-binding.
Download the latest jar below for your openHAB version and copy to the openHAB addons
directory.
Version 3.2.x Download
Version 3.0.0 Download
Version 3.0.3 Download
Version 2.5.9 Download
Version 2.5.0 Download
Unfortunately, it can be quite daunting to configure this binding due to the lack of index of all the data files available from BOM. Hopefully the details below is sufficient to get the binding up and running on your openHAB. In the future an external tool might be coded to make this binding less difficult to configure.
At minimum there are five values required to process the data-feed from BOM. The observation product ID, the weather station ID of observation, the precis product ID, the city/town product ID and finally the area code.
Observation product ID and weather station enables you show the relevant current weather information in your area. Precis forecast data provides brief forecast information for the next 5-8 days. City/town/district forecast data provides the detailed forecast description.
Listed below is the observation product ID's for the states. Enter the ID you need into the Observation product ID field in Things configuration in openHAB.
State | Observation Product ID |
---|---|
NSW | IDN60920 |
ACT | IDN60920 |
NT | IDD60920 |
QLD | IDQ60920 |
SA | IDS60920 |
TAS | IDT60920 |
VIC | IDV60920 |
WA | IDW60920 |
The next step is to open the product XML by loading ftp://ftp.bom.gov.au/anon/gen/fwo/{product-id}.xml
in your browser. Replace {product-id}
with the ID of your state from the table above. Locate the weather station of interest. Copy the wmo-id
number and use this as the Weather station ID.
For example: PERTH METRO station ID in the file ftp://ftp.bom.gov.au/anon/gen/fwo/IDW60920.xml
is 94608
.
Next you will need to provide the precis forecast product ID and city/town/district forecast product ID.
Below is a list of the forecast product ID's for Australian major cities. If you do not live in the cities listed below then follow the instruction to locate your city, town or district.
City | Precis Forecast Product ID | City Forecast Product ID |
---|---|---|
Darwin (NT) | IDD10207 | IDD10150 |
Canberra (ACT) | IDN11060 | IDN10035 |
Sydney (NSW) | IDN11060 | IDN10064 |
Newcastle (NSW) | IDN11060 | IDN11051 |
Central Coast (NSW) | IDN11060 | IDN11052 |
Wollongong (NSW) | IDN11060 | IDN11053 |
Alpine Centres (NSW) | IDN11055 | IDN11055 |
Brisbane (QLD) | IDQ11295 | IDQ10095 |
Gold Coast (QLD) | IDQ11295 | IDQ10610 |
Sunshine Coast (QLD) | IDQ11295 | IDQ10611 |
Adelaide (SA) | IDS10044 | IDS10034 |
Hobart (TAS) | IDT16710 | IDT13600 |
Launceston (TAS) | IDT16710 | IDT13610 |
Melbourne (VIC) | IDV10753 | IDV10450 |
Geelong (VIC) | IDV10753 | IDV10701 |
Mornington Peninsula (VIC) | IDV10753 | IDV10702 |
Perth (WA) | IDW14199 | IDW12300 |
NOTE: If the forecast product ID's you are after are not in the list go to this catalogue page http://reg.bom.gov.au/catalogue/anon-ftp.shtml and search for the products. The type must be "Forecast". Use the Search box on the page by entering, e.g "(WA)", or something more specific like "City Forecast":
Precis Forecast XML Package ({your-state})
from the search results and enter the product ID into the field Precis forecast product ID back in Thing configuration.City Forecast - {your-city} ({your-state})
for city forecasts OR Town Forecast - {your-town} ({your-state})
for town forecasts OR District Forecast - {your-district} ({your-state})
for district forecasts from the search results. Enter the product ID into the configuration field City/town/district forecast product ID in openHAB configuration.Now open either the precis or the city/town/district forecast XML (ftp://ftp.bom.gov.au/anon/gen/fwo/{product-id}.xml
) and locate the area code (aac
code).
For example: Perth's aac code in ftp://ftp.bom.gov.au/anon/gen/fwo/IDW12300.xml
is WA_PT053
.
Save your configuration. openHAB will begin to download all the required weather information in a few seconds and made available to you to display.
For more information about data-feeds, please go to http://reg.bom.gov.au/catalogue/data-feeds.shtml
Screenshot below shows an example configuration in Paper UI.
The following table shows all the possible icon names returned by the channel. You may use these to determine which forecast icon to show in the mobile app/browser. Setting this up is beyond the scope of this document. Discussion about this is available in the openHAB community forum.
Forecast | Icon name |
---|---|
Sunny | sunny |
Clear | clear |
Mostly sunny | mostly-sunny |
Cloudy | cloudy |
Hazy | hazy |
Light rain | light-rain |
Windy | windy |
Fog | fog |
Shower | shower |
Rain | rain |
Dusty | dusty |
Frost | frost |
Snow | snow |
Storm | storm |
Light shower | light-shower |
Heavy shower | heavy-shower |
Cyclone | cyclone |
Creating items and linking them for eight days of forecasts can be tedious. Provided below is the items mapping file that you can drop into the "items" folder, typically in /etc/openhab2/items
under Linux or C:\openHAB2\conf\items
under Windows. The prerequisite is to name the BOM Thing ID "default". If you would like name your BOM Thing ID as something else, edit the file and rename accordingly.
https://github.com/tomitan100/org.openhab.binding.bom/raw/master/doc/bom.items
Also provided below is the site map where you can modify and drop into /etc/openhab2/sitemaps
.
https://github.com/tomitan100/org.openhab.binding.bom/raw/master/doc/bom.sitemap
BOM images, like rain radar loop, are made up of a series of transparent PNG files, which get updated frequently as data is made available. These images contain only the transparent radar/satellite scans and do not include static overlays like the the background, topography, locations, borders, etc. The final image is built by overlaying all the images in the correct order.
BOM Image binding can create final image(s) of each radar or satellite image sequence or series as PNG images or a single animated GIF or both. This makes it easier for you to display radar loops in the browser/viewer without having to code Javascript to assemble the image overlays.
By default, BOM Image binding retrieves rainfall radar sequence of images from ftp://ftp.bom.gov.au/anon/gen/radar/ and static overlay images from ftp://ftp.bom.gov.au/anon/gen/radar_transparencies/.
You have the option to use images from different paths to generate other kinds of weather images. Please look at example configurations for other images here.
Configuring weather images does look daunting at first but it is not. If you read through the instruction below you should have no problems.
For rainfal radar images, the first step is to determine the product ID of the images you are after. You can do this easily by searching "IDR" in BOM's catalogue page http://reg.bom.gov.au/catalogue/anon-ftp.shtml. Another way is to note the product ID in the "Rainfall Radars" URL itself. e.g http://www.bom.gov.au/products/IDR701.loop.shtml.
Note that each radar range is under different product ID.
Examples for Perth radar loop:
In the configuration screen typically you would only care about changing the Product ID to the rainfall radar you would like to show, and turning on Generate animated GIF. For other products please see example configurations in this document.
On this screen you also have the option to modify the layer ordering, add additional layer, generate PNG images, generate animated GIF, change the delay between GIF images in the animated gif, enable GIF looping, enable local timestamp, configure local timestamp properties, apply post processing to the image, change image output path and output filename.
FTP server: This is the BOM's FTP server.
Images directory path: The location of the images sequences relative to the root directory of the FTP server.
Image product ID: The product ID as described above.
Transparencies directory path: The location of the static background and foreground images relative to the root directory of the FTP server.
Regular expression for image file filter: Under some scenarios it is necessary to provide more specific filter by the use of regular expression. This is an optional field.
Date range to search:
The date range to search. Valid values are: last_#d
(last # days), last_#h
(last # hours), last_#m
(last # minutes), last_#s
(last # seconds), today
and yesterday
. e.g last_15m
to include files only from the last 15 minutes. Specific start/end date is not yet supported.
Image layers configuration: The list of layers to merge. See below for details.
Monitoring interval in minutes: The interval to check for new files.
Generate PNG images: Generate individual images from series.
Generate animaged GIF: Generated animated GIF from series.
GIF image delay time in ms: The number of milliseconds to pause before showing the next image sequence/frame.
Enable GIF loop: If enabled GIF will restart when the last frame is reached.
Embed local timestamp: Embed local timestamp in each image.
Local timestamp properties: The timestamp's font face, font size, font weight, font decoration, font style, font colour and position configuration.
TIFF image index: High-definition images, like from Himawari-8 satellite, are stored in a single TIFF image file. There are five images in the file and each image is of varying resolution; zero being the highest resolution (6111x4167), four being lowest resolution (510x350). The default image index is 3. The use of image index 0 or 1 is not recommended unless your system can handle it.
Image post-processing: Post processing applied to the final image. See below for details.
Image output path: The path to output the generated images.
Image output filename:
The name to give to the filename. This field can also accept bind variable ${pid}
, which is the ID entered in the Product ID field.
Each layer is separated by a semicolon and each setting for the layer is separated by a comma. The order of the layer determines the layer merge order.
Each layer at minimum must contain the full image file name. The layer where each of the series/sequence image to be merged must be named ${series}
.
For example (taken from default configuration):
image=IDR.legend.0.png; image=${pid}.background.png; image=${pid}.topography.png; image=${series}; image=${pid}.locations.png; image=${pid}.range.png
Explanation:
${pid}
is the placeholder for product ID and gets replaced by the product ID you entered in the product ID field. If your product ID is IDR701 then it is equivalent to entering image=IDR701.background.png
.image=${series}
, is the placeholder for the image series. ie. the radar scan image.${pid}.wthrDistricts.png
, ${pid}.waterways.png
, ${pid}.roads.png
, ${pid}.rail.png
, ${pid}.catchments.png
. Including/excluding these transparencies is equivalent to toggling these feature on/off on the BOM website.Below is a list of supported external image sources:
URL Type | Description | Example | |
---|---|---|---|
http | HTTP protocol | image=http://www.openhab.org/openhab-logo.png | |
https | Secure HTTP protocol | image=https://www.openhab.org/openhab-logo.png | |
ftp | FTP protocol | image=ftp://ftp.bom.gov.au/anon/gen/radar_transparencies/IDR.legend.0.png | |
file | Local file | image=file:///etc/openhab2/html/location_24.png |
Operation | Parameters | Example | Notes |
---|---|---|---|
opacity | opacity | opacity=0.5 | Valid values are 0.0 to 1.0. 0 = completely transparent (invisible), 1 = complete opaque. |
resize | width height | resize=600 600 | width and height in pixels, must be positive numbers. |
crop | x y width height | crop=0 12 512 500 | x and y are the starting coordinate relative to top-left of the canvas. width the number of pixels from x to include. height is the number of pixels from y to include. |
position | x y | position=200 148 | reposition top-left corner of the image to the provided x and y coordinate. |
canvas | width height x y background-colour | canvas=512 700 0 0 #606060 | x and y are the starting coordinate relative to top-left of the canvas. If no background-colour provided the background will remain transparent. |
Attribute | Description |
---|---|
format | The date format in Java. |
adjust-timestamp | Adjust the timestamp. Valid values: [-]#d, [-]#h, [-]#m or [-]#s. e.g adjust-timestamp=-5m |
font-face | The font face to use. Default is Arial. Fonts availability is system dependent. |
font-size | The point size of the font. |
font-color | The colour of the font in hexadecimal. |
font-weight | The thickness of the font. Valid values: normal, bold. |
font-style | The posture of the font. Valid values: normal, italic. |
font-decoration | The decoration for the font. Valid values: none, underline. |
position | The position of the timestamp in x and y coordinate. |
Region | Satellite View | Product ID | Regular expression |
---|---|---|---|
Australia | False colour temperatures | IDE00134 | IDE00134.\d{12}.* |
Australia | Infrared, greyscale | IDE00105 | IDE00105.\d{12}.* |
Australia | Visible, greyscale | IDE00106 | IDE00106.\d{12}.* |
Australia | Infrared, Zehr enhanced | IDE00133 | IDE00133.\d{12}.* |
Australia West | False colour temperatures | IDE00124 | IDE00124.\d{12}.* |
Australia West | Infrared, greyscale | IDE00125 | IDE00125.\d{12}.* |
Australia West | Visible, greyscale | IDE00126 | IDE00126.\d{12}.* |
Australia West | Infrared, Zehr enhanced | IDE00123 | IDE00123.\d{12}.* |
Australia East | False colour temperatures | IDE00144 | IDE00144.\d{12}.* |
Australia East | Infrared, greyscale | IDE00145 | IDE00145.\d{12}.* |
Australia East | Visible, greyscale | IDE00146 | IDE00146.\d{12}.* |
Australia East | Infrared, Zehr enhanced | IDE00143 | IDE00143.\d{12}.* |
Full Disk | False colour temperatures | IDE00154 | IDE00154.\d{12}.* |
Full Disk | Infrared, greyscale | IDE00155 | IDE00155.\d{12}.* |
Full Disk | Visible, greyscale | IDE00156 | IDE00156.\d{12}.* |
Full Disk | Infrared, Zehr enhanced | IDE00153 | IDE00153.\d{12}.* |