1.0.1 • Published 4 days ago

node-red-node-openweathermap v1.0.1

Weekly downloads
2,844
License
Apache-2.0
Repository
github
Last release
4 days ago

node-red-node-openweathermap

A Node-RED node that gets the weather report and forecast from OpenWeatherMap.

Install

Run the following command in the root directory of your Node-RED install

    npm install node-red-node-openweathermap

Usage

Two nodes that get the weather report and forecast from OpenWeatherMap.

Note: An API key is required to use these nodes. To obtain an API key go to OpenWeatherMap.

Input Node

Fetches the current weather or 5 day forecast at a location specified by city and country or latitude and longitude every 10 minutes - and outputs a msg if something has changed.

Query node

Accepts an input to trigger fetching the current weather either from a specified city and country or latitude and longitude or passed in on

msg.location.city and msg.location.country
    or
msg.location.lat and msg.location.lon

Results

Current conditions will return

  • description - a brief verbal description of the current weather for human reading.
  • weather - a very short description of the current weather.
  • icon - the weather icon code for the current conditions.
  • id - the id given to the current weather by OpenWeatherMap
  • tempc - the current ground temperature at that location in Celsius.
  • tempk - the current ground temperature at that location in Kelvin.
  • humidity - the current relative humidity at the location in percent.
  • windspeed - the current wind speed at the location in metres per second.
  • winddirection - the current wind direction at the location in meteorological degrees.
  • location - the name of the location from which the data was sourced.
  • rain - the precipitation amount in mm/h (only present if it is raining).

5 day Forecast will return a 5 part array, each with

  • dt - epoch timestamp
  • pressure - in hPa
  • humidity - in %
  • speed - wind speed in metres per second
  • deg - wind direction in degrees
  • clouds - cloudiness in %
  • temp - an object with various temperatures in degC,
    • day, min, max, night, eve, morn
  • weather - an object with some misc. data,
    • description, icon, main, id

The node also sets the following properties of msg.location.

  • lat - the latitude of the location from which the data was sourced.
  • lon - the longitude of the location from which the data was sourced.
  • city - the city from which the data was sourced.
  • country - the country from which the data was sourced.

Finally, the node sets:

  • msg.time - the time at which the weather data was received by OpenWeatherMap.
  • msg.data - the full JSON returned by the API. This is VERY rich...

Weather data provided by OpenWeatherMap.org/

1.0.1

4 days ago

1.0.0

8 days ago

0.5.1

2 years ago

0.5.0

3 years ago

0.4.0

3 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.2

4 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.20

6 years ago

0.1.19

6 years ago

0.1.18

7 years ago

0.1.17

7 years ago

0.1.16

7 years ago

0.1.15

7 years ago

0.1.14

7 years ago

0.1.13

7 years ago

0.1.12

7 years ago

0.1.11

8 years ago

0.1.10

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago