Fixing Lens Flare on My Allsky Camera

In my last post I'd just about finished building my allsky camera and was itching to get it outside. Now that it's in its new spot and pointed at an actual sky, the first real-world problem has made itself known: lens flare.
Because the fisheye lens takes in the entire sky, it also takes in everything near the horizon, and that includes the streetlights and the lights from neighbouring houses. Any bright light hitting the lens from off to the side bounces around inside it and shows up in the image as ugly flares and blooms of stray light, washing out the part of the sky I actually care about.
You can see it clearly in one of the camera's own frames. Look at the warm orange blooms smeared across the lower half - all thrown by streetlights sitting just out of shot:

The fix is the same idea as a lens hood on a regular camera: block the light coming in from the sides before it ever reaches the glass. So today I designed and 3D printed a small baffle that sits around the lens and shades it from those low, off-axis lights.

There's a trade-off — the baffle trims a little off the edges of the field of view. But honestly, that's no great loss. The very edge of an allsky frame is mostly houses and trees on the horizon anyway, and the fisheye distortion out there is so extreme that it's not good for much. Sacrificing a sliver of that to clean up the rest of the frame is an easy call.
And it worked better than I expected. Here's the sky the next night with the baffle fitted:

The flares are gone completely, and to my eye the sky even looks a touch clearer and higher in contrast now that all that scattered light isn't bleeding into the image.
It's a small thing, but this is exactly why I wanted to build the camera myself: when something isn't quite right, I can just model a part, print it, and bolt on a solution the same afternoon. More fixes and tweaks to come, I'm sure.