Use node-red to store the weather data of 4 cities in an InfluxDB database and show it in a dashboard.
Refer to the dockerized project: https://github.com/opatiny/docker-weather-dashboard .
The project uses one environment variable: OWM_ID
. It is the private user key that you get when subscribing to openweathermap.
Its value must be set when running node-red:
OWM_ID=<value2> node-red
We create an InfluxDB database called weather_db
. The database contains 3 measurements called weather
, weather_hourly
and weather_daily
.
The measurements contain fields and tags.
temp
: Temperature in [°C]tempFeel
: Temperature in [°C] as perceived by humanshumidity
: Humidity in [%]wind
: Wind speed in [m/s]rain
: Amount of rain fallen over last hour in [mm]clouds
: Cloudiness in [%] (I forgot about this one...)
city
: Location of the measurementweather
: Weather description in a few words
3 different measurements:
weather
: log data in the measurement every minuteweather_hourly
: queryweather
and aggregate by hourweather_daily
: queryweather
and aggregate by day