OpenWeatherMap-Alerts-Weather-Driver

I'm guessing that reply was meant for me? If so, what does "rain:4.47" in my Polling data mean?

Sorry, but it was meant for both of you. The driver reports three days of rain. The poll provides 7 days of forecast (I think). The first three sets, right after 'daily' are daily[0] = rainToday; daily[1]=rainTomorrow; and daily[2]=rainDayAfterTomorrow. Your results did have a rain result, but it was after those first three. The driver does not present anything beyond daily[2]. Like the other's you had no rain reported in daily[0], daily[1] or daily[2].

Gotcha. Thank you very much for the info and for all of your time in creating the driver! I really appreciate it!

1 Like

It does seem to be working... here's a SS... thanks again!
chrome_2020-06-07_10-51-20

1 Like

I'm getting this error:
java.lang.NullPointerException: Cannot invoke method toInteger() on null object on line 572 (refresh)
Just installed the latest version today
Guessing this is preventing from any of the state variable from populating, because their empty

Open the device and make sure the preferences are set as you want then click 'Save Preferences.' Let me know if that does not clear the error.

Weather alert not working.
Shows up in NWS link, works in Dark Sky device, but not in Open Weather device attributes. Screen shots and link below

NWS Link
https://forecast.weather.gov/MapClick.php?lat=40.604632&lon=-74.532505

image

By the time I looked it up the alert was not there .... neither was any information for those coordinates.

Maybe a NWS API issue??? Really hard to debug without seeing the return from the NWS poll.

DarkSky may show it because they gather information from multiple sources and they consolidate that info their API feed. Maybe they retrieve that info from a different source than the one I am using at NWS API?

Thank you for looking. About 10 minutes after posting the message, I noticed the alert was gone. I've been procrastinating on the transition from Darksky to OWM, but today seems like I should do it. :grin:

I may have found the issue. When the NWS data updates, "MyTile" is not immediately updated causing it to be out of sync with the OWM NWS weather alert data.

I have RM announce weather alerts, and when an alert occurred this evening it announced, but took a while to show on the dashboard. It appears to me that the pollAlertsHandler() does update the MyTile attribute.

I'll take a look. I think you may be right. I have noticed that the alert was out-of-sync in MyTile occasionally, but it always seemed to self correct on the next update. I'll see if I can adjust so it updates whenever the NWS feed is polled.

1 Like

Looks like a relatively easy fix:

  1. Break out the myTile code into a routine
  2. execute the routine as needed.
1 Like

[UPDATED]
V0.1.2
07/02/2020

Changes:

  • Bug fix to sync MyTile and weatherSummary tiles better when there is an NWS Alert change.

PLEASE NOTE : after any update of the driver code, even if you use Hubitat Package Manager, you should open the virtual device, click 'Save Device', then click 'Save Preferences'.

2 Likes

It still feels like the OWM app is not producing my alerts. I realize it's difficult to impossible to do this after the fact, but here is what occurred.

  1. Received an email and SMS alert from IAlert at 2020-07-03
  2. No alerts on OWM. When using DarkSky it was always 100% in sync.


This isn’t updating weather data for me unless I manually press refresh. Seems like others have experienced similar issues with previous versions. What’s the fix besides setting up a rule to refresh?

This driver does not access Dark Sky or WxData(iAlert). It is entirely possible that this driver will not match those sources. I am noty familiar with WxData(iAlert), buty I can look into it. I did look very briefly and while you can sign up for free alerts, there does not appear to be API that can be accessed on demand. As such I don't see how I can use that as a source of weather alerts fr this driver.

If this driver is not reflecting the data polled from the National Weather Service's (NWS) API, then there is a problem and I will need to look into it. The best way to determine that is to enable Extended Logging and see what this driver is receiving from the NWS poll in the log. That will show if the driver is reporting something different than what the source is providing.

If the issue is that this driver is reporting somerthing different than another source you want to compare it to, then you have a choice to use the source that you deem more reliable. I cannot guarantee this driver it is either accurate, or the best of all possible alternatve. My goal is to have it reflect the results of the data source that it is using. To my knowledge it is achieving that goal.

I do understand the frustration of inaccurate or conflicting results and empithize with you on that. It appears to me the accuracy/reliability of the data source is the underlying issue here. You can turn off alerts in the driver if you do not want to use them, or if they are not available in your area. That may help provide some relief to the frustration this driver is causing.

Thanks.

This has always been resolved by opening the device, verify the polling intervals are what you want them to be then click 'Save Preferences'. Clicking 'Save Preferences' is what clears all old polling schedules and re-initializes polling schedules for the driver.

Earlier today I did some research regarding alerts with this app and the NWS. NWS uses a localized geographic area, a 2.5KM (~1.6Mile) square named a "gridpoint", when returning weather alert information. iAlert uses a zip code for the alert locations. The zip code database provides a center point in latitude and longitude. It's very possible the NWS alert data for the two gridpoints varies, causing a discrepancy. I have no idea what the now almost deprecated (for non-Apple users) DarkSky API uses for collecting alert data.

Should you want to see your gridpoint on a map replace the latitude and longitude in the following link with your exact coordinates.
https://forecast.weather.gov/MapClick.php?lon=-74.00000&lat=40.00000

While researching, I overrode my location to a location with an alert. Did a "Polldata" then "Refresh", and the alert instantly appeared on my dashboard.

Letting you know alerts worked as expected today.

Thank you for all your efforts on this app.

1 Like

Which attribute shows the rain accumulation for the day? Is this a cumulative total from 12AM?
Is this updated based on External Source Poll Interval? Thanks!