Author Topic: FOSHKplugin - Windy upload  (Read 294 times)

0 Members and 1 Guest are viewing this topic.

Offline wxwol

  • Member
  • *
  • Posts: 15
FOSHKplugin - Windy upload
« on: December 20, 2021, 07:48:54 PM »
Hi everyone,

I am trying to upload to windy.com through FOSHKplugin. I created the station on the website and have the API key, but I am missing the FWD TYPE format in the configuration file. Can anyone give me a hint on what type I should use? Thanks.

Online olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - Windy upload
« Reply #1 on: December 20, 2021, 08:02:04 PM »
Hi!

Quote
I am missing the FWD TYPE format in the configuration file.
It is just WU:

Code: [Select]
[Forward-2]
FWD_URL = https://stations.windy.com/pws/update/[windyAPIkey]?
FWD_TYPE = WU
FWD_ENABLE = True
FWD_INTERVAL = 300
FWD_CMT = Windy

Oliver

Offline wxwol

  • Member
  • *
  • Posts: 15
Re: FOSHKplugin - Windy upload
« Reply #2 on: December 21, 2021, 08:19:43 AM »
Hi!

Quote
I am missing the FWD TYPE format in the configuration file.
It is just WU:


Thanks Oliver. I made a number of attempts but had no luck, here is the process:

1. A weather station record was created on windy.com
2. An API key was generated, the key consists of a long string of characters which was then pasted in the relevant section of the configuration file (Forward-5 in my case).
3. The FOSHKplugin application was restarted.
4. The link to the station provided in the station's setup page was clicked but the data is not visible. Instead, the message "Error loading or rendering station data" is shown.

Several attempts were made to resolve the issue, for example by removing the question mark from the end of the API key string or copy and paste again the API string. None of them worked however I noticed that the key changes every time I press the "Show key" button. I added the new key(s) to the configuration but I still can't see the data (or the station) in Windy.

Is there anything else that I haven't thought about or any important parameters that I haven't included?

Thanks
Raul

Online olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - Windy upload
« Reply #3 on: December 21, 2021, 09:51:54 AM »
Hi!

Quote
for example by removing the question mark from the end of the API key string or copy and paste again the API string.
The question mark is essential - if it is missing, the request cannot be carried out.
You should check your API key on your station page at Windy. The key displayed there should be used in FOSHKplugin as part of the URL - between "update/" and the "?":
Code: [Select]
FWD_URL = https://stations.windy.com/pws/update/paste.here.the.very.long.key.from.the.stationpage.of.Windy.but.do.not.forget.the.question.mark.as.the.last.char.of.the.line?
Again: Note the question mark as the last character in the URL.

With a standard web browser you could test if there're authentification or connection problems at all. You just have to add a UV=0 or rainin=0 to this URL:
Code: [Select]
https://stations.windy.com/pws/update/paste.here.the.very.long.key.from.the.stationpage.of.Windy.but.do.not.forget.the.question.mark.as.the.last.char.of.the.line?UV=0
If the data is successfully received by Windy, you should receive a corresponding SUCCESS message:
Quote
SUCCESS (valid measurements count: 1, valid station info count: 0)
If there're problems with your key you will get a corresponding warning:
Quote
Invalid API key - string is too short (please ensure you are using proper and whole key at https://stations.windy.com/stations).
Or something similar and hopefully helpful.

You can also check the FOSHKplugin send log to see if there are any error messages on your FWD-5.
You can find this file snd-foshkplugin.log (or similar) in the installation directory of FOSHKplugin.

I have just checked my data transmission to Windy - here it is done without any problems.
Maybe it's also because of your specific beta version - I'll send you a link to an updated version via PM.
But please check the things above before.

Oliver

Offline wxwol

  • Member
  • *
  • Posts: 15
Re: FOSHKplugin - Windy upload
« Reply #4 on: December 21, 2021, 10:24:12 AM »
Hi!

If the data is successfully received by Windy, you should receive a corresponding SUCCESS message:

It all worked up to this point - note that the API key displayed in the station's page is the one changing every time I press the button. In any case, it gave me SUCCESS when I pasted it in the browser.

Quote
You can also check the FOSHKplugin send log to see if there are any error messages on your FWD-5.
You can find this file snd-foshkplugin.log (or similar) in the installation directory of FOSHKplugin.

I found the file but it's very large:

Code: [Select]
-rw-r--r-- 1 pi pi 480938330 Dec 21 15:13 snd-foshkplugin.log

Is there a specific command string to display the data I am after? Also, is there a set limit to the size of this file?

As I type this message, I still see the same error message when I go to the station's Windy page.

Thanks

Raul

Online olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - Windy upload
« Reply #5 on: December 21, 2021, 10:54:40 AM »
Hi!

Quote
Is there a specific command string to display the data I am after? Also, is there a set limit to the size of this file?
I would do a
Code: [Select]
grep FWD-05 snd-foshkplugin.log to see all lines regarding Forward-5. You should see all logged lines completly with OK or error - separated with a ":".

BTW:
There is a special receipt on log file handling.

Oliver

Offline wxwol

  • Member
  • *
  • Posts: 15
Re: FOSHKplugin - Windy upload
« Reply #6 on: December 21, 2021, 11:12:43 AM »
Hi!

Quote
Is there a specific command string to display the data I am after? Also, is there a set limit to the size of this file?
I would do a
Code: [Select]
grep FWD-05 snd-foshkplugin.log to see all lines regarding Forward-5. You should see all logged lines completly with OK or error - separated with a ":".


Thanks, I'll have a look at the log handling notes later. Meanwhile I ran the grep command and I had ERROR until 15:05, just before I restarted the application after editing the file to add the latest API key. I think ERROR was due to the "?" removal as I had seemingly good (though without the OK) lines before.

The error has now gone, but I can't see the OK. This is what the output looks like:

Code: [Select]
21.12.2021 15:54:52.541 FWD-05: https://stations.windy.com/pws/update/[API KEY]?softwaretype=GW1100A_V2.0.9&dateutc=2021-12-21+15:54:52&indoortempf=61.5&indoorhumidity=58&baromin=29.465&baromabsin=29.465&tempf=36.7&humidity=82&winddir=36&windspee                           dmph=0.00&windgustmph=1.12&maxdailygust=5.82&solarradiation=0.00&UV=0&rainratein=0.000&eventrainin=0.000&rainin=0.000&dailyrainin=0.000&weeklyrainin=0.055&monthlyrainin=1.756&yearl                           yrainin=3.283&totalrainin=3.283&temp1f=68.5&humidity1=49&wh68batt=1.68&wh40batt=1.4&wh26batt=0&batt1=0&dewptf=31.7&windchillf=36.7&feelslikef=36.7&heatindexf=33.9&windspdmph_avg10m                           =0.2&winddir_avg10m=45&windgustmph_max10m=2.2&brightness=0.0&cloudf=1888&sunhours=0.0&sonnenstd=0.0&suncomb=0.0&ptrend1=1&pchange1=0.003&ptrend3=-1&pchange3=-0.0089 : 200

The other difference I spotted is that all the log entries with ERROR end in "400", whereas all those without ERROR (and without OK) end in "200".

Online olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - Windy upload
« Reply #7 on: December 21, 2021, 11:19:32 AM »
Hi!

Quote
The other difference I spotted is that all the log entries with ERROR end in "400", whereas all those without ERROR (and without OK) end in "200".
The 200 is the return code of the http/GET-request and means OK.
So the data was successfully uploaded to Windy.
What you can do now:
1. you could copy the whole string from the logfile including the right API-key and send this with your web browser to Windy.
Then you should see additional infos (e.g. fields that Windy does not understand or something different).
2. ask Windy - from my point of view everything seems to be ok so far on the delivery side - but I don't know why the view-page is not rendered correctly.
Perhaps (hopefully) they can tell.

Oliver

Offline wxwol

  • Member
  • *
  • Posts: 15
Re: FOSHKplugin - Windy upload
« Reply #8 on: December 21, 2021, 11:38:42 AM »
Quote
What you can do now:
1. you could copy the whole string from the logfile including the right API-key and send this with your web browser to Windy.
Then you should see additional infos (e.g. fields that Windy does not understand or something different).

I tried this, it didn't work in first instance as there were some spaces in the string of characters, probably a copy-paste by-product. When I cleaned the parameters I had the following result:

Code: [Select]
PARTIAL SUCCESS (valid measurements count: 9, valid station info count: 0)
unknown params: 'softwaretype','indoortempf','indoorhumidity','baromabsin','maxdailygust','solarradiation','rainratein','eventrainin','dailyrainin','weeklyrainin','monthlyrainin','yearlyrainin','totalrainin','temp1f','humidity1','wh68batt','wh40batt','wh26batt','batt1','windchillf','feelslikef','heatindexf','windspdmph_avg10m','winddir_avg10m','windgustmph_max10m','brightness','cloudf','sunhours','sonnenstd','suncomb','ptrend1','pchange1','ptrend3','pchange3',

When I tried by replacing all the parameters with "UV=0" I got a message that I sent the data too early (I think there is a 4-minute cooldown setting in the receiving server).

Online olicat

  • Forecaster
  • *****
  • Posts: 1515
  • GWxx00, HPx5x1C, WN1900C, WN1980C & WS3800C
    • FOSHKplugin
Re: FOSHKplugin - Windy upload
« Reply #9 on: December 21, 2021, 12:06:31 PM »
Hi!

You could silent the unknown params line with a
Code: [Select]
FWD_IGNORE = softwaretype,indoortempf,indoorhumidity,baromabsin,maxdailygust,solarradiation,rainratein,eventrainin,dailyrainin,weeklyrainin,monthlyrainin,yearlyrainin,totalrainin,temp1f,humidity1,wh68batt,wh40batt,wh26batt,batt1,windchillf,feelslikef,heatindexf,windspdmph_avg10m,winddir_avg10m,windgustmph_max10m,brightness,cloudf,sunhours,sonnenstd,suncomb,ptrend1,pchange1,ptrend3,pchange3
in your Forward-5.
These keys will not be sent to Windy (ignored) afterwards.
But this is not a must - Windy just ignores unkown parameters.

Oliver

 

anything