Skip to content

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

License

Notifications You must be signed in to change notification settings

recklessnl/node-red-contrib-sunevents

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 60.1%
  • HTML 39.9%