JSPM

  • Created
  • Published
  • Downloads 79
  • Score
    100M100P100Q71563F
  • License Apache-2.0

A Node-RED node that checks if it's night or day using the DarkSky API

Package Exports

  • node-red-contrib-nighttime

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-red-contrib-nighttime) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

A simple node indicating if it's day or night.

The node sets: msg.payload to boolean "true" or "false" payloads.

The node checks every 2 minutes if current time and date is bigger than todays sunset and less than tomorrow's sunrise times.

it sends a "true" payload if it is dark and "false" if not dark.

This is done using DarkSky API and with latitude and longitude set of coordinates.

You need to open free account on DarkSky.net and get an API key in order to make this node working.

Powered by the Dark Sky Forecast API.