Australian Weather Forecast using BOM Public FTP

Same problem I have living in central Victoria.
As such I wrote another weather component based on the www.willyweather.com.au data (from BoM) that takes readings from nearby weather stations, rather than a single one. That way, all the data is populated.
Look for WillyWeather in these forums if you are interested.

Hi - I upgraded to the HACS version of this integration from one I manually installed. My only change to the config was to add the icon, fire danger and UV.

I use friendly mode, and now I only get only one day sensor (tomorrow).

Based on the error in the logs, I removed the new monitored conditions and it now works. Any suggestions?

  - platform: bom_forecast
    name: MyName
    forecast_days: 6
    rest_of_today: True
    friendly: true
    friendly_state_format: '{min} to {max}, {summary}'
    product_id: IDV10703
    monitored_conditions:
      - 'max'
      - 'min'
      - 'chance_of_rain'
      - 'possible_rainfall'
      - 'summary'
      - 'detailed_summary'
      - 'icon'
      - 'uv_alert'
      - 'fire_danger'

This is the error in the logs:

Log Details (ERROR)
Thu Dec 05 2019 17:34:59 GMT+1100 (Australian Eastern Daylight Time)
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 275, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 309, in _async_write_ha_state
    state = self.state
  File "/config/custom_components/bom_forecast/sensor.py", line 361, in state
    condition, self._index))
  File "/config/custom_components/bom_forecast/sensor.py", line 425, in get_reading
    _FIND_QUERY.format(index, 'uv_alert')).text
AttributeError: 'NoneType' object has no attribute 'text'

I have only tested:

    friendly_state_format: '{max}, {summary}'

With the icon and new conditions. Did you try that?

Just testing a fix for this now. Will release a new version shortly. Thanks to @exxamalte again!

1 Like

Hi all, I have this in the config yaml.

sensor:
  - platform: bom_forecast
    product_id: IDW12300
    name: Perth
    forecast_days: 6
    rest_of_today: True
    friendly: True
    friendly_state_format: '{max}, {summary}'
    monitored_conditions:
      - 'max'
      - 'min'
      - 'chance_of_rain'
      - 'possible_rainfall'
      - 'summary'
      - 'detailed_summary'
      - 'fire_danger'
      - 'uv_alert'

When I add the glance card, I find that the icons are missing for some days.

Annotation 2020-01-27 121605

Also, I could not figure out how to produce a glance card that is like this?

Appreciate help please.

This component (an updated component with more features) and the Lovelace card are both available in HACS. Maybe check this thread here https://community.home-assistant.io/t/customising-the-bom-weather-and-lovelace-now-in-hacs/

Many thanks David. I have now installed HACS, and installed both the BOM Forecast integrations + BOM Weather Card plugins as per instruction.

I have also added the following to config yaml

sensor:
  - platform: bom_forecast
    product_id: IDW12300
    name: Perth
    forecast_days: 6
    rest_of_today: true
    friendly: false
    friendly_state_format: '{max}, {summary}'
    monitored_conditions:
      - 'max'
      - 'min'
      - 'chance_of_rain'
      - 'possible_rainfall'
      - 'summary'
      - 'detailed_summary'
      - 'icon'
      - 'uv_alert'
      - 'fire_danger'

But I still could not figure out how to create that cool looking glance card like the image above? I know I am missing something I just could not figure out what?

Please use the other thread and post your BOM component configuration as well as the FTP component and post your lovelace configuration as well. Can’t really help without much more info.

Hello All,

I am from a small north east town in Victoria. On the bom website the forecast my product_id is made up from product derived from IDV10753 and IDV17003. How do i set this up as i single product_id? I have tried entering one or the other and it fails on both. The sensor works fine if i say put it IDV10450 (Melbourne).

Thanks

It won’t support that unfortunately.

Thanks anyway, I select a town that’s close by for now.

Yeah that’s the best approach as I suggested up above to someone else.

@DavidFW1960 and @BrendanMoran Thank you guys for the Bom forecast integration and the BOM weather card. I live in the sydney region and use the Prod ID of IDN10064 for the forecast however I live in the north western suburbs.

Upon looking at the IDN10064.xml the forecast for certain cities are also available within this xml.
E.g. The location of Penrith within the file provides the forecast for 7 days. While the remaining locations Liverpool, Parramatta etc. provide 1 day which will be the most accurate for any suburbs closest to those locations.

Is there a way to provide a mechanism to extract this data rather than using the Syd location forecast which is rather inaccurate for the different locations within Syd?

I will have a look at this when I am back home next week. Busy with family for a few days.

2 Likes

ok so yeah… seen this before. Liverpool looks like this:
image
It uses a combo of 2 IDNs for it’s data.
I have not looked at supporting that and it’s really above my hacking abilities at this point to do so.
I’d suggest picking the best station with a single IDN number for your location. Sorry.

Let me try to explain a bit more…
For Syd the file / IDN number which the forecast gets extracted from is IDN10064.xml which looks like

Data is extracted from the area type = “metropolitan” and “location” nodes where the description is “Sydney” which is essentially the weather for the city.

However Penrith also provides a 6 day forecast, but there is no way to access this info.

The rest of the nodes however only provides today’s forecast.

If there is a way to pass this secondary location (e.g. Penrith which can override the default which is description=“Sydney”) and extract the corresponding info one might get more accurate info if they are closer to that location. Obviously if there is no source data it would be good to default to the corresponding node where description =“Sydney”.

My Python skills are almost none existent hence thought I would reach out to you and see if you would be able to do this.

No need to explain I understand the problem.
It uses 2 different data sets with 2 IDN’s. I only use one IDN in the FTP component amd there is no easy way for me to allow 2 IDN’s.
Yes of course it’s possible but way above my Python skills as well - I’m just a hacker and hacked in a few minor changes from Brendans original.

1 Like

Hey guys, seen what you have done here and it is excellent - i will look at integrating it into my system as it evolves and as i move more from my Node-red dashboard to HA.

Can i suggest it might be an idea to use Node-red as a middleman for this stuff ? It has excellent easy to use capabilties to enable extracting anything you want and to put it back out into a set format - so i was thinking as an evolution of this project - what about defining a middle layer/format that your system would accept for putting into HA. NR could then do the heavy lifting of bringing down the data and manipulating it into that format ?

regards

Craig

Why?
I don’t run NR, don’t intend to, don’t see any benefit over what is being done here.

My thought was that as you have said above you are only dabbling with python, and due to how the BOM works with the “stacked” forecasts for some regions that NR could be used to provide an easy to use graphical layer in the middle to enable people to massage the data into the format that you could set and expect each time, you could then spend your time managing the “front end” and middle layer and people could use NR (or any other tool) to put the data into the format that you are expecting.

Craig