logoalt Hacker News

Show HN: Nightwatch – a Mac menu-bar app that tells you when tonight is clear

63 points • by delphidolphin • yesterday at 9:31 AM • 9 comments • view on HN

Here in the north of England clear nights are at a premium, and it's never guaranteed that you'll be able to see anything but cloud. That's why I developed Nightwatch, so that I could be notified when one of those precious few nights where I could see into the heavens was available. Finding out whether tonight was worth setting up meant reading forecast charts every evening, usually to learn that it was not. Nightwatch does that reading for me.

It sits in the Mac's menu bar and refreshes the forecast every 30 minutes. An hour before sunset it sends one notification, and only if there is an unbroken run of clear sky in astronomical darkness long enough to image in. Otherwise it says nothing: no news means "clouds".

I hope this is useful for other hobbyist stargazers too!

When I was a child I wanted desperately to be an astronaut or a dinosaur. I'm now old enough to be the latter and was born in a country where the former was never an option. I've had a fascination with the stars since a a friend of my father gifted me a telescope, and have faded memories of sharing time with my father staring at the stars. My father passed away a few years back and the memory of those nights came back, along with the want to share the same experience with my kids and grandchild.

The app uses two forecasts: Apple's WeatherKit is the main source and Open-Meteo is a second opinion. When they disagree, the alert says so instead of averaging them.

Thin high cloud counts for half. Stacking many short frames works through a veil of cirrus, so treating it as full cloud threw away usable nights.

It works on your own horizon: hills come from terrain data, and you set the houses and trees in each direction, so they are accounted for when it says what is up.

It works out, a year ahead, when the Moon will pass in front of a planet, a bright star or the Pleiades as seen from your site.

You don't need an account. What leaves the Mac is the coordinates of the place being forecast, sent to the forecast and sky-survey services listed in PRIVACY.md.

Limits: Mac only, and the aurora alerts are UK only. The worldwide light-pollution data is new this week. I have checked it against Britain's finer grid and a handful of cities, so I would especially like to hear from people elsewhere whether the darkness it suggests for your site looks right.


Comments

jareds • today at 8:09 PM

Are there API's that provide simple information on if it's a good night for astronomy? I am totally blind, but would like to know when it's a good night for my kids to use there telescope. I don't use a Mac as my primary machine, and xasteria is not accessible.

NKosmatos • today at 9:01 PM

Nice one mate! You’ve included many things and perhaps you should consider making it a full desktop app (or even better web app). Thanks for sharing and extra like for being a DWARFLAB owner :-)

Reason077 • today at 7:14 PM

Impressive looking app! But I’d argue something like this doesn’t really belong in the Mac menu bar. The last thing most of us need is even more clutter in that space.

It’s a shame because years ago macOS had the perfect place for “quick information at a glance” apps: the Dashboard. But the Dashboard got killed off in mysterious circumstances, and I still miss it!

I had hopes that something like Dashboard would make a comeback with the advent of the new widgets framework, but that doesn’t seem to have happened. Widgets can only be buried in Notification Centre (where they get lost and forgotten, buried under all the notifications) or on the desktop (same, plus needless clutter).

Apple, please bring back Dashboard!

onion2k • today at 7:46 PM

Here in the north of England..

You'd better be north of Leeds to be saying things like that. :) Cool app.

➕ show 1 reply
leetrout • today at 6:10 PM

Awesome! Thank you for sharing!

For iOS stargazers that don't already know (we've all been there) xasteria is a great option for your phone to compliment this (it also uses 7Timer!).

https://apps.apple.com/us/app/xasteria-astronomy-weather/id9...

lw125 • today at 8:11 PM

Wow, nicely done. Especially the ability define a custom horizon. In my backyard, I have neighbor trees all around blocking a huge portion of the sky, plus the back wall of my house (too many street lamps in my front to observe). I'd love to give this a go, but I don't have a mac. Any planned support for PC?

axismundi • today at 9:29 PM

while we're at it, what gear would you recommend for a beginner stargazer?

asasidh • today at 7:46 PM

This is a great usecase for someone who likes photography. However I would have this as one of my tasks for my personal agent to check and alert me on time. I already have too many things on my menu bar.