Various weather stations offer software solutions to upload your weather data to the internet. Personally, I use 433 MHz capable sensors (primarily Oregon Scientific and TFA) and an Rfxcom transceiver to process the data and write it to a database using a custom Java application. This solution requires a custom approach to uploading the data to a platform like WeatherUnderground. (WU)
Their website was not extremely obvious as to how this was to be achieved. I was sure there had to be a public API I could use. Reading some third party sources, I figured it out. This is how it is done.
Updates are sent via HTTP GET request. The URL to use is this:
There are a few required GET parameters to get any request to work.
First, you must identify the device the upload is intended for. When you create an account at WU, you can add devices, which receive and ID and a KEY upon creation. These must be represented as GET parameters ID and PASSWORD respectively.
There are two other required parameters, action and dateutc. When sending an update, the action type for your request must be set to 'updateraw'. The date parameters should be a date in format' dd-MM-YYYY HH:mm:ss'. Note that the timezone should be UTC, and not your the timezone local to the sensor! Alternatively, it allows the string 'now' when you do not want to supply a specific timestamp for the measurement.
Thus, any successful request should include this:
Obviously, DEVICE_ID and DEVICE_KEY should be replaced with the values specific to your case. The value for dateutc may also be a date.
Then there are numerous parameters representing your measurements. I only use a few - like temperature, humidity and wind.
winddir - [0-360 instantaneous wind direction] windspeedmph - [mph instantaneous wind speed] windgustmph - [mph current wind gust, using software specific time period] windgustdir - [0-360 using software specific time period] windspdmph_avg2m - [mph 2 minute average wind speed mph] winddir_avg2m - [0-360 2 minute average wind direction] windgustmph_10m - [mph past 10 minutes wind gust mph ] windgustdir_10m - [0-360 past 10 minutes wind gust direction]
humidity - [% outdoor humidity 0-100%]
dewptf- [F outdoor dewpoint F]
tempf - [F outdoor temperature]
* for extra outdoor sensors use temp2f, temp3f, and so on
rainin - [rain inches over the past hour)] -- the accumulated rainfall in the past 60 min
dailyrainin - [rain inches so far today in local time]
baromin - [barometric pressure inches]
weather - [text] -- metar style (+RA)
clouds - [text] -- SKC, FEW, SCT, BKN, OVC
soiltempf - [F soil temperature]
* for sensors 2,3,4 use soiltemp2f, soiltemp3f, and soiltemp4f
soilmoisture - [%]
* for sensors 2,3,4 use soilmoisture2, soilmoisture3, and soilmoisture4
leafwetness - [%]
+ for sensor 2 use leafwetness2
solarradiation - [W/m^2]
UV - [index]
visibility - [nm visibility]
indoortempf - [F indoor temperature F]
indoorhumidity - [% indoor humidity 0-100]