Charmed Quark Systems, Ltd. - Support Forums and Community

Full Version: OpenWeatherMap Weather Driver Using OneCall API
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
OpenWeatherMap.org has released a new API (named OneCall) that provides current weather information based on your lat/long along with 7 days of forecast data in JSON format.  It allows 1000 calls per day to the free account that you will have to set up on their website (which is the same API key that the shipped OWM driver used).

I will build a help file once a few things gets finalized, but I think the driver fields are self explanatory and you can look at the shipped OpenWeatherMap driver for most of them.

All of the Current Weather Data from the website is captured, but there are a number of fields that could be added for Days 1 - 7::

  • Day 1-7 Feels Like Temps - Morning, Day, Evening and Night
  • Day 1-7 Humidity
  • Day 1-7 Dew Point
  • Day 1-7 Wind Gust
  • Day 1-7 Wind Direction
  • Day 1-7 Cloudiness
  • Day 1-7 Rain Precipitation
  • Day 1-7 Snow Volume

Let me know if you would like to see these added.

A couple of quirks/limitations:

  • The Day 1 data is the remaining data for the current day.  There is Day 8 data that could be added to give a full forecasted week of data.
  • The Current Visibility is not always visible (all pun intended).  On some Lat/Longs it shows up, on others it doesn't, it will show 0 if it isn't there.
  • Not totally confirmed, but feel confident that the dates shown for Days 1-7 (which are Noon Standard Time for your time zone), cover that date from Midnight to 11:59pm.  There is always a possibility that it covers from Noon to 11:59am, but from what I can tell it doesn't, and the documentation does not indicate that is the case.
  • I wrote this driver to be V2, but it doesn't pass the validation check in the CML test harness, so will ask Dean about that in a separate post.
  • There is no Precipitation Probability available for the current data or forecast days.
Let me know how it works.

** Updated to V0.91 that includes a total of 8 forecast days (Day 1 is the remainder of the current day, and Days 2 thru 8 are the next 7 days.  All of the fields listed above were added except for the "Feels Like" forecast temperatures, mainly because that would of added 4 new fields for each forecasted day.  If someone really needs these, let me know.

I also included a help file in this update.

** Updated to V0.92 to allow barometric pressure to be shown in either Inches of Mercury or Millibars at initialization.
Thanks for getting this together. The added fields that these drivers include is great.

(I've been using kblagron's Dark Sky driver that he made and it has been great. With the announcement that Dark Sky was closing it's API next year, I was concerned about what I would use in the future. I'm glad there appears to be a valid replacement for the Dark Sky option).
I updated the driver to 0.91 and added the driver documentation.  Everything should be V2 compatible.  it now includes a total of 8 forecast days (Day 1 is the remainder of the current day, and Days 2 thru 8 are the next 7 days).  New fields were added as well, and they are described in the .html documentation.
Thanks!! Much appreciated.
(05-14-2020, 09:04 PM)kblagron Wrote: [ -> ]I updated the driver to 0.91 and added the driver documentation.  Everything should be V2 compatible.  it now includes a total of 8 forecast days (Day 1 is the remainder of the current day, and Days 2 thru 8 are the next 7 days).  New fields were added as well, and they are described in the .html documentation.
Your the man... Thanks for doing this. 
Kevin
I have been using this for the precipitation (last hour) and also forecasted precipitation in the future, as Darksky only gives a probability but does not give an estimate of how much rain.  It doesn't snow but once every 10 years here, but knowing how much it is planning on snowing in upcoming days is nice as well.
(05-16-2020, 08:16 AM)kblagron Wrote: [ -> ]I have been using this for the precipitation (last hour) and also forecasted precipitation in the future, as Darksky only gives a probability but does not give an estimate of how much rain.  It doesn't snow but once every 10 years here, but knowing how much it is planning on snowing in upcoming days is nice as well.

You can set an alert to text you when the snow fall is expected to be greater than 0.20"  That way you know to swing by the store to pick up milk and bread before the rush.  Wink
This is great - thanks for making it available! One thing I noticed - and you may not be able to do anything about this - is that the pressure is being reported in millibars rather than inches.
(05-16-2020, 04:37 PM)dlmorgan999 Wrote: [ -> ]This is great - thanks for making it available!  One thing I noticed - and you may not be able to do anything about this - is that the pressure is being reported in millibars rather than inches.

Appreciate the effort in making this driver available.  I think a full week's forecast would be optimal.  1 millibar=.40147 inches of water.
(05-16-2020, 05:17 PM)keepersg Wrote: [ -> ]
(05-16-2020, 04:37 PM)dlmorgan999 Wrote: [ -> ]This is great - thanks for making it available!  One thing I noticed - and you may not be able to do anything about this - is that the pressure is being reported in millibars rather than inches.

Appreciate the effort in making this driver available.  I think a full week's forecast would be optimal.  1 millibar=.40147 inches of water.
 I can do that, I already adjusted the rainfall amount as they reported it in mm and for most in the US, we expect it in inches.  Will get a new version out soon.
Pages: 1 2