Author Topic: Support for the new Windy.com API  (Read 3270 times)

sdmike

  • Calm
  • *
  • Posts: 2
    • EW4462
    • KCACARLS21
  • Station Details: Currently looking to replace an ailing Davis Vantage Pro 1
Support for the new Windy.com API
« on: May 16, 2019, 01:34:36 AM »
Hi ...

It looks like Windy.com is adding PWS support through its API. Would love to see WeatherCat support that like it does for MetOfficeWow, WeatherCloud, and PWSweather.

Thanks!

Blicj11

  • Storm
  • *****
  • Posts: 3941
    • EW3808
    • KUTHEBER6
    • Timber Lakes Weather
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP Data Logger | iMac (2019), 3.6 GHz Intel Core i9, 40 GB RAM, macOS Ventura 13.6 | Sharx SCNC2900 Webcam | WeatherCat 3.3 | Supportive Wife
Re: Support for the new Windy.com API
« Reply #1 on: May 16, 2019, 06:56:39 PM »
sdmike:

Welcome to the WeatherCat forum.
Blick


David

  • Gentle Breeze
  • **
  • Posts: 46
    • EW8863
    • KMDGLENB25
  • Station Details: Davis Vantage Pro 2 Plus
Re: Support for the new Windy.com API
« Reply #2 on: May 16, 2019, 07:03:10 PM »
Windy.com has a great user experience. I second the request.

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Welcome! (Re: Support for the new Windy.com API)
« Reply #3 on: May 17, 2019, 12:25:50 AM »
sdmike:

Welcome to the WeatherCat forum.

I'll second that welcome to the WeatherCat forum!  :)

Cheers, Edouard  [cheers1]

Felix

  • Gale
  • ****
  • Posts: 439
  • Station Details: Davis VP-2 Plus, FARS, WeatherLink IP. Sharx cams.

Blicj11

  • Storm
  • *****
  • Posts: 3941
    • EW3808
    • KUTHEBER6
    • Timber Lakes Weather
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP Data Logger | iMac (2019), 3.6 GHz Intel Core i9, 40 GB RAM, macOS Ventura 13.6 | Sharx SCNC2900 Webcam | WeatherCat 3.3 | Supportive Wife
Re: Support for the new Windy.com API
« Reply #5 on: May 18, 2019, 05:45:49 PM »
Blick


xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Support for the new Windy.com API
« Reply #6 on: May 19, 2019, 07:34:07 PM »
As I understand the info on the linked "API" page, here is what a snapshot of the JASON file would look like from my site. I have selected only the data and the formats I have set in WC, btw.
Quote
{"stations":[{"station":"0","name": "My Home Station","lat": "48.2","lon": "28.6","altitude": "80","agl_temp": "2","agl_wind": "10"
}],
"observations":[{"station":"0","dateutc": "2019-03-15T06:15:34","tempf": "74.4","windspeedmph": "1","winddir": "209","windgustmph": "0","rh": "83","baromin": "29.82","rainin": "0.82"
}]}
Further, since I have but one 'station', I can leave out the "station":"0" part. I will to check the date format to make sure I either have the desired one or if I need to convert what WC creates.

Can some one confirm my comment, so far?

I think it should be fairly easy to have WC parse an 'additional file' every 5 minutes and either upload it to my web space or just create a text file on the boot drive. It should then be easy to create a daemon/script to upload that file to Windy from either location.
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


sdmike

  • Calm
  • *
  • Posts: 2
    • EW4462
    • KCACARLS21
  • Station Details: Currently looking to replace an ailing Davis Vantage Pro 1
Re: Support for the new Windy.com API
« Reply #7 on: May 20, 2019, 01:39:28 AM »
Greetings all!

Long time listener, first-time caller.  ;)

Thanks for seconding my request.

mcrossley

  • Gale
  • ****
  • Posts: 273
  • Sorry, I'm not a WeatherCat user!
    • ICHESHIR25
    • Wilmslow Astro Weather
  • Station Details: Davis VP2 + home brew
Re: Support for the new Windy.com API
« Reply #8 on: May 20, 2019, 10:31:26 AM »
The "stations" section will actually create a new station if required, so best to leave it out. Just use the "station:0"  (or 1,2,3 etc) in the observation. Note the units and field names have to match. Initially the pressure was in inHg or Pascals*! They have since added hPa as an option ;)
I took a different route, and removed the complication of using a JSON body by just specifying the data directly in the URL.

*(and downloaded temperatures are in Kelvin!)
Mark

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
How anxious are you to replace your station? (Was: new Windy.com API)
« Reply #9 on: May 20, 2019, 11:39:47 PM »
Dear sdmike, Mark, and WeatherCat station consultants,

Long time listener, first-time caller.  ;)

I see that in your signature you are looking to replace an ailing Davis Vantage Pro-1 station.  How anxious are you to replace this station?  We definitely can offer you some advice with respect to that.  Are you aware that Davis stations are heavily discounted by some retailers?

Thanks for being part of our community!  :)

Cheers, Edouard  [cheers1]

xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Support for the new Windy.com API
« Reply #10 on: May 21, 2019, 01:20:21 AM »
My apologies for my unfriendliness, sdmike!
Welcome AboaRd, sdmike!

Mr. Crossly, your point about 'station(s)' is does explain things better than the linked page.

OTOH...
Quote
downloaded temperatures are in Kelvin!
Not sure what you mean. [blush] The "Measurements" section offers temps as floating point numbers with "temp - real number [?C]; air temperature" as the default and "tempf - real number [?F];... (alternative to temp)". Of course, these are "upload" formats, not what might be "downloaded" from Windy. ???

Perhaps things are still in flux? Pressure now allows different formats: Pascal, milibar, hectoPascal and inches/Hg One must use the correct "Key" for the key/value pair. It looks like they are serious about making it easy to report from anywhere on Earth!
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Support for the new Windy.com API
« Reply #11 on: May 23, 2019, 03:14:10 PM »
Opened my site today and found that it no longer existed. Tried removing the "s" from the http:// and that was simply too easy. "The interweb is never rong!" Tried using a different machine. My site is still in the vast bit bucket... Came here and found there was the infamous broken image icon instead of my carefully created and wonderous WC Banner. [blush]

Called support ("Chat" method is obviously not working). Explained the problem, again and after several minutes of 'conversation' I was asked to wait a few moments to see if I could pass the Musak test.

Not having anything else to do, I downloaded my .htaccess file. Sure enough, at the end of that files were the extra lines that lead to the httpS actions:
Code: [Select]
# Always use https for secure connections
# Replace 'www.example.com' with your domain name
# (as it appears on your SSL certificate)
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://mid-southweather.com/$1 [R=301,L]
I had already commented those exact lines that "support" had added last week! I did it again and things are back to normal. If these lines are added again, without notification, much less my approval, I will simple move to another host. Not being 'politically correct', but I think the root of the problem is a language barrier. [banghead]
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system