What I made

AlarmPi 1.0 is out. It is a headless alarm clock for a Raspberry Pi. You drive it from a CLI or from a Tailwind web page on your LAN. The code is at https://github.com/kleinpanic/alarm-pi.

A daemon rings the alarm. You can dismiss or snooze it from your phone browser, from the terminal or from a Tkinter popup on the Pi itself. Snooze survives a restart.

There is also an irritable mode. It raises the volume every minute.

How it works

It is Python 3.10 or newer with Flask. One daemon runs the scheduler loop and the web server, and they share one thread-safe state object. Sound plays through mpv, and the volume is set with amixer.

The config is JSON. Writes are atomic and file-locked, and the daemon hot-reloads the file. You can set an optional PIN for LAN access. Requests from the Pi itself skip the PIN. There is also a JSON API.

Install

You need mpv and alsa-utils from apt. Then:

git clone https://github.com/kleinpanic/alarm-pi.git
cd alarm-pi
python3 -m venv .venv
.venv/bin/pip install -e .

Copy the example configs, then run .venv/bin/alarm install. Turn on the service with this:

systemctl --user enable --now alarm-daemon.service

What is not done

I did not tag this release. The version is in the CHANGELOG as 1.0.0 with today's date.

If your alarm does not ring, tell me.

P.S. Thanks for reading. Consider subbing to the RSS feed.
Klein Panic