Page 1 of 2

windy.com woes

Posted: Mon 27 Feb 2023 9:56 am
by Doncaster
How are folk finding uploading to windy.com?

I've populated the relevant section under 'Third Parry Uploads'. Each time I ask windy.com to show the key, it's different though.

I can't see anything uploading to windy.com in ftplog.txt. Should there be?

Re: windy.com woes

Posted: Mon 27 Feb 2023 10:19 am
by freddie
Any logging will be in MXdiags log files, as the uploads are done with HTTP not FTP. Looks something like this:

Code: Select all

2023-02-27 07:20:00.289 Windy: URL = https://stations.windy.com/pws/update/<<API_KEY>>?station=0&dateutc=2023-02-27+07:20:00&winddir=77&wind=2.5&gust=4.2&temp=1.8&precip=0.20&pressure=10.3427&dewpoint=1.2&humidity=96
2023-02-27 07:20:00.405 Windy: Response = OK: SUCCESS (valid measurements count: 8, valid station info count: 0)
The two statements likely won't be next to each other in the log file.

Re: windy.com woes

Posted: Mon 27 Feb 2023 10:27 am
by Doncaster
Ah - well in that case

Code: Select all

2023-02-27 10:00:00.389 Windy: ERROR - An error occurred while sending the request

Re: windy.com woes

Posted: Mon 27 Feb 2023 10:29 am
by freddie
You should have a request statement in there - what does that look like?

Re: windy.com woes

Posted: Mon 27 Feb 2023 10:37 am
by Doncaster
That's the only Windy related line in the file

Re: windy.com woes

Posted: Mon 27 Feb 2023 10:44 am
by freddie
How about in the other files in MXdiags? If that is the only type of log message then that suggests something odd about the settings you have entered. If you get the request line logged then perhaps that will give more clues. This is my settings (API key redacted):
windy.png

Re: windy.com woes

Posted: Mon 27 Feb 2023 10:54 am
by Doncaster
That's the only file in that folder that's showing as updated.

Unless I'm missing something obvious, my settings look the same as yours.

Re: windy.com woes

Posted: Mon 27 Feb 2023 11:23 am
by mcrossley
Can you switch on debug logging, that will log the URL being sent before the error occurs

Re: windy.com woes

Posted: Mon 27 Feb 2023 11:34 am
by Doncaster

Code: Select all

2023-02-27 11:30:00.069 Windy: URL = https://stations.windy.com/pws/update/<<API_KEY>>?station=0&dateutc=2023-02-27+11:30:00&winddir=71&wind=3.7&gust=4.8&temp=7.2&precip=0.00&pressure=10.3740&dewpoint=3.2&humidity=76
2023-02-27 11:30:00.169 Windy: ERROR - An error occurred while sending the request

Re: windy.com woes

Posted: Mon 27 Feb 2023 11:42 am
by mcrossley
OK, so it looks like it is something in your API key causing the issue. I just checked the source code and it is not being URL encoded. Does it have special characters in it?

Re: windy.com woes

Posted: Mon 27 Feb 2023 11:58 am
by Doncaster
mcrossley wrote: Mon 27 Feb 2023 11:42 am OK, so it looks like it is something in your API key causing the issue. I just checked the source code and it is not being URL encoded. Does it have special characters in it?
No - digits, upper and lower case characters and a few full stops. I cleared the box and repasted it as plain text just to be sure.

Re: windy.com woes

Posted: Mon 27 Feb 2023 12:10 pm
by mcrossley
OK, that should not cause any issues.

Not an immensely helpful error message from .Net

What happens if you take the URL from the log file, substitute in your full API key, then try and send it in a browser?

That may give us more of a clue.

Re: windy.com woes

Posted: Mon 27 Feb 2023 12:33 pm
by Doncaster
mcrossley wrote: Mon 27 Feb 2023 12:10 pm OK, that should not cause any issues.

Not an immensely helpful error message from .Net

What happens if you take the URL from the log file, substitute in your full API key, then try and send it in a browser?

That may give us more of a clue.
SUCCESS (valid measurements count: 8, valid station info count: 0)

And if I go to the Windy page, the update is shown

Re: windy.com woes

Posted: Mon 27 Feb 2023 12:54 pm
by Doncaster
Doncaster wrote: Mon 27 Feb 2023 11:58 am
mcrossley wrote: Mon 27 Feb 2023 11:42 am OK, so it looks like it is something in your API key causing the issue. I just checked the source code and it is not being URL encoded. Does it have special characters in it?
No - digits, upper and lower case characters and a few full stops. I cleared the box and repasted it as plain text just to be sure.
Just looked again and it does contain underscores

Re: windy.com woes

Posted: Mon 27 Feb 2023 12:56 pm
by freddie
Underscores don't get encoded, so they shouldn't matter.