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.
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
To install new nodes, use Menu - Manage palette
option and search for the below mentioned nodes.
After installation, you should have new nodes available under dashboard
, weather
and formats
tabs in the right side pannel.
Add your OpenWeatherMap API key to the openweathermap
nodes in the flow.
Once done, open the dashboard at http://localhost:1880/ui
- The user can give a preferred location as input
- Weather data will be updated every 30 seconds by default.
- 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. - Temperature, wind, humidity and pressure will be showen in suitable gauges.
- 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.
Under the Settings tab,
- The user can select the input format they prefer (city/ country or latitude/ longitude)
- By default, the weather data will be updated every 30 seconds. But the user can set this to a value they prefer.
- The user can turn on/ off charts tab
Plot real time Temperature, humidity and wind speed data.
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.