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

github.com
delphidolphin
3 days ago
85points
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.

26 comments

Comments

jareds•yesterday
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.
delphidolphin•yesterday
Hi jareds - your reply prompted me to look at what accessibility options are already in Nightwatch, as I'm ashamed to say I'd not done enough in this respect.

Keyboard navigation, the ability to change text-size, and voiceover support will all be in the next version.

leetrout•yesterday
delphidolphin•yesterday
Hi - the seeing and transparency information in Nightwatch come from 7Timer and Open-Meteo, and both publish free APIs.
misnome•yesterday
clearoutside.com, which is pretty reasonable at predicting cloud cover, says it gets the data from Meteosource.
Reason077•yesterday
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!

delphidolphin•yesterday
I agree, it can get cluttered, especially if you have a Mac with a notch. The Nightwatch widget will give you an at-a-glance view of the night's conditions, as well as notifications which will hopefully provide a decent heads up.
leetrout•yesterday
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...

delphidolphin•yesterday
I'll have a look at xasteria. I have thought about creating a companion iPhone app, though my biggest problem was finding a clear night to start out from, with my phone then used to control the Dwarf Mini. There are more good apps out there than I realised when I put this together, but I'd be happy to look at a either a companion or universal app if enough people wanted it.
lw125•yesterday
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?
delphidolphin•yesterday
Thank you. I must admit that I created the horizon capture because my back yard has the same problem. I thought I was a genius for coming up with the idea, until I did a bit more research and saw that pretty much every astronomy app already have similar functions.

I might have a look at a Windows version in future, but don't have access to a PC at the moment. The code is open source on Github if anyone wanted to make an alternative version in the meantime. Nightwatch does make use of the Mac's location services and Apple Weather, but these should be easy to swap out. I don't know whether widgets ever made it back to the desktop on Windows, so anyone looking at porting it over might need to change the widget into a standard dialog.

onion2k•yesterday
Here in the north of England..

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

delphidolphin•yesterday
You must have a crystal ball - though Londoners also consider anything further than the Watford Gap as the north!

Without doxxing myself, I'm based in a village on the southern edge of the Yorkshire Dales.

tonyarkles•yesterday
The screenshot says North York Moors, which I had to look up but certainly looks like it qualifies!
robotmay•yesterday
This is fun! Something slightly more broad, capturing golden & blue hour on either side of the day, would be really handy for me as a photographer. The number of times I've just been sat inside whilst an amazing sunset happens outside, and vice-versa where I've gone out to photograph some mountains and the sun goes behind the clouds just as the light starts, are numerous.

The biggest problem I found with weather forecasting is that most people want to know whether it's cloudy/raining overhead. I want to know if it's cloudy and raining somewhere near the horizon :D

delphidolphin•yesterday
Thank you so much. I guess Nightwatch does some of what you're looking for, and the Dark Skies page under the All Targets button does offer alternative sites within driving distance. What I'd not thought of until I read your feedback is perhaps a function that looks for the nearest site with better conditions automatically - that might be my next feature!
NKosmatos•yesterday
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 :-)
delphidolphin•yesterday
Thank you - the Dwarf Mini actually rekindled this hobby for me. Since developing Nightwatch I realised there's actually a lot more accessible apps out there than I realised. I'm not sure which direction to go with it yet, as the clear skies notification was my immediate use case. If people like it I'll definitely look at building out a roadmap.
axismundi•yesterday
while we're at it, what gear would you recommend for a beginner stargazer?
leetrout•yesterday
This question has a ton of varied answers across the internet. The best bang for your buck is a good set of binoculars and a tripod for them. It's really neat how much you can see with just those... clearing up fuzzy spots with naked eyes by revealing clusters of stars.

From there, if you have found out that you enjoy being outside using the binoculars, can see what you expected... then buy a compact scope

see https://telescopicwatch.com/different-types-of-telescopes/

I have two sets of cheap (<$100) binoculars, a cheap refractor from amazon (gskyer, $300), a very nice celestron c8 and a small meade MCT. I bought them in that order as I developed my interests. I use two different eye pieces, both plossals, one with about an inch of eye relief with no eyecup and one with a bit less relief and an eyecup. I use the binoculars more than all the others combined and if I were starting over I would buy a really nice set with a tripod.

For planets and nebulae I use the c8 with an equitorial mount. This is _fantastic_ for general objects in the night sky since once it's aligned it's a single knob to turn to keep up with things as the earth is rotating. For the moon and large planets and tracking things like space craft launching or starlink sats I use the refractor with the standard azimuth tripod. It makes it very easy to manually "point and shoot" objects with irregular travel paths.

So yea... go buy some binoculars.

delphidolphin•yesterday
Nightwatch has a dedicated eyes & binoculars target page for people who are getting into the hobby. Though as leetrout mentions you really need a tripod or mount to get the best results.
germinalphrase•yesterday
Cloudynights is another good forum for optics discussions and reviews
delphidolphin•yesterday
I'm using a Dwarf Mini - here in the UK Amazon currently has them on sale at 24% off as part of the Prime Deal Days.
misnome•yesterday
If you are interested in smart scopes and don’t mind missing direct observation, the Seestars or Dwarf 3 mini are getting pretty affordable (I borrowed a Dwarf to observe the solar eclipse - it came with solar filter - and playing around with it at night was very happy and got me into the hobby pretty deep so far…)
asasidh•yesterday
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.
delphidolphin•yesterday
I think you may be right in the fact that personal agents will probably take over these types of use cases. Nightwatch was a bit of a labour of love for me to tackle a simple need because clear nights in the UK are a bit of a luxury!