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 API is made to send current or recent measurements, you can specify exact time of measurement (see "unixtime" or "datetime" variables below) otherwise current time is assumed. Uploading historic data is not supported at the moment (any uploads with time older then 2 hours will fail).
GET variables to send:
uid | (required) | string | UID of your station = unique string you choosed during station registration |
unixtime | (optional) | integer | time of measurement as unix timestamp (epoch) |
datetime | (optional) | string | time of measurement in ISO 8601 format (example: 2024-11-21T08:50:44+01:00) |
(in case you send both unixtime and datetime, unixtime will take precedence) | |||
interval | (optional) | integer | 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 | (optional) | float | average wind speed during interval (knots) |
wind_max | (optional) | float | maximum wind speed during interval (knots) |
wind_min | (optional) | float | minimum wind speed during interval (knots) |
wind_direction | (optional) | float | wind direction as degrees (0 = north, 90 east etc...) |
temperature | (optional) | float | temperature (celsius) |
rh | (optional) | float | relative humidity (%) |
mslp | (optional) | float | pressure reduced to sea level (hPa) |
precip | (optional) | float | precipitation in milimeters (not displayed anywhere yet, but API is ready to accept) |
precip_interval | (optional) | integer | 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) | string | any random string, should change with every upload request (you can use current timestamp for example...) |
hash | (required) | string | 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)