node-red-contrib-sunevents 0.0.5

A node for node-red that generates events based on the position of the Sun at the appropriate time of day

npm install node-red-contrib-sunevents

A node for node-red that generates events based on the location of the Sun at the appropriate time of day.

Outputs an object called msg containing the event name in msg.payload and the event date & time in msg.datetime. The msg.topic can be set in the node's configuration or it will default to the node name or "sun events".

Calculations are performed using the excellent SunCalc module (https://github.com/mourner/suncalc) and the following sun events are output from this node:

  • sunrise: sunrise (top edge of the sun appears on the horizon)
  • sunriseEnd: sunrise ends (bottom edge of the sun touches the horizon)
  • goldenHourEnd: morning golden hour (soft light, best time for photography) ends
  • solarNoon: solar noon (sun is in the highest position)
  • goldenHour: evening golden hour starts
  • sunsetStart: sunset starts (bottom edge of the sun touches the horizon)
  • sunset: sunset (sun disappears below the horizon, evening civil twilight starts)
  • dusk: dusk (evening nautical twilight starts)
  • nauticalDusk: nautical dusk (evening astronomical twilight starts)
  • night: night starts (dark enough for astronomical observations)
  • nightEnd: night ends (morning astronomical twilight starts)
  • nauticalDawn: nautical dawn (morning nautical twilight starts)
  • dawn: dawn (morning nautical twilight ends, morning civil twilight starts)
  • nadir: nadir (darkest moment of the night, sun is in the lowest position)

Node Info

Version: 0.0.5
Updated 2 years, 6 months ago
License: Apache-2.0

Downloads

3 in the last day
13 in the last week
72 in the last month

Nodes

  • sun events

Keywords

  • node-red
  • suncalc
  • sunrise
  • sunset

Maintainers

  • freakent