http://wiki.wunderground.com/index.php/PWS_-_Upload_Protocol

#####
This information is intended to instruct users/designers building their own software feeding HWA_Customupload.
Inserted in the text from the wiki-section quoted above you find what&how this WU-protocol should/might be applied for a CustomUpload towards HetweerActueel
(~ HWA_CustomUpload).
These inserts have been marked by ##### above and below the subject text, like around these 2 lines.
Be aware that this is not a description how a PWS is generating the strings uploaded for HWA_CustomUpload.
#####

PWS - Upload Protocol
Contents 
1 Personal Weather Station Upload Protocol
1.1 Here is how to create a Personal Weather Station update to wunderground.com:
1.1.1 Background
1.1.2 URL
1.1.3 GET parameters
1.1.4 Example URL
1.1.5 Response Text
1.1.6 RapidFire Updates

Personal Weather Station Upload Protocol


Here is how to create a Personal Weather Station update to wunderground.com:

Background
To upload a weather condition, you make a standard HTTP GET request with the ID, PASSWORD and weather conditions as GET parameters

URL
Here is the URL used in the uploading towards original WUnderground (if you browse here without parameters you will get a brief usage):
https://weatherstation.wunderground.com/weatherstation/updateweatherstation.php

#####
For CustomUpload towards HetWeerActueel the header-URL becomes:
https://hwaportal.nl/weatherstation/<identifier>/index.php?
The <identifier> is a textstring consisting of <ID><PASSWORD>
Obviously in practise everywhere without the < and >
Example header-URL with 'fake' identifier:
https://hwaportal.nl/weatherstation/HWA12345/index.php?
The identifier directs the dataflow to a specifically designated folder at receiving end.
#####

GET parameters
NOT all fields need to be set, the _required_ elements are:
action
ID
PASSWORD
dateutc
IMPORTANT all fields must be url escaped
reference http://www.w3schools.com/tags/ref_urlencode.asp
example
  2001-01-01 10:32:35
   becomes
  2000-01-01+10%3A32%3A35
if the weather station is not capable of producing a timestamp, our system will accept "now". Example:
dateutc=now
list of fields:
action [action=updateraw] -- always supply this parameter to indicate you are making a weather observation upload

#####
ID [ID as registered by wunderground.com => to be replaced by ID issued by HetWeerActueel, default = HWA, other text = Optional]
PASSWORD [Station Key registered with this PWS ID, case sensitive => to be replaced by PASSWORD issued by HetWeerActueel, numbers only]
#####

dateutc - [YYYY-MM-DD HH:MM:SS (mysql format)] In Universal Coordinated Time (UTC) Not local time
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)

#####
Solarradiation and UVI and softwaretype might be included in the compilation for HetWeerActueel:
if present & filled, will be processed.
#####

solarradiation - [W/m^2]
UV - [index]
softwaretype - [text] ie, as generated by the string-generator: WeatherLink, VWS, WeatherDisplay, Meteobridge, FOSHK_Plugin, WeeWX, CumulusMX

#####
Not within the scope of the basic WU-protocol, but
IF the datasource provides such data, it is useful that following fields are added & filled:
temp5f - [F for reporting of Grasstemeperature]
weeklyrainin - [rain inches so far this week in local time] 
monthlyrainin - [rain inches so far this month in local time] 
yearlyrainin - [rain inches so far this year in local time]
Processing at the side of the HWA-portalserver is being developed.

Values below this line are generally not used at the side of HetWeerActueel:
no need to include in the compilation. 
#####

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

visibility - [nm visibility]
indoortempf - [F indoor temperature F]
indoorhumidity - [% indoor humidity 0-100]
Pollution Fields:
AqNO - [ NO (nitric oxide) ppb ]
AqNO2T - (nitrogen dioxide), true measure ppb
AqNO2 - NO2 computed, NOx-NO ppb
AqNO2Y - NO2 computed, NOy-NO ppb
AqNOX - NOx (nitrogen oxides) - ppb
AqNOY - NOy (total reactive nitrogen) - ppb
AqNO3 -NO3 ion (nitrate, not adjusted for ammonium ion) UG/M3
AqSO4 -SO4 ion (sulfate, not adjusted for ammonium ion) UG/M3
AqSO2 -(sulfur dioxide), conventional ppb
AqSO2T -trace levels ppb
AqCO -CO (carbon monoxide), conventional ppm
AqCOT -CO trace levels ppb
AqEC -EC (elemental carbon) – PM2.5 UG/M3
AqOC -OC (organic carbon, not adjusted for oxygen and hydrogen) – PM2.5 UG/M3
AqBC -BC (black carbon at 880 nm) UG/M3
AqUV-AETH  -UV-AETH (second channel of Aethalometer at 370 nm) UG/M3
AqPM2.5 - PM2.5 mass - UG/M3 
AqPM10 - PM10 mass - PM10 mass
AqOZONE - Ozone - ppb


Example URL
Here is an example of a full URL with destination is WUnderground:
https://weatherstation.wunderground.com/weatherstation/updateweatherstation.php?ID=KCASANFR5&PASSWORD=XXXXXX&dateutc=2000-01-01+10%3A32%3A35&winddir=230&windspeedmph=12&windgustmph=12&tempf=70&rainin=0&baromin=29.1&dewptf=68.2&humidity=90&weather=&clouds=&softwaretype=vws%20versionxx&action=updateraw
NOTE: not all fields need to be set, and optionally extra fields can be added as listed above

#####
Here is an example of a full URL with destination is HetWeerActueel (including temp5f for future transfer of grasstemperature):
https://hwaportal.nl/weatherstation/HWA12345/index.php?ID=HWA&PASSWORD=12345&dateutc=2000-01-01+10%3A32%3A35&winddir=230&windspeedmph=12&windgustmph=12&tempf=70&temp5f=70&rainin=0&dailyrainin=0&baromin=29.1&solarradiation=10&
UV=1&dewptf=68.2&humidity=90&weather=&clouds=&softwaretype=Meteobridge%20versionxx&action=updateraw
NOTE: not all fields need to be set, and 'extra' fields beyond those included in the example might be disregarded at the HWA-portalserver

If at the side of the HWA-portalserver no 'receiver' has been prepared, an incoming transmission will be disregarded.
Therefore do not send a roque URL-call to the HWA-portalserver. 

During experiments with testing of cooperation between uploading scripts and the scripts in the HWA-portalserver, 
it is possible that the HWA-portalserver does not reply with response. 
#####

Response Text
The response from an HTTP GET request contains some debugging data.
RESPONSES and MEANINGS:
response
"success"
the observation was ingested successfully
response
"INVALIDPASSWORDID|Password and/or id are incorrect"
invalid user data entered in the ID and PASSWORD GET parameters
response

#####
RapidFire is not expected at the interface for HetWeerActueel, and will be disregarded.
Uploadinterval for 'normal' upload towarde HWA_CustomUpload to be 5 minutes or longer.
#####

<b>RapidFire Server</b><br><br>
<b>usage</b><br>
the minimum GET parameters ID, PASSWORD, action, and dateutc were not set

RapidFire Updates
RapidFire Updates allow you to update weather station conditions at a frequency up to once observation every 2.5 seconds. Web site visitors will see these observations change in real-time on the wunderground.com site.
A real-time update should look almost like the standard update.
However, the server to request is:
rtupdate.wunderground.com, not weatherstation.wunderground.com
And, please add to the query string:
&realtime=1&rtfreq=2.5
where rtrfreq is the frequency of updates in seconds.
here is an example:
https://rtupdate.wunderground.com/weatherstation/updateweatherstation.php?ID=KCASANFR5&PASSWORD=XXXXXX&dateutc=2000-01-01+10%3A32%3A35&winddir=230&windspeedmph=12&windgustmph=12&tempf=70&rainin=0&baromin=29.1&dewptf=68.2&humidity=90&weather=&clouds=&softwaretype=vws%20versionxx&action=updateraw&realtime=1&rtfreq=2.5
We haven't decided whether you should also send standard updates if the user is uploading in real-time. For now, I think we are leaning toward either only sending standard updates, or only sending real-time updates, not requiring that both are sent when the user is in real-time mode. That'll be simpler.

