1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
node-red-nodes/time
2014-07-06 20:58:52 +01:00
..
icons resize a couple of icons 2014-06-07 08:31:34 +01:00
79-suncalc.html make sunrise/sunset second output ONLY trigger on actual transitions and not at startup. 2013-10-19 15:37:20 +01:00
79-suncalc.js Update node-red-nodes sample, analysis, storage and time nodes to use strict and pass jshint scan 2014-06-28 23:37:19 +01:00
LICENSE Add xmpp, suncalc and leveldb as npms... 2014-07-06 20:58:52 +01:00
package.json Add xmpp, suncalc and leveldb as npms... 2014-07-06 20:58:52 +01:00
README.md Add xmpp, suncalc and leveldb as npms... 2014-07-06 20:58:52 +01:00

node-red-node-suncalc

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

Install

Run the following command in the root directory of your Node-RED install

npm install node-red-node-suncalc

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 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 sets the msg.topic to sun and msg.moon to the fraction of the moon currently visible (a value between 0 for no moon and 1 for full moon).