A simple node-red node that, for a given sun event, calculates the time of next occurrence of the event at a given geographic location. The node injects a message into the flow at the calculated time.
The node calculates the sun event occurrence time by means of the SunCalc library.
This node calculates the time of next occurrence of a given sun event at a given geographical location and injects a message into the flow at the calculated time. The node allows to configure a time offset (either negative or positive) for the injection time. Additionally, the user can manually trigger message injection via the node-red admin panel, similarly as they can do for the standard node-red's inject node.
You can install the node by the node-red's palette manager or by executing the following command in your node-red's home directory:
npm install node-red-contrib-sun-event-trigger
Use the node in the same way as you would use the standard node-red's inject node. For example:
See the node's help page in the node-red's admin panel for exhaustive information.
If you want to say thank you by donation, you can do it here: