Overview

Wildlife activity is governed by natural light cycles. Dawn choruses peak around sunrise, many mammals are most active during twilight, nocturnal species emerge after astronomical dusk, and amphibian behaviour often correlates with moon phase and illumination. Effective biodiversity monitoring must align with these rhythms.

dielty is a sunrise, sunset, twilight, moonrise, moonset, and moon phase calculator for headless Linux systems like the Raspberry Pi. It reads the device’s location from /etc/geolocation and computes solar and lunar events for any date — enabling monitoring nodes to schedule recordings, camera traps, and sensor captures around the precise light conditions at their deployment site.

Why It Matters

Fixed recording schedules waste power and storage by capturing silence during inactive periods, or miss peak activity by starting too late. With dielty, a node can begin acoustic recording at civil dawn, activate a camera trap at sunset, or trigger a burst capture at moonrise — adapting automatically as day length shifts through the seasons and across latitudes.

The included systemd timers run user scripts at sunrise and sunset automatically, making it straightforward to build event-driven monitoring workflows without cron hacks or manual recalculation.

Key Features

Quick Start

sudo apt install cmake g++ cd dielty mkdir build && cd build cmake .. make -j$(nproc) sudo make install

Example Usage

dielty # full report for today dielty sun sunrise # print sunrise time dielty wait civil-dawn # block until civil dawn dielty -d 2026-06-21 report # report for summer solstice dielty -json report # JSON output dielty -lat 51.5 -lon -0.1 # override location

Source Code

dielty is open source and available on GitHub.

dielty on GitHub →