domcross / severe-weather-information-skill

Checks your national weather service and notifies you when there are alerts for your region
Apache License 2.0
4 stars 4 forks source link

Cannot get skill to work #1

Open blissb opened 2 years ago

blissb commented 2 years ago

I'm wondering if this skill is still being maintained -- I see there have been no updates in 16 months.

The skill installs, and appears to be parsing through the data returned from NOAA, but I cannot get it to work -- only "no alerts for your area." Yesterday, there were several severe weather alerts for my area, I could see them in the data from NOAA, but still "no alerts."

I have tried using the "Mycroft device" and Geo-Code options - to no avail. If I try to pull only the data for my region, the skill completely breaks.

domcross commented 2 years ago

Hi @blissb You are the first in more than two years who tried the skill a gives some feedback back. Are you willing to share your geocode/location data so I can have a look?

domcross commented 2 years ago

A quick test with US-service and geo-location "AKZ214" (and urgency "future", severity "minor", certainty "possible" to get any available alert) gives me five alerts (as of 2022-02-21 11:30 CET).

The device-location settings does not work with all services. You can look up the UGC geocode from the zone-list of your state here: https://alerts.weather.gov (e.g. Alaska, Yukon Delta is AKZ214)

I will have a look if there is a library or online service that maps long/lat coordinates to geocodes...

blissb commented 2 years ago

Sorry for the delay in getting back to you, and thank you for the response.

I think I see the problem -- I was using the county code (VTC023), not the zone code (VTZ008).

What I ended up doing was forking the project and editing swi_resources.py by replacing the US1 url with the url for the RSS feed for my specific county (https://alerts.weather.gov/cap/wwaatmget.php?x=VTC023&y=0), and then setting the location filter to "none." This works as expected and returns very quickly, too, since it doesn't have to parse through and filter out the rest of the national data.

Now that I know what I was doing wrong, I'm going to restore the original version and try it again.

[updated]

Apparently I'm still doing something wrong, but I cannot see what it is. I uninstalled my fork, checked to make sure it was actually gone (it was). Rebooted. Installed the original version. Configured it using the VTZ008 zone code. Asked for alerts and was given a bunch of flood warnings for Alabama.

I tried using the custom configuration and custom url -- that said there was an error in the module.

I've re-installed the fork, and have it working again.

After getting the error message when using a custom URL, I noticed in the swi_resources the "ZZZ" line was different than the US lines.
'ZZZ:zz': {'country': 'ZZ', 'lang': 'zz', 'title': 'Custom configuration', 'url': 'custom', 'hdr_feed': '', 'hdr_atom': ''}

I changed it to read:

'ZZZ:zz': {'country': 'ZZ', 'lang': 'zz', 'title': 'Custom configuration', 'url': 'custom', hdr_feed': {'Accept': 'application/atom+xml'}, 'hdr_atom': {'Accept': 'application/cap+xml'}}

With that change I was able to put the county RSS URL (same as above) in to the "custom URL" field and have it return without error.

Since I seem to be the only one having an issue, and since I have a work-around, this is not terribly important -- however, if I can do any more testing/breaking, please let me know!