[DEPRECATED] NOAA Weather Alerts

@aaron, you are a scholar!!! Thank you for your hard work and fantastic abilities..

2 Likes

So with the latest update (via Hubitat Package Manager), my event types got erased. I re-enabled them, along with some others I'd never seen before.

Today we got a severe t-storm warning, but I got no alert. I went to display the current weather.gov response and it gave me an error at the provided link (lat/lng removed):

https://api.weather.gov/alerts?point=XX.XXXXXX%2C-XX.XXXXXX&status=actual&message_type=alert&severity=severe,extreme&event=Civil%20Danger%20Warning,Civil%20Emergency%20Message,Earthquake%20Warning,Evacuation%20-%20Immediate,Law%20Enforcement%20Warning,Local%20Area%20Emergency,Nuclear%20Power%20Plant%20Warning,Radiological%20Hazard%20Warning,Severe%20Thunderstorm%20Warning,Shelter%20In%20Place%20Warning,Tornado%20Warning

{
    "correlationId": "7be4b21a-b2f1-4d53-b285-d8fda419d412",
    "title": "Invalid Parameter",
    "type": "https://api.weather.gov/problems/InvalidParameter",
    "status": 400,
    "detail": "Parameter \"event\" is invalid: This value is not valid.",
    "instance": "https://api.weather.gov/requests/7be4b21a-b2f1-4d53-b285-d8fda419d412"
}

Not sure what the problem is, but I'm guessing some of those event types are invalid. Maybe I should reset to what I had before (T-storm and Tornado warnings only).

Thank you! Let me research more as this should work based of weather.gov documentation.

Thank you!

Here's the link and response I got with only Severe T-storm and Tornado enabled. Again, I removed my exact lat/lng:

https://api.weather.gov/alerts?point=39.XXXXXX%2C-77.XXXXXX&status=actual&message_type=alert&severity=severe,extreme&event=Severe%20Thunderstorm%20Warning,Tornado%20Warning

{
    "@context": [
        "https://raw.githubusercontent.com/geojson/geojson-ld/master/contexts/geojson-base.jsonld",
        {
            "wx": "https://api.weather.gov/ontology#",
            "@vocab": "https://api.weather.gov/ontology#"
        }
    ],
    "type": "FeatureCollection",
    "features": [
        {
            "id": "https://api.weather.gov/alerts/NWS-IDP-PROD-4269034-3595794",
            "type": "Feature",
            "geometry": {
                "type": "Polygon",
                "coordinates": [
                    [
                        [
                            -77.409999999999997,
                            39.100000000000001
                        ],
                        [
                            -77.539999999999992,
                            39.149999999999999
                        ],
                        [
                            -77.359999999999985,
                            39.519999999999996
                        ],
                        [
                            -77.11999999999999,
                            39.459999999999994
                        ],
                        [
                            -77.409999999999997,
                            39.100000000000001
                        ]
                    ]
                ]
            },
            "properties": {
                "@id": "https://api.weather.gov/alerts/NWS-IDP-PROD-4269034-3595794",
                "@type": "wx:Alert",
                "id": "NWS-IDP-PROD-4269034-3595794",
                "areaDesc": "Montgomery, MD; Frederick, MD; Loudoun, VA",
                "geocode": {
                    "UGC": [
                        "MDC031",
                        "MDC021",
                        "VAC107"
                    ],
                    "SAME": [
                        "024031",
                        "024021",
                        "051107"
                    ]
                },
                "affectedZones": [
                    "https://api.weather.gov/zones/county/MDC031",
                    "https://api.weather.gov/zones/county/MDC021",
                    "https://api.weather.gov/zones/county/VAC107"
                ],
                "references": [],
                "sent": "2020-06-10T19:23:00-04:00",
                "effective": "2020-06-10T19:23:00-04:00",
                "onset": "2020-06-10T19:23:00-04:00",
                "expires": "2020-06-10T20:00:00-04:00",
                "ends": "2020-06-10T20:00:00-04:00",
                "status": "Actual",
                "messageType": "Alert",
                "category": "Met",
                "severity": "Severe",
                "certainty": "Observed",
                "urgency": "Immediate",
                "event": "Severe Thunderstorm Warning",
                "sender": "w-nws.webmaster@noaa.gov",
                "senderName": "NWS Baltimore MD/Washington DC",
                "headline": "Severe Thunderstorm Warning issued June 10 at 7:23PM EDT until June 10 at 8:00PM EDT by NWS Baltimore MD/Washington DC",
                "description": "The National Weather Service in Sterling Virginia has issued a\n\n* Severe Thunderstorm Warning for...\nNorthwestern Montgomery County in central Maryland...\nSoutheastern Frederick County in north central Maryland...\nNortheastern Loudoun County in northern Virginia...\n\n* Until 800 PM EDT.\n\n* At 723 PM EDT, a severe thunderstorm was located near Poolesville,\nmoving northeast at 40 mph.\n\nHAZARD...60 mph wind gusts.\n\nSOURCE...Radar indicated.\n\nIMPACT...Damaging winds will cause some trees and large branches\nto fall. This could injure those outdoors, as well as\ndamage homes and vehicles. Roadways may become blocked by\ndowned trees. Localized power outages are possible.\nUnsecured light objects may become projectiles.\n\n* Locations impacted include...\nFrederick, Poolesville, Harry Grove Stadium, Ballenger Creek,\nWalkersville, New Market, Discovery-Spring Garden, Green Valley,\nLinganore-Bartonsville, Adamstown, Buckeystown, Libertytown,\nMonrovia, Barnesville, Ijamsville, Mount Pleasant, Park Mills,\nDickerson, Beallsville and Tuscarora.",
                "instruction": "For your protection move to an interior room on the lowest floor of a\nbuilding.",
                "response": "Shelter",
                "parameters": {
                    "eventMotionDescription": [
                        "2020-06-10T19:23:00.000-04:00...storm...204DEG...34KT...39.19,-77.44"
                    ],
                    "hailSize": [
                        "Up to 0.75"
                    ],
                    "windGust": [
                        "60 MPH"
                    ],
                    "VTEC": [
                        "/O.NEW.KLWX.SV.W.0099.200610T2323Z-200611T0000Z/"
                    ],
                    "EAS-ORG": [
                        "WXR"
                    ],
                    "PIL": [
                        "LWXSVRLWX"
                    ],
                    "BLOCKCHANNEL": [
                        "CMAS",
                        "EAS",
                        "NWEM"
                    ],
                    "eventEndingTime": [
                        "2020-06-10T20:00:00-04:00"
                    ]
                },
                "replacedBy": "https://api.weather.gov/alerts/NWS-IDP-PROD-4269113-3595844",
                "replacedAt": "2020-06-10T19:51:00-04:00"
            }
        }
    ],
    "title": "watches, warnings, and advisories for 39.410027 N, 77.33688 W",
    "updated": "2020-06-11T00:30:37+00:00",
    "pagination": {
        "next": "https://api.weather.gov/alerts?point=39.XXXXXX%2C-77.XXXXXX&status=actual&message_type=alert&severity=severe%2Cextreme&event=Severe%20Thunderstorm%20Warning%2CTornado%20Warning&zone=MDZ004%2CMDC021&cursor=eyJ0IjoxNTkxODMxMzgwLCJpIjoiTldTLUlEUC1QUk9ELTQyNjkwMzQtMzU5NTc5NCJ9"
    }
}

Looks like at least one of those event types was invalid.

I found the issue. Will need to add new code to fix this. Update coming by tomorrow.

2 Likes

v3.0.014 has fixed the Advanced Alert Weather Types. All available weather types will be honored and will filter correctly.

Available on github and HPM.

Just an FYI. When I update via HPM it gives me 3.004. Somehow the directory’s it’s pointing to is wrong. I went in and put the URL into the manual import and get 3.015
I believe you initially had it in a beta folder and now is in another folder on github but HPM is routing to the old folder. As I can hit update in HPM and be back at 3.004
The app is awesome BTW.

1 Like

I just updated with HPM from 3.0.013 to 3.0.015, everything looks good.

Hopefully the event types are all working correctly now. The test URI doesn't contain the event type any more, so I'm guessing all that filtering is done in the app.

Should have good weather over the next few days, so I probably won't know for sure that it's all working for a little while. Would love to hear from anyone who uses the new version and gets alerts as expected!

@dman2306 - for awareness

If you have the beta or preview versions checked then this is an HPM bug. And thank you for the nice compliment.

I had to move the event parsing into the app itself. So now the app grabs all alerts based on settings from severity, urgency and certainty. Then the app parse’s each active alert for the event type. If it matches the alert is displayed.

I do, I’ve been running the beta all along and ( last few updates ) it says 3.0xx installed update to 3.015 ( or prior ) and I hit update and 3.0.04 gets installed. So I went in to your get hub and saw the 3.0.04 was in a different folder than the current version so I opened the current version, hit raw and used that URL to manually update which gives me 3.0.15 and a check of HPM says no updates available ( as it should ). But I’ll bet that when you release a new version ( if all stays the same ) HPM will pick up the .04 version again as it’s done it every time since .04 was installed. I had to manually get the URL and manually grab the file.

Yeah this is a bug with HPM. If you go into the settings of HPM and uncheck the preview/beta option then you will update without issues. @dman2306 is aware of the bug.

I’ll try to get the fix out this weekend!

What do you mean the test doesn't show the event type? It should...see below screenshot from my alerts.

Gotcha, I figured it was some minor glitch in the matrix.

1 Like

Thought I was losing my damn mind LOL

Ya, I kept thinking it was just a version number not updating, till I looked at the app code version number. I just tried .16 to test it and it reverted to .04 and I turned off “beta” and it went to .16.
A microscopic issue in the scheme of things.

The test URI doesn't contain the event types. It pulls back all events matching the requested severity, Then the desired event types are filtered in the app. The URI used to contain event types in the API request.

Yes correct. That is what has to change.

Anyone with latest version have any feedback? Have you experienced any alerts?