Astronomical events sensor

With the introduction of ISS sensor, it gives me the idea of having similar sensor for other astronomical events such as moon phase, meteor showers, lunar/solar eclipse, comets, etc…

I hope it will be implemented in future.

1 Like

NASA is providing some information.

1 Like

Another possible source:

http://www.swpc.noaa.gov/communities/space-weather-enthusiasts

This one looks most promising: https://in-the-sky.org/newscal.php?month=8&year=2017&maxdiff=1&country=1752&reg1=2685867&reg2=2694759&town=2694762. No API though.

NASA has a similar calendar: https://eclipse.gsfc.nasa.gov/SKYCAL/SKYCAL.html, but it lacks the links and nice explanations that the first link has.

I have currently iframed the in-the-sky calendar in Home Assistant, but obviously a dedicated api-based component would be infinitely more amazing.

1 Like

I am using PyEphem for some of that.

http://rhodesmill.org/pyephem/quick.html

It does a lot of what you ask, but not the rest of it (comets, eclipses, …etc).

Here is sample of the output

$ python3 astroclock.py
Latitude: [deleted], Longitude: [deleted]
Date and Time: 05-09 12:48
Sun Rise: 06:03, Noon: 13:18, Set: 20:33
Sun Constellation: Aries
Civil: 21:06, Dark Start: 22:31, Dark End: 04:06
Moon Rise: 03:51, Transit: 09:28, Set: 14:10
Moon Constellation: Aquarius
New Moon: 05-15 07:47, FQ: 05-21 23:49, Full: 05-29 10:19, LQ: 06-06 14:31

Comets can, in principle, be done using the published orbital data (e.g. downloaded once a day), and computed.

Here is the data

https://www.minorplanetcenter.net/iau/info/CometOrbitFormat.html

Currently it is a simple Python command line program, but can be converted to a Home Assistant Sensor that live in config_dir/custom_components/sensor/

There is also AstroPy, but it is heavier and there is also astroplan which is built on AstroPy, and is much more heavy. It takes a few seconds on a desktop computer just to ‘boot’ it, let alone use it.

I came across this recently

but you have to pay for it after 3 months.

Has any more ever come of this? In the sky still doesn’t appear to be an API just that same old RSS feed.

@kbahey - Did you ever build a custom component?

Where is the source for astroclock.py?

No, it never developed to a component for Home Assistant, due to many reasons.

One of them is that I am really disappointed with Home Assistant because now the developers forces the users to use Python 3.8 without a clear reason, and that makes the venv I have obsolete, and I need to rebuild Home Assistant from scratch. Note that 3.8 is not available in the default repository of the stable Raspbian. It will be in the next version, but that is not out yet. It is really bad practice to force users into a corner like that.

The alternative is running a Docker container, and on my Raspbian, Docker cannot run at all (whether I install it from the repositories, or from Docker’s web site).

Back to the topic itself. I used the ephem import to create something similar, that will give me start and set times for the Sun and Moon, and gets the weather forecast from two sources. This is for planning astronomical observation. It can be expanded to do other stuff.

The code is not public, but I can share it with you provided that you share back your changes. Message me privately with your email if you want to.