Trixology

WeatherCat => WeatherCat Feature Requests => Topic started by: sdmike on May 16, 2019, 01:34:36 AM

Title: Support for the new Windy.com API
Post by: sdmike 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!
Title: Re: Support for the new Windy.com API
Post by: Blicj11 on May 16, 2019, 06:56:39 PM
sdmike:

Welcome to the WeatherCat forum.
Title: Re: Support for the new Windy.com API
Post by: David on May 16, 2019, 07:03:10 PM
Windy.com has a great user experience. I second the request.
Title: Welcome! (Re: Support for the new Windy.com API)
Post by: elagache 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]
Title: Re: Support for the new Windy.com API
Post by: Felix on May 18, 2019, 03:26:33 AM
https://community.windy.com/topic/7551/would-you-like-to-report-your-weather-station-data-to-windy-depreciated
Title: Re: Support for the new Windy.com API
Post by: Blicj11 on May 18, 2019, 05:45:49 PM
Here is the link to Windy's API

https://community.windy.com/topic/8168/report-you-weather-station-data-to-windy/2
Title: Re: Support for the new Windy.com API
Post by: xairbusdriver 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.
Title: Re: Support for the new Windy.com API
Post by: sdmike on May 20, 2019, 01:39:28 AM
Greetings all!

Long time listener, first-time caller.  ;)

Thanks for seconding my request.
Title: Re: Support for the new Windy.com API
Post by: mcrossley 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!)
Title: How anxious are you to replace your station? (Was: new Windy.com API)
Post by: elagache 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]
Title: Re: Support for the new Windy.com API
Post by: xairbusdriver 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!
Title: Re: Support for the new Windy.com API
Post by: xairbusdriver 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]