A Node-RED node that triggers signals at sunrise and sunset using the suncalc library. Current version 1.2.0. It calculates times based on a specified location and provides configurable definitions of sunrise/sunset with minute offsets. Outputs day/night status every minute and emits transitions. Also supplies sun/moon position data. Differentiators: integrated into Node-RED ecosystem, simple setup, two outputs for continuous state and edge triggers.
npm install node-red-node-suncalcNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Install the node via Node-RED palette manager, then drag into workspace, configure latitude/longitude, and connect to debug.
Update flows that rely on msg.moon being a number to access properties like msg.moon.illumination or msg.moon.phase.
If you need sub-minute precision, consider using a different node or external cron.
Convert coordinates to decimal degrees (e.g., 40.7128, -74.0060).
Run 'npm install node-red-node-suncalc' from the Node-RED user directory (~/.node-red).
Restart Node-RED or use the Manage Palette option to refresh.