1.1.2 • Published 3 months ago

node-red-node-suncalc v1.1.2

Weekly downloads
289
License
Apache-2.0
Repository
github
Last release
3 months ago

node-red-node-suncalc

A Node-RED node to provide a signal at sunrise and sunset.

Install

Either use the Node-RED Menu - Manage Palette - Install, or run the following command in your Node-RED user directory - typically ~/.node-red

npm install node-red-node-suncalc

Breaking Change - in version 1.0 the msg.moon property is now an object not a number - containing a lot more information.

Usage

Uses the suncalc npm to generate an output at sunrise and sunset based on a specified location.

Several choices of definition of sunrise and sunset are available, see the suncalc module for details.

The start and end times can be offset by a number of minutes before (minus) or after (plus) the chosen event time.

The node provide two outputs. The first output emits a msg.payload of 1 or 0 every minute depending if day-time (1) or night-time (0).

The second output emits only on the transition between night to day (-> 1) or day to night (-> 0).

It also outputs msg.start, msg.end and msg.now which are todays start and end times, with offsets applied, in ISO format, and the current ISO time.

msg.sun is an object containing the azimuth and altitude, in degrees, of the current sun position. msg.moon is an object containing its position, phase, illumination and icon.

1.1.2

3 months ago

1.1.0

1 year ago

1.0.1

4 years ago

1.0.0

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago

0.0.12

5 years ago

0.0.11

6 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

9 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago