Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/partofthething/ha_skyfield

See the apparent positions of the Sun, Moon, and planets in this home assistant custom component
https://github.com/partofthething/ha_skyfield

astronomy custom-components homeassistant solar solar-system

Last synced: about 2 months ago
JSON representation

See the apparent positions of the Sun, Moon, and planets in this home assistant custom component

Awesome Lists containing this project

README

        

# Live Sun, Moon, and Planets for Home Assistant

[![hacs_badge](https://img.shields.io/badge/HACS-Custom-orange.svg)](https://github.com/partofthething/ha_skyfield)

This is a custom component for [Home Assistant ](https://www.home-assistant.io/)
that makes a live polar sun path chart for your location. Besides the Sun, it
also shows the Moon and a few major planets. Plus, it shows the Winter and Summer solstice sun paths so you can see where you are in the seasons!

![Screenshot of the skyfield](screenshot.png)

This uses the [skyfield library](https://rhodesmill.org/skyfield/) to do the computations.

To use:

* Install this in your `custom_components` folder
* Download the prerequisites: `pip3 install skyfield matplotlib numpy` (no longer
necessary with hassio!)
* Add the following to your home assistant config:
```yaml
camera:
platform: ha_skyfield
show_constellations: false
```
* Add a picture entity to your GUI with this camera. It will update live.

Optional configuration:

* `show_time` add a timestamp to the plot
* `show_legend` add a legend of the bodies
* `show_constellations` enable or disable the constellations (default is True).
* `planet_list` customize which planets are shown
* `constellations_list` customize which constellations are shown (use names from
[here](https://github.com/partofthething/ha_skyfield/blob/master/custom_components/ha_skyfield/constellations_by_RA_Dec.dat))
* `north_up` (boolean) puts North at the top (useful in the Southern Hemisphere)
* `horizontal_flip` (boolean) flips projection horizontally
* `image_type` (string) Optional - provide image format extension. Tested options are `png` (default) and `jpg`.

Known Issues:

* WARNING: High CPU usage! The underlying library is relatively long-running. Disable or
limit constellations if you're using a smaller computer, like a Raspberry Pi. Even with
them off, the CPU load may unacceptable. Options and more
discussion in [#4](https://github.com/partofthething/ha_skyfield/issues/4)

* Does not follow Theme because of matplotlib backend (see
[#5](https://github.com/partofthething/ha_skyfield/issues/4)

* More (maybe) at [Issues](https://github.com/partofthething/ha_skyfield/issues)

Inspiration comes from the University of Oregon
[Solar Radiation Monitoring Lab](http://solardat.uoregon.edu/PolarSunChartProgram.html).