/node-red-weather-dashboard

A dashboard UI for weather data from OpenWeatherMap API

MIT LicenseMIT

node-red-weather-dashboard

platform /badge/Node-RED/v3.0.2/green /badge/Node.js/v14.17.1/green /badge/Arduino_IDE/v1.8.5/green /badge/license/MIT/blue

dashboard

A dashboard UI to display weather data from OpenWeatherMap API. When weather data passes a user-defined limit, a warning message will be sent through an MQTT broker to the NodeMCU, and the built in LED will start blinking accordingly.

node-mcu-weather-integration

Pre-requisites

The Node-RED-Dashboard requires Node-RED to be installed on your local machine.

Create a API key using OpenWeatherMap API. I used their Current Weather Data API. This key needs to be added to OpenWeatherMap nodes in the flow.

A NodeMCU (optional). A good article about how to use NodeMCU with Arduino IDE can be found here

Install

To install new nodes, use Menu - Manage palette option and search for the below mentioned nodes.

  1. node-red-dashboard
  2. node-red-node-openweathermap
  3. node-red-contrib-moment

After installation, you should have new nodes available under dashboard, weather and formats tabs in the right side pannel.

Setting up

Add your OpenWeatherMap API key to the openweathermap nodes in the flow.

Once done, open the dashboard at http://localhost:1880/ui

Features

Dashboard
  1. The user can give a preferred location as input
  2. Weather data will be updated every 30 seconds by default.
  3. A brief description about the current weather at that location, sunset and sunrise times will be shown under the Description. User can also listen to this as audio by pressing the button.
  4. Temperature, wind, humidity and pressure will be showen in suitable gauges.
  5. The user can set warning limits for either Temperature, Pressure or Wind speed. A warning message will be displayed if the weather surpasses these limits, and will be sent to the NodeMCU through MQTT broker.

Dashboard_Weather_Tab

User inputs

Under the Settings tab,

  1. The user can select the input format they prefer (city/ country or latitude/ longitude)
  2. By default, the weather data will be updated every 30 seconds. But the user can set this to a value they prefer.
  3. The user can turn on/ off charts tab

Dashboard_Settings_Tab

Charts

Plot real time Temperature, humidity and wind speed data.

Dashboard_Charts_Tab

NodeMCU (optional)

The user should update ssid and password according to their network.

Everytime the dashboard displays a warning, it will also be published under the topic "warning". As our NodeMCU is subscribed to the topic "warning", it will receive that message and blink the built in LED according to by how much the weather data surpassed the set warning limit.

Screen Shot 2022-09-18 at 12 29 11 am