npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-node-openweathermap

v1.0.1

Published

A Node-RED node that gets the weather report from openweathermap

Downloads

23,578

Readme

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/