Quick overview
Youtube Video: https://youtu.be/g4AklHzTYy0?si=ked6L2SbpdirFNA7
This workflow checks NOAA space-weather data, Open-Meteo cloud forecasts, and local sun/moon conditions every 10 minutes to calculate an aurora visibility score, then sends a Slack alert (optionally with a live all-sky camera image) when conditions meet your thresholds and cooldown rules.
How it works
- Runs every 10 minutes on a schedule and loads a location configuration (coordinates, thresholds, and camera URL).
- Fetches near-real-time NOAA SWPC feeds for planetary Kp, solar wind magnetic field (Bz/Bt), and solar wind plasma (speed/density) and normalizes them into current metrics with data age checks.
- Calculates the current sun altitude (darkness) plus moon altitude and illumination for the configured coordinates and exits if it is not dark enough.
- Requests Open-Meteo forecasts for two nearby points (the target location and the all-sky camera location) and computes an “optical obstruction” cloud metric for current and near-future conditions.
- Computes an aurora viability score (space weather, sky clarity, and moon interference), then exits if the score is below the configured threshold or the source data is incomplete/stale.
- Enforces an alert cooldown (or allows re-alerting when the score increases significantly), builds a formatted dispatch message, and tries to download the latest all-sky camera frame.
- Posts the alert to Slack, uploading the image when available or sending a text-only message otherwise, and stores the last alert time/score to enforce cooldown on future runs.
Setup
- Add Slack credentials, set the target Slack channel ID, and ensure the channel allows file uploads if you want image alerts.
- Update the Config values for your location (name, latitude/longitude, timezone) and tune thresholds such as kpRequired, darknessThreshold, scoreThreshold, cooldownMinutes, and rescoreBump.
- Set allSkyUrl/allSkyLabel and the all-sky camera coordinates (allSkyLat/allSkyLon) to a publicly accessible image endpoint if you want the workflow to attach a live frame.