Weather library

Index:

Functions:

weather-station

weather-station

Synopsis
Gets data from a weather station.
Usage
(weather-station
  station_type
  address
  "options" => options
)
Returns
data
Where
  • station_type is string: The type of station to connect to. Currently only "davis" station type is supported.
  • address is string: The address of the weather station. The address format is dependent of the station type. For "davis" type stations, the address format is "host:port" or simply "host".
  • options is list[0..1]: A list containing specific options of the station type.
  • data is list: A list containg name/value pairs for each weather property returned by the station. The properties currently supported are the following: station-info, timestamp, date, pressure, temperature, temperature-inside, humidity, humidity-inside, rain, solar-radiation, uv-radiation, wind-speed, wind-speed-avg and wind-direction.
Exceptions
  • "IOException": when an error occurs accessing the weather station.
Examples
(weather-station "davis" "10.1.1.21:22222")
(
  "timestamp" => 1535545911726
  "date" => "Wed Aug 29 14:31:51 CEST 2018"
  "pressure" => 1016
  "humidity" => 72
  "humidity-inside" => 49
  "temperature" => 28.72222222222222
  "temperature-inside" => 27.16666666666667
  "rain" => 0
  "solar-radiation" => 287
  "uv-radiation" => 2
  "wind-speed-avg" => 0
  "wind-speed" => 2.7
  "wind-direction" => 151
  "station-info" =>
  "Vantage Pro or Vantage Pro 2"
)
Top