Giter VIP home page Giter VIP logo

Comments (28)

bremor avatar bremor commented on May 31, 2024 6

Thanks for the suggestion, https://weather.bom.gov.au/ does have weather warnings so i'm sure I could include this. I will have a crack at this in the next couple of weeks.

from bureau_of_meteorology.

devonuto avatar devonuto commented on May 31, 2024 6

What happened to this? Seems like an excellent inclusion for announcing warnings over smart devices/ shutting roller shutters/ garage doors.

from bureau_of_meteorology.

StormyKnight17 avatar StormyKnight17 commented on May 31, 2024 2

+1 for a severe weather alert entity

https://api.weather.bom.gov.au/v1/locations/r3gx2f/warnings
r3gx2f is the geohash for Sydney area.
Use http://geohash.co/ to enter gps coordinates & set to 6 digits to find the geohash for your area.

Once you have the response, you then need to be able to scrape the provided warning page to see if your town is mentioned (or a close major town). Some warning areas are quite big so a warning may not apply to you without the town information.

from bureau_of_meteorology.

bremor avatar bremor commented on May 31, 2024 1

Just documenting my findings here...

https://api.weather.bom.gov.au/v1/locations/r3gx2f/warnings

{"metadata":{"response_timestamp":"2020-12-28T05:02:19Z"},"data":[{"id":"NSW_PW005_IDN21033","type":"severe_thunderstorm_warning","title":"Severe Thunderstorm Warning for Sydney Metropolitan forecast district","short_title":"Severe Thunderstorm Warning","state":"NSW","warning_group_type":"major","issue_time":"2020-12-28T04:55:48Z","expiry_time":"2020-12-28T10:55:48.000Z","phase":"update"},{"id":"NSW_ME017_IDN21035","type":"severe_thunderstorm_warning","title":"Severe Thunderstorm Warning for New South Wales","short_title":"Severe Thunderstorm Warning","state":"NSW","warning_group_type":"major","issue_time":"2020-12-28T04:00:40Z","expiry_time":"2020-12-28T06:00:40.000Z","phase":"update"},{"id":"NSW_MW009_IDN20400","type":"marine_wind_warning","title":"Marine Wind Warning for New South Wales","short_title":"Marine Wind Warning","state":"NSW","warning_group_type":"major","issue_time":"2020-12-27T23:20:40Z","expiry_time":"2020-12-28T07:20:40.000Z","phase":"update"}]}

from bureau_of_meteorology.

glenn20 avatar glenn20 commented on May 31, 2024 1

PR #125 collects data from the warnings API and presents it through an optional "warnings" sensor. The state of the sensor is the number of warnings returned and the warnings data is available as a list from the "warnings" attribute on the sensor.

Comments and suggestions are welcome. Is this sufficient to address the request? It is not obvious what more to do with the data at this point.

from bureau_of_meteorology.

StormyKnight17 avatar StormyKnight17 commented on May 31, 2024 1

Using Brisbane as the location as it currently has 2 flood alerts....

`response_timestamp: 2022-05-18T00:11:45Z
copyright: This Application Programming Interface (API) is owned by the Bureau of Meteorology (Bureau). You must not use, copy or share this API without express permission from the Bureau. Please contact us for more information. Follow this link http://www.bom.gov.au/inside/contacts.shtml to view our contact details.
attribution: Data provided by the Australian Bureau of Meteorology
warnings:

  • id: QLD_RC097_IDQ20805
    type: flood_warning
    title: Flood Warning for Brisbane River downstream of Wivenhoe Dam
    short_title: Flood Warning
    state: QLD
    warning_group_type: major
    issue_time: '2022-05-17T22:51:08Z'
    expiry_time: '2022-05-19T01:51:08Z'
    phase: renewal
  • id: QLD_RC099_IDQ20815
    type: flood_warning
    title: Flood Warning for Logan River downstream of Yarrahappini
    short_title: Flood Warning
    state: QLD
    warning_group_type: major
    issue_time: '2022-05-16T23:49:51Z'
    expiry_time: '2022-05-18T02:49:51Z'
    phase: final

friendly_name: Brisbane Warnings`

This will list all warnings...

{%- for state in state_attr('sensor.brisbane_warnings', 'warnings') -%}
{{state.phase | upper}} - {{ state.title}}
{% endfor %}

RENEWAL - Flood Warning for Brisbane River downstream of Wivenhoe Dam
FINAL - Flood Warning for Logan River downstream of Yarrahappini

This will list only those that match a particular string in the title in this case. I have chosen "Brisbane" to distinguish the two, but you could search instead for "Thunderstorm" or choose another attribute to match by e.g. warning_group_type.

{% for state in state_attr('sensor.brisbane_warnings', 'warnings') -%}
{%- if 'Brisbane' in state.title %}
{{state.phase | upper}} - {{ state.title}}
{%- endif -%}
{%- endfor -%}

RENEWAL - Flood Warning for Brisbane River downstream of Wivenhoe Dam

Below is a Template Sensor. It shows "No Warning" if there is no matching warnings, & lists the warnings if they match. This one checks for a match of "Thunderstorm" in the title. Make sure you fix the indenting. :)

  • sensor:
    • name: Brisbane_Thunderstorm_Warning
      state: >
      {%- set ns = namespace(result=[]) -%}
      {% for state in state_attr('sensor.brisbane_warnings', 'warnings') -%}
      {%- if 'Thunderstorm' in state.title %}
      {% set ns.result = ns.result + [state.title + "\n"] %}
      {%- endif -%}
      {%- endfor -%}
      {% if ns.result|count == 0 %}
      {{"No Warnings"}}
      {% else %}
      {{ ns.result | list | join() }}
      {% endif %}

from bureau_of_meteorology.

Makin-Things avatar Makin-Things commented on May 31, 2024 1

There was an interesting update to the BoM mobile app yesterday. You can now configure push notifications for warnings. I haven't investigated how they are doing this yet and it will be painful to investigate as they use tls and to look at decrypted versions of that requires a rooted phone.
Unfortunately they haven't included the same feature in the desktop version of the app as yet, which is a lot easier to reverse engineer.

from bureau_of_meteorology.

pkeymeruu avatar pkeymeruu commented on May 31, 2024

Thanks for looking into it!

from bureau_of_meteorology.

bigwoof avatar bigwoof commented on May 31, 2024

I just noticed that some parts of Australia have a storm tracker, probably only around capital cities, for example, SEQ:
http://www.bom.gov.au/qld/forecasts/brisbane-thunderstorms.shtml

not sure if this is helpful information particularly since it is only for a small section of the country.

PS: the 0.9 update looks like it will add a lot of useful features! will update shortly

from bureau_of_meteorology.

nixmaster2000 avatar nixmaster2000 commented on May 31, 2024

Would definitely like to see a severe weather alert entity.

from bureau_of_meteorology.

Makin-Things avatar Makin-Things commented on May 31, 2024

@glenn20 thanks for the PR. I merged it and then found a small problem. If I untick observation sensors I get an error.
image
I don't use the observation sensors as I get that data by other means.

from bureau_of_meteorology.

glenn20 avatar glenn20 commented on May 31, 2024

Ah - I thought I tested that - obviously not. Fix coming.

from bureau_of_meteorology.

glenn20 avatar glenn20 commented on May 31, 2024

OK - PR #126 has a bugfix. It appears I must have accidentally deleted a few important lines after testing and before commit. The config dialog for the forecast sensors should work now.

from bureau_of_meteorology.

Makin-Things avatar Makin-Things commented on May 31, 2024

It has been merged and now works as expected. Now to wait for some warnings to be issued for around here.

from bureau_of_meteorology.

glenn20 avatar glenn20 commented on May 31, 2024

Note that this PR makes the warnings data available (based on geohash location as described above). However, there is currently no logic to filter by phase, warning_group_type or type. That can be done with an automation or template sensors, etc... Some filter logic could be added to the integration, but it would be complicated to construct an intuitive and easy config_flow to do that at config time. Any suggestions welcome.

Data is collected from the BoM warnings API. The state of the sensor is the number of warnings and the warnings data is stored as a list in the "warnings" attribute of the sensor, eg:

sensor.melbourne_forecast_warnings:
- state: 1
- Attributes:
      response_timestamp: 2022-05-16T13:03:47Z
      copyright: This Application Programming Interface (API) is owned by the Bureau of Meteorology (Bureau). 
          You must not use, copy or share this API without express permission from the Bureau. Please contact us for more 
          information. Follow this link http://www.bom.gov.au/inside/contacts.shtml to view our contact details.
      attribution: Data provided by the Australian Bureau of Meteorology
      warnings: 
      - id: VIC_MW005_IDV20600
        type: marine_wind_warning
        title: Marine Wind Warning for Victoria
        short_title: Marine Wind Warning
        state: VIC
        warning_group_type: minor
        issue_time: '2022-05-16T12:00:00Z'
        expiry_time: '2022-05-16T19:00:00Z'
        phase: cancelled
      friendly_name: Melbourne Forecast Warnings

from bureau_of_meteorology.

Makin-Things avatar Makin-Things commented on May 31, 2024

I have just released 1.1.8b which is a pre-release with this feature included. Would love to get some feedback.
Thanks to @glenn20 for creating the PR for it.

from bureau_of_meteorology.

StormyKnight17 avatar StormyKnight17 commented on May 31, 2024

Downloading 1.1.8b & will test.
BTW - I was stuck on 1.1.3 as any update failed to download. I had other integrations fail too, but some worked fine. Solution was to turn off IPv6 in the HA settings. It also fixed my Google Calendars which needed to be re authenticated & that would fail too.

from bureau_of_meteorology.

StormyKnight17 avatar StormyKnight17 commented on May 31, 2024

Ok, warnings seem to work ok. I added Thredbo since they currently have a severe weather warning & I was able to see the warning text. I created a simple custom:mushroom-template-card

{{ state_attr('sensor.thredbo_warnings', 'warnings')[0]["short_title"] }} - {{ state_attr('sensor.thredbo_warnings', 'warnings')[0]["phase"] | upper }}

Output> Severe Weather Warning - NEW

Will have to see the phase options as they appear. I know of new & cancelled so far.

Since a location could have multiple warnings I need to work on stepping through the list provided & filter on what I want to see etc....& create a template sensor to suit.

from bureau_of_meteorology.

nixmaster2000 avatar nixmaster2000 commented on May 31, 2024

A few active warnings in QLD at the moment to see the output. I've got phases "renewal", "final" and "cancelled" at the moment.

`response_timestamp: '2022-05-17T11:52:37Z'
copyright: >-
This Application Programming Interface (API) is owned by the Bureau of
Meteorology (Bureau). You must not use, copy or share this API without express
permission from the Bureau. Please contact us for more information. Follow
this link http://www.bom.gov.au/inside/contacts.shtml to view our contact
details.
attribution: Data provided by the Australian Bureau of Meteorology
warnings:

  • id: QLD_RC097_IDQ20805
    type: flood_warning
    title: Flood Warning for Brisbane River downstream of Wivenhoe Dam
    short_title: Flood Warning
    state: QLD
    warning_group_type: major
    issue_time: '2022-05-17T06:51:24Z'
    expiry_time: '2022-05-18T09:51:24Z'
    phase: renewal
  • id: QLD_RC099_IDQ20815
    type: flood_warning
    title: Flood Warning for Logan River downstream of Yarrahappini
    short_title: Flood Warning
    state: QLD
    warning_group_type: major
    issue_time: '2022-05-16T23:49:51Z'
    expiry_time: '2022-05-18T02:49:51Z'
    phase: final
  • id: QLD_PW015_IDQ21033
    type: severe_thunderstorm_warning
    title: Severe Thunderstorm Warning for Southeast Coast forecast district
    short_title: Severe Thunderstorm Warning
    state: QLD
    warning_group_type: major
    issue_time: '2022-05-17T08:04:44Z'
    expiry_time: '2022-05-17T14:04:44Z'
    phase: cancelled
    friendly_name: Springfield Warnings`

from bureau_of_meteorology.

Daneish avatar Daneish commented on May 31, 2024

The BOM integration on my HA doesn’t have a reconfigure button, so I added another BOM instance to add the warning sensor. Is that the best way to do it currently?

from bureau_of_meteorology.

Makin-Things avatar Makin-Things commented on May 31, 2024

That may work, but also might result in multiple sensors. Possibly the best way is to delete all of them and the add the one back you want. As long as you don't change the name everything will continue to work as before

from bureau_of_meteorology.

Daneish avatar Daneish commented on May 31, 2024

Thanks!

from bureau_of_meteorology.

Makin-Things avatar Makin-Things commented on May 31, 2024

@StormyKnight17 @nixmaster2000 any update on how you are using the warning data? I am interested as I am currently doing a major update (rewriting) the BoM Weather Card and I am thinking about how to include an option warning section.

from bureau_of_meteorology.

StormyKnight17 avatar StormyKnight17 commented on May 31, 2024

I have just created a template sensor that I use to show the current warning if any. I also have a speaker & phone notification triggered as well.

I search for thunderstorm at the moment to limit it from other warnings.

Not many warnings in my area till spring. I did add Brisbane during testing & that worked well as it had flood warnings at the time.

from bureau_of_meteorology.

StormyKnight17 avatar StormyKnight17 commented on May 31, 2024

So overnight we got two warnings generated,
Sheep Graziers Warning - which is self explanatory
Severe Weather Warning - which I'm not sure is.

The second has further details once you view the warning text on the bureau website.
"for DAMAGING WINDS"

Is there any way to get this data?

Current Warning http://www.bom.gov.au/products/IDN21037.shtml

Cheers

from bureau_of_meteorology.

nixmaster2000 avatar nixmaster2000 commented on May 31, 2024

@StormyKnight17 @nixmaster2000 any update on how you are using the warning data? I am interested as I am currently doing a major update (rewriting) the BoM Weather Card and I am thinking about how to include an option warning section.

I'm using the template sensors that @StormyKnight17 made above. I'm using one on my weather page listing all the current weather warnings with the template in a markdown card that's visible conditional on the warnings sensor being above 0. And then for the storm warning sensor I have that setup to show on my main dashboard when a storm warning is issued along with phone notifications. Haven't seen that one in action yet.

from bureau_of_meteorology.

Makin-Things avatar Makin-Things commented on May 31, 2024

Closing now as I don't think there is anything else to do here. Let me know if I am wrong.

from bureau_of_meteorology.

Makin-Things avatar Makin-Things commented on May 31, 2024

Just a heads up for those interested in warning info. I have added a doc to the repo that has the start of a reference for the BoM api's.

https://github.com/bremor/bureau_of_meteorology/blob/main/api%20doc/API.md

At the bottom I have started collecting values for a couple of fields type and phase. These lists are not complete, so feel free to submit a PR if you observe other values.

from bureau_of_meteorology.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.