naM ,sevitcepsreP weN

    node-red-contrib-suncalcinput

    1.0.0 • Public • Published

    node-red-contrib-suncalcinput

    A Node-RED node to provide a signal at sunrise and sunset. Where location can be changed with the input.

    Install

    Run the following command in your Node-RED user directory - typically ~/.node-red

    npm install node-red-contrib-suncalcinput
    

    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).

    The node provide one input. Setting msg.lat to latitude and msg.lon to longitude will change the position.

    Acknowledgement

    This node is based on node-red-node-suncalc which offers the same functionality except for the posibility to change position dynamically.

    Install

    npm i node-red-contrib-suncalcinput

    DownloadsWeekly Downloads

    15

    Version

    1.0.0

    License

    Apache-2.0

    Unpacked Size

    11.8 kB

    Total Files

    7

    Last publish

    Collaborators

    • spanken