xAP Weather Schema

From XAP Automation
Jump to: navigation, search

Updated Weather Schema - Weather.data

This is an extended weather.data schema, based on the earlier weather.report schema (see below), and is intended to better match the data available from personal weather stations.

Both schema are valid, but vendors/authors of software capable of providing the additional data are encouraged to migrate to, or utilise this newer schema.

As descibed in the protocol definition, the message body will be preceded by a header, eg

{
v=12
hop=1
uid=FF401200
class=weather.data
source=vendor.weather.station
}

Note - class=weather.data

In the message body below, most keys are optional.

Keys for which data is not available from the data source in use should not be included.

To reduce the message complexity, message size, and to remove data that the end user will not use, the vendor should consider allowing the user to disable keys or key pairs, even if data is available

For example : If WindDirD was not required because, for instance, it was non-numeric it would not be included

If TempF and DewF were not required because values in fahrenheit were not appropriate to the localisation then they would not be included

If the Indoor Humidity and temperature were not required then all 3 (humidity and temperature in both F & C) could be omitted

If speed and distance measurements in mph, miles and yards were not appropriate to the localisation then they could be ommitted from the message

Note that where Wind direction data is available it should always be provided in the message as a numeric value (WindDirD) as this can be more readily recorded and graphed.

Previous schema included a key for AirPressure and actual implementations included a key for Rain, but this was not in keeping with the overall approach of the schema. Vendors may wish to keep these keys in the short term for compatibility, but both users and vendors are encouraged to use the updated format below for these keys.

weather.report
{
UTC=(Time of report in hh:mm format using utc time zone)
-- mandatory
DATE=(Date of report in YYYYMMDD format)
-- mandatory
Station=(Station code or identifier eg EGNJ)
-- optional
Location=(location, city, town, village)
-- optional
WindM=(Value of wind in mph or "Gusty" if gusty)
-- optional
WindK=(Value of wind in kph or "Gusty" if gusty)
-- optional
WindGustsM=(Value of wind gusts in mph)
-- optional
WindGustsK=(Value of wind gusts in kph)
-- optional
WindDirC=(Compass heading of wind N|NE|E|SE|S|SW|W|NW)
-- optional
WindDirD=(Compass heading of wind in degrees)
-- optional
TempC=(Temperature in centigrade)
-- optional
TempF=(Temperature in fahrenheit)
-- optional
DewC=(Dew point in centigrade)
-- optional
DewF=(Dew point in fahrenheit)
-- optional
RainM=(Rainfall since midnight in mm)
-- optional
RainI=(Rainfall since midnight in inches)
-- optional
Humidity=(Relative Humidity as %)
-- optional
AirPressureP=(Air pressure in hPa)
-- optional
AirPressureH=(Air pressure in inHg)
-- optional
AirPressureI=(Air Pressure Indication Rising/Steady/Falling)
-- optional
VisibiltyM=(visibility in meters)
-- optional
VisibiltyY=(visibility in yards)
-- optional
Cloud=(Overall cloud cover eg "Clear Skies")
-- optional
CloudM.X=(Cloud type and height in miles ie "Overcast at 5.4M. X increments on each cloud layer)
-- optional
CloudK.X=(Cloud type and heightin kilometers ie "Overcast at 5.4Km. X increments on each cloud layer)
-- optional
WindchillC=(Windchill Temperature in centigrade)
-- optional
WindchillF=(Windchill Temperature in fahrenheit)
-- optional
InTempC=(Indoor Temperature in centigrade)
-- optional
InTempF=(Indoor Temperature in fahrenheit)
-- optional
InHumidity=(Indoor Relative Humidity as %)
-- optional
Picture=(url to weather/webcam picture)
--optional
Icon=(The name of the picture to use, icon names from kweather www.kde.org. File names below)
-- optional
Error=(Download errors either "NoData" if last connection failed or "StationNotFound" if ICAO code isn't valid)
-- optional
}

Possible icon names, higher number signifies more clouds

cloudy1
cloudy2
cloudy3
cloudy4
cloudy5
dunno (usually with "error=nodata")
fog
hail
light_rain
mist
overcast
shower1
shower2
shower3
sleet
snow1
snow2
snow3
snow4
snow5
sunny
tstorm1
tstorm2
tstorm3



Original Weather.Report schema

Class=weather.report

weather.report
{
UTC=(Time of report in hh:mm format using utc time zone)
-- mandatory
DATE=(Date of report in YYYYMMDD format)
-- mandatory
WindM=(Value of wind in mph or "Gusty" if gusty)
-- optional
WindK=(Value of wind in kph or "Gusty" if gusty)
-- optional
WindGustsM=(Value of wind gusts in mph)
-- optional
WindGustsK=(Value of wind gusts in kph)
-- optional
WindDirC=(Compas heading of wind N|NE|E|SE|S|SW|W|NW)
-- optional
WindDirD=(Compas heading of wind in degrees)
-- optional
TempC=(Temperature in centigrade)
-- optional
TempF=(Temperature in fahrenheit)
-- optional
DewC=(Dew point in fahrenheit)
-- optional
DewF=(Dew point in fahrenheit)
-- optional
AirPressure=(Air pressure in hPa)
-- optional
Cloud=(Overal cloud cover currently only "Clear Skies")
-- optional
CloudM.X=(Cloud type and height in miles ie "Overcast at 5.4M. X increments on  each cloud layer)
-- optional
CloudK.X=(Cloud type and heightin kilometers ie "Overcast at 5.4Km. X increments on each cloud layer)
-- optional
Icon=(The name of the picture to use, icon names from kweather www.kde.org. File names below)
-- optional
Error=(Download errors either "NoData" if last connection failed or "StationNotFound" if ICAO code isn't valid)
-- optional
}

Possible icon names, higher number signifies more clouds

cloudy1
cloudy2
cloudy3
cloudy4
cloudy5
dunno (usually with "error=nodata")
fog
hail
light_rain
mist
overcast
shower1
shower2
shower3
sleet
snow1
snow2
snow3
snow4
snow5
sunny
tstorm1
tstorm2
tstorm3