Skip to main content

Solunar smart home integration, free and open source

Solunar integration for Gladys Assistant

Solunar periods for fishing and hunting, computed locally: major, minor, day rating.

The solunar periods in Gladys, for fishing and hunting: the times of the day when fish and game are said to be most active, according to the theory John Alden Knight published in 1926. Everything is computed in the container from the position of the Moon and the Sun: no account, no key, no internet access.

What you get​

  • One device per place: each located house of Gladys, and up to three fishing spots typed in the configuration. Each device gives the period in progress (none, major or minor, and its end), a "period active" switch, the next period and the minutes left before it, the day rating from 0 to 4, the moon phase and its illumination.
  • A dashboard widget: the periods of the day for one place, with the one in progress in green, the day rating and the moon.
  • A scene trigger: a solunar period starts, filtered by place, kind (major or minor) and day rating.
  • A scene action: the periods, rating and moon of today or tomorrow at a place, in one sentence to send by message.

This integration gives the fishing periods. For the moon itself (phase, rise and set, lunar events), see the gladys-moon-phase widget: both work side by side.

Requirements​

  • Gladys Assistant 5.1.0 or later (widgets, scene triggers and actions).
  • A house located in Gladys (Settings → Houses), or the coordinates of a spot.

The integration is installed from GitHub: Integrations → Install from GitHub, address https://github.com/guim31/gladys-solunar.

Configuration​

SettingDefaultWhat it does
Language of the valuesFrenchLanguage of the feature names and of the texts sent to Gladys.
One device per located houseOnUses the coordinates of the houses set in Gladys.
Spot 1 to 3: nameemptyName of the device of the spot (renamable later in Gladys).
Spot 1 to 3: latitude, longitudeemptylatitude, longitude in decimal degrees, e.g. 43.6047, 1.4442.

Coordinates can be copied from any map (a right click in OpenStreetMap or Google Maps). A decimal comma works too: 43,6047; 1,4442. Empty the coordinates of a spot to remove it. Save, then create the devices in the Discover tab. The Check the places button lists every place with its day rating.

The house coordinates are read at startup, at every scan and every 6 hours: after moving a house, press Check the places.

Devices​

FeatureTypeExample
Solunar periodtextMajor until 18:40
Solunar period activebinary1 during any period
Next solunar periodtextMinor tomorrow at 05:10
Next period in (min)duration95
Day rating (0-4)number3
Moon phasetextWaxing gibbous
Moon illumination (%)number78

Times are those of the time zone of Gladys, a day runs from midnight to midnight. The values are computed every minute and only the changes are sent.

Dashboard widget​

Solunar periods: choose a place (the first one by default). It shows the day rating, the moon illumination, then each period of the day: past, in progress (green) or coming. A ☀ marks a period that meets a sunrise or a sunset. The Show the moon setting hides the moon tile and phase.

Scene trigger​

Solunar period started, when a major or minor period begins at a place. Filters: the place, the kind of period, the day rating. Variables: place, start, end, with_sun (the period meets a sunrise or a sunset) and summary, a ready-made sentence.

A restart of the integration in the middle of a period does not fire it again.

Scene action​

Get the solunar day: for a place and a day (today or tomorrow), returns summary (one sentence), rating, periods (the list with their times), moon_phase and illumination.

Scene examples​

  • Every evening at 8 pm, Get the solunar day for tomorrow at the lake, then send the summary by message: the outing is planned the day before.
  • Solunar period started, kind major, rating 3 or 4: a notification "the fish are biting".
  • Condition on Next period in (min) below 30 at the house: time to prepare the gear.

How it is computed​

  • Major periods, two hours: the Moon crosses the meridian overhead (upper transit) or underfoot (lower transit), centred on the transit.
  • Minor periods, one hour: moonrise and moonset, centred on the event.
  • A period is with the sun when a sunrise or a sunset falls within it or within 30 minutes of its edges.
  • Day rating, 0 to 4: 2 points within 1.5 days of a new or full moon (1 point within 3.5 days), plus 2 points when a major period meets the sun (1 when only a minor one does).

The Moon comes back about 50 minutes later every day: some days have only three periods (no moonrise, or one transit). Beyond the polar circles the Moon may stay up or down for days: only the major periods remain. The positions come from astronomy-engine (MIT): the times agree within one or two minutes with the US Naval Observatory tables.

Troubleshooting​

  • No device in the Discover tab: no house is located and no spot is filled. Locate a house in Settings → Houses or type the coordinates of a spot, then save.
  • "Unreadable coordinates" in the status: type latitude, longitude, latitude first, in decimal degrees (not degrees and minutes).
  • Times off by one hour: check the time zone of Gladys in its settings.
  • Logs: LOG_LEVEL=debug shows every computation.

Limits​

  • The solunar theory is a tradition of anglers and hunters, not a scientific forecast: weather, water and season matter as much.
  • The rating is the one described above; other tables (solunarforecast.com, apps) use their own scales and may differ.
  • The times of a spot are given in the time zone of Gladys, even for a spot in another time zone.
  • Three spots at most besides the houses.

Not affiliated with any solunar table publisher. Theory: John Alden Knight (1926). Computation: astronomy-engine by Don Cross (MIT).

Configuration settings​

These are the settings Solunar asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Solunar periodssectionNoComputed in the container from the position of the Moon, without account or internet: major periods (Moon overhead or underfoot, 2 h) and minor ones (moonrise and moonset, 1 h). One device per located house and per fishing spot: save, then create them in the Discover tab.
Language of the valuesselectNoNames of the features and texts sent to Gladys.
One device per located housebooleanNoUses the coordinates of the houses set in Gladys (Settings → Houses).
Fishing spotssectionNoUp to three more places: a name and the coordinates, "latitude, longitude" in decimal degrees (copy them from a map). Leave the coordinates empty to remove a spot.
Spot 1: namestringNo
Spot 1: latitude, longitudestringNo
Spot 2: namestringNo
Spot 2: latitude, longitudestringNo
Spot 3: namestringNo
Spot 3: latitude, longitudestringNo

How to install Solunar in Gladys​

  1. In Gladys, open Integrations: Solunar appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/guim31/gladys-solunar:1.0.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/guim31/gladys-solunar.

Solunar requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

Solunar is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by guim31, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂