Upload API documentation
Register station
Before you start uploading register your station, choose "Other (upload API)" as station type
Upload data
Data from you station are then uploaded via HTTP GET requests to:
http://www.windguru.cz/upload/api.php
It's up to you how frequently you will send the data. Every minute is ideal, but you don't need to send so frequently if you can't. The data sent are considered to be current data (uploading historic records is not supported at the moment).
GET variables to send:
uid | (required) | UID of your station = unique string you choosed during station registration |
interval | measurement interval in seconds (60 would mean you are sending 1 minute measurements), then the wind_avg / wind_max / wind_min values should be values valid for this past interval | |
wind_avg | average wind speed during interval (knots) | |
wind_max | maximum wind speed during interval (knots) | |
wind_min | minimum wind speed during interval (knots) | |
wind_direction | wind direction as degrees (0 = north, 90 east etc...) | |
temperature | temperature (celsius) | |
rh | relative humidity (%) | |
mslp | pressure reduced to sea level (hPa) | |
precip | precipitation in milimeters (not displayed anywhere yet, but API is ready to accept) | |
precip_interval | interval for the precip value in seconds (if not set then 3600 = 1 hour is assumed) |
Send only the measurement variables that you really have, skip those you don't have.
Authorization variables
salt | (required) | any random string, should change with every upload request (you can use current timestamp for example...) |
hash | (required) | MD5 hash of a string that consists of salt, uid and station password concatenated together (in this order, see example below) |
Authorization variables are required to validate your upload, example:
salt: 20180214171400
uid: stationXY
station password: supersecret
then the hash would be calculated as md5("20180214171400stationXYsupersecret") = c9441d30280f4f6f4946fe2b2d360df5
(Note: the password string used in the md5 authorization is the station login password or the special API password which you can also set during registraton, any of these will work)