Skip to content

Module thc_MeteoSwiss

Andreas Drollinger edited this page Jun 12, 2016 · 12 revisions

MeteoSwiss

Introduction and setup

The thc_MeteoSwiss module implements THC devices that get data from SwissMetNet. For details about the data portal, see http://opendata.admin.ch/en/dataset/messdatensmn.

To get weather data you need first to know the abbreviation of the location you are interested in. For this open data legend file http://data.geo.admin.ch.s3.amazonaws.com/ch.meteoschweiz.swissmetnet/03-10min_Daten_legenden.zip.

The following current weather parameters are available :

  • temperature - Air temperature 2 m above ground; current value (°C)
  • humidity - Relative air humidity 2 m above ground; current value (%)
  • pressure - Pressure reduced to sea level according to standard atmosphere (QNH); current value (hPa)
  • speed - Wind speed; ten minutes mean (km/h)
  • direction - Wind direction; ten minutes mean (°)
  • precipitation - Precipitation; ten minutes total (mm)

The definition of an MeteoSwiss devices requires the declaration of the 'get' command, using the following syntax:

 {thc_MeteoSwiss {<LocationAbbreviation> <WeatherParameter>}}

Examples

 DefineDevice Bern,temp \
    -name Bern -group Environment -format "%sC" -range {-30 50} -update 10m \
    -get {thc_MeteoSwiss {"BER" "temperature"}}
Clone this wiki locally