[SOLVED] Australian Bureau of Meteorology Weather Forecast Binding

Also just downloaded the files, thanks for that!

Is there anything else I need to do other than just save them in the icon folder? I have updated PaperUI for bitmap. Are they needing to be dynamic icons?

My icons are in ā€˜/etc/openhab2/icons/classicā€™, they are static icons, kind of made dynamic by the statements in the sitemap.

ok cheers. Iā€™m now not getting any data.

Iā€™ve checked the IDā€™s and everything is correct, so not sure why itā€™s not working :confused:

Here is a script I use to check thing are working. Substitute your ID and PT values throughout the script to suit your location. Then simply run as ./bom_brisbane.py in the directory itā€™s located in, make sure it has executable permissions first of course.

So Iā€™ve noticed that when i modify the forecast icon line with , it removes the data to get the screenshot above.

Am i doing it right?

String BOM_Day1_ForecastIcon ā€œForecast Iconā€ <ā€˜weatherā€™> {channel=ā€œbom:weather:default:day1#iconā€}

without the ā€™ ā€™ though.

and then once it goes, even removing <weather> doesnā€™t bring the data back again, no matter how many times I refresh it.

String BOM_Day1_ForecastIcon ā€œForecast Iconā€ <ā€˜weatherā€™> {channel=ā€œbom:weather:default:day1#iconā€}

should be

String BOM_Day1_ForecastIcon ā€œForecast Icon [%s]ā€ <ā€˜weatherā€™> {channel=ā€œbom:weather:default:day1#iconā€}

The [%s] is important, itā€™s a placeholder for the return message.

Iā€™m not the best to explain the workings of the binding itself, I just came up with the sitemap to display the icon matching the conditions. Best to call up tomitan for the binding stuff.

No worries Iā€™ll give it a go. Iā€™ve also tried your python file, it kept saying ImportError urrlib.request and wouldnā€™t runā€¦ not sure what to do.

Hey there, sorry to disturb. Iā€™m having trouble getting the icons to work. @rastus_rob has been trying to help but this keeps happening when I add in the <weather> tag:

This is what I have for the item binding:

Not sure what I am doing wrong! Only had OpenHAB running a week or so, so am definitely still learning!

Hey Rob,

Did you still have a link to those icons?

Hey Jack, you can find 'em here:

Legend! Appreciate it :slight_smile:

1 Like

Hi Spicerackk,

I had a look at the icons provided by Rob, they will not work for you out of the box. If you would like dynamic icons to work the filenames must be named a certain way.

For example rename weather_cloudy_32.png to weather-cloudy.png

Please read https://www.openhab.org/docs/configuration/items.html#dynamic-icons for more info.

I believe Rob has some logic to work out which icon to use (see earlier post back in 1/4/2019) , but I suggest you use the dynamic icons way.

As a quick test that the page will show icons, replace <weather> with <weather_cloudy_32>. If you do not see an icon then most likely the icon file cannot be found. Once you are satisfied change back to <weather> and rename all those files accordingly.

Let me know you are still not getting data. You might have to wait a while or restart openHAB.

To answer your other question not all weather stations provide full set of data.

Regards,
Tom

Hi Nick,

Let me know what is your screen resolution and Iā€™ll see what I can do to help.

Hi guys,

Thanks for this great binding!

I have created the gif for the rain radar.
2020-01-27 20:17:04.476 [INFO ] [binding.bom.internal.BomImageHandler] - Generated GIF /etc/openhab2/html/IDR034.gif

How can I display this in a sitemap? Could you point me in the right direction?

Cheers

Hi,

Could anyone help with BOM radar image THING definition?
Thanks

Thanks, I am using the weather data and it works like a charm.

All, has this binding disappeared? I cant see int in the market place and its not showing in my bindings all of a sudden :confused:

I had the same problem last nigh, I downloaded the zip here:

Copy the ā€˜.jarā€™ file from ā€˜org.openhab.binding.bom-master/target/ā€™ directory in the zip file to the ā€˜/usr/share/openhab2/addons/ā€™ directory.

Worked for me.

1 Like