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-forecastio

v0.1.13

Published

A Node-RED node that gets the weather forecast from Forecast.io

Downloads

61

Readme

node-red-node-forecastio

A Node-RED node that gets the weather forecast from Forecast.io.

Now Deprecated in favour of node-red-node-darksky - see http://status.darksky.net/2016/09/20/forecast-api-is-now-dark-sky-api.html for details

Pre-requisites

You will need an API key from forecast.io.

This allows 1000 requests per day. The polling node makes a request every 5 minutes = 288 requests.

Install

Run the following command in the root directory of your Node-RED install. This is usually ~/.node-red

    npm install node-red-node-forecastio

Usage

Two nodes that get the weather forecast from Forecast.io.

One node polls forecast.io every 5 minutes, the other is triggered to request weather forecast data when an input is received.

The user has the option of providing a date to the node instead of returning data for the next day. The node will always prioritise the node settings if they are present.

The node is configured using a latitude and longitude set of coordinates, an optional date/time combination, and a set of units with which to format the response.

These can be passed in as settings on the node, or as:

  • msg.location.lat, msg.location.lon and msg.time or msg.payload.

If using msg.time it should be a javascript Date object. If using msg.payload it must be a string or number of milliseconds since 1970 (epoch time in mS.)

The node sets the following properties of msg.payload:

Results

Both will return

  • weather - a single word representation of the current weather forecast.
  • detail - a more detailed explanation of what the weather is forecast to be.
  • humidity - a current humidity forecast in decimal (0-1).
  • maxtemp - the current forecast max temperature for the location in Fahrenheit.
  • mintemp - the current forecast minimum temperature for the location in Fahrenheit.
  • windspeed - the current forecast windspeed at the location in metres per second
  • winddirection - the current forecast wind direction for the location in degrees.
  • lon - the longitude of the location from which the forecast was sourced.
  • lat - the latitude of the location from which the forecast was sourced.
  • clouds - the current forecast cloud coverage of the location in percent.
  • precipitation - the current forecast precipitation chance
  • sunrise - the time at which the is forecast to rise in Unix UTC format.
  • sunset - the time at which the sun is forecast to set in Unix UTC format.
  • units - the units of the returned data, as requested.

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 Forecast.io.
  • msg.data - the full JSON returned by the API. This is VERY rich...

Weather data provided by Forecast.io/