Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

How to post meteorological measurements to windy.com using CR800 or CR1000X?


anemopetros Dec 8, 2021 08:04 PM

Hi!

I was wondering if anybody has tried to post meteorological measurements to windy.com using CR800 or CR1000X?

Httppost command seemed to be very promising...

I had made a script but it couldn't post to windy.com.

The HTTPresponse was: Error: failed to connect and http_post=0  (see below script):

>>

....

Public HTTPResponse As String

Public token_wind As String
Public token_winddir As String
Public token_temp As String
Public token_gust As String
Public Url_string As String *300
Public http_post

Const APIkey="eyJhbGc... etc"

Const URL_windy="https://stations.windy.com/pws/update/"

...

BeginProg

...

Scan (1,Sec,0,0)

....

...
CallTable Output

NextScan

SlowSequence

Scan (10,Min,0,0)'Run every 10 MINUTES

GetRecord(tb_1,Output,1)

token_winddir="?winddir="+tb_1(20)
token_wind="&wind="+tb_1(14)
token_gust="&gust="+tb_1(15)
token_temp="&temp="+tb_1(34)

Url_string=URL_windy+APIkey+token_winddir+token_wind+token_gust+token_temp+chr(13)

http_post=HTTPPost (Url_string,"",HTTPResponse,"")

NextScan
EndSequence

EndProg

Log in or register to post/reply in the forum.