~~NOTOC~~ ====== HSRW Weather Station at Campus Kamp-Lintfort ====== | {{ :weather_station:ws_sunny.jpg?400&direct |}} | | //Fig.: HSRW Weather Station, Campus Kamp-Lintfort// | ===== Interactive Grafana Dashboard of Real-Time Weather Data ===== | [[https://weather.eolab.de/grafana/d/Eb_lKrGMk/weather?orgId=1&refresh=15m&from=now-14d&to=now|{{ :weather_station:eolab_weatherstation_grafana.png?direct&600 |}}]] | | Fig.: Interactive real-time data plots. **Click on the image** or **[[https://weather.eolab.de/grafana/d/Eb_lKrGMk/weather?orgId=1&refresh=15m&from=now-14d&to=now|here]]** to open the Grafana dashboard. | /* :!: The the real-time data graphs are provided on our ** [[https://weather.eolab.de/grafana/d/Eb_lKrGMk/weather?orgId=1&refresh=15m&from=now-14d&to=now|Grafana]]** dashboard. */ /* ===== Description ===== ... */ ===== The Sensors of the Weather Station ===== ^ Measurement ^ Sensor ^ Datasheet ^ | Temperature | PT100 platinum wire, TF type 2018 | {{ :weather_station:e_2018.pdf |TF type 2018}} | | Temperature / Humidity | PT100 & capacitive element, TF type 3033 | {{ :weather_station:e_3033.pdf |TF type 3033}} | | Wind Speed | Cup anemometer, TF type 4035 | {{ :weather_station:e_4035.pdf |TF type 4035}} | | Wind Direction | Wind direction sensor, TF type 4123 | {{ :weather_station:e_4123.pdf |TF type 4123}} | | Barometer | Piezoresistive element, TF type 5004 | {{ :weather_station:e_5004.pdf |TF type 5004}} | | Precipitation | Tipping bucket rain gauge, TF type 7041 | {{ :weather_station:e_7041.pdf |TF type 7041}} | | Soil Moisture | Time Domain Reflectometer, IMKO TRIME-PICO64 | {{ :weather_station:e_35041000.pdf |TRIME-PICO64}} | | Photosynthetically Active Radiation | Kipp & Zonen PQS 1 PAR Quantum Sensor | {{ :weather_station:pqs1_par.pdf |PQS 1 PAR}} | | Solar Radiation | Pyranometer, Kipp & Zonen SMP10 | {{ :weather_station:smp10.pdf |SMP10}} | ====== Accessing the Real-Time Online Data ====== The data of our weather station is **freely available**! \\ We provide two main channels to access the data: - MQTT (trough our own broker), - RESTful API The accessible variables: ^ Key ^ Unit ^ Comment ^ | wind_speed | km/h | | | wind_direction | degrees | | | air_temperture | °C | | | air_relhumidity | % | | | smp10 | W/m2 | | | pqsl | µmol/m2s | | | soil_moisture | % | Sensor not relevant | | soil_tempblue | °C | Sensor not relevant | | soil_tempred | °C | Sensor not relevant | | air_pressure | hPa | | | precipitation | mm | | | created_at | ISO8601 | UTC | ===== MQTT Broker and Topic for Subscribing to Real-Time Online Data ===== We also publish our data on our own MQTT Server which doesn't need any authentication for receiving that kind of data. ^ MQTT Broker and Topic || ^ URL | eolab.de | ^ PORT | 1883 | ^ TOPIC | weather/hsrw-kali | ===== RESTful API to Request Real-Time Online Data ===== The RESTful Application Programming Interface (API) is used to download data or retrieve data e.g. in own programs or scripts. \\ The data is provided in a JSON-format. ==== Examples (response takes some time) ===== Get the recent 20 measurements: \\ ''[[https://weather.eolab.de/api/weather]]'' Retrieve the last 20 sensor data from all sensors since 12th Nov. 2021, 14:55:32, Central European Time (CET, Germany): \\ ''[[https://weather.eolab.de/api/weather/2021-11-12T14:55:32.000+0100|]]'' Retrieve every fifth measurement from all sensors between two timestamps (date + time): \\ ''[[https://weather.eolab.de/api/weather/2021-11-12T14:55:32.000+0100/2021-11-12T14:59:32.000+0100/5]]'' Second timestamp in milliseconds since 1970-01-01 00:00:00 UTC (Universal Time Coordinates ~ Greenwich Mean Time) \\ ''[[https://weather.eolab.de/api/weather/2021-11-12T14:55:32.000+0100/1636734789719/5]]'' ==== API Documentation ==== The API is now available under ''%%https://weather.eolab.de/api%%''. Two different **timestamp (date + time) types** are supported: * time in ms since 1970-01-01 00:00:00 UTC * [[https://en.wikipedia.org/wiki/ISO_8601|ISO8601]] /* ISO8601 short description by [[https://www.codegrepper.com/app/profile.php?id=173597|Scary hacker]]: */ The ISO8601 date-time standards can have different formats. A common one is: ''YYYY-MM-DD'T'hh:mm:ss.sss'Z' '' \\ Z is the offset from the UTC timezone, e.g. ''2020-12-31T21:45:10.500+0100'' is Dec. 31, 2020, 21:45 plus 10.5 seconds in UTC +1h, i.e. Central European Time CET (not summer time CEST!). \\ The same timestamp in UTC: ''2020-12-31T20:45:10.500+0000'' (or ''2020-12-31T20:45:10.500Z'' or ''2020-12-31T20:45:10.500UTC''. Time zone abbreviations such as CET, CEST, UTC, GMT are not supported in the API, yet). The routes of the API: * **''/''** \\ Check if the server is online and has a database connection * **''/weather''** \\ Get the last 20 measurements * **''/weather/:begin''** \\ Get the 20 next measurements after begin \\ '':begin'' has to be replaced by the time in ms since 1970-01-01 00:00:00 UTC * **''/weather/:begin/:end''** \\ Get all measurements between begin and end \\ '':begin'' and '':end'' in ms since 1970-01-01 00:00:00 UTC * do not misuse this route * /weather/:begin/:end/:n * Get every nth measurement between begin and end * :begin and :end have to be replaced by the time in ms since 01.01.1970 00:00:00 UTC * :n has to be replaced with a number (ex.: get every 3rd measurement) Example to retrieve every 5th data set between 627650252438 ms and 1627650855553 ms since 1970-01-01, i.e. from the Fri Jul 30 2021 15:04:12 GMT+0200 to Fri Jul 30 2021 15:14:15 GMT+0200: ''[[https://weather.eolab.de/api/weather/1627650252438/1627650855553/5]]''