Skip to main content

sitemon

CI Release PyPI Python License Platform

Find out a repeater site is in trouble before someone keys up and nothing answers.

sitemon is a small agent for the Raspberry Pi at each repeater or AllStar site, plus a hub that watches all of them. The agent watches supply voltage and current, temperature and humidity, the door, AllStar node state and the local AREDN node. The hub alerts people (Discord, ntfy, email) and shows every site on one page. It keeps working over flaky links: readings queue at the site and catch up when any path returns.

$ sitemon demo
Dashboard: http://127.0.0.1:8470  (data in /tmp/sitemon-demo-1a2b; Ctrl+C to stop)

Features

  • Power: battery, solar and PSU rails via INA226 (or INA219 for lower voltage).
  • Environment: temperature, humidity and pressure via BME280.
  • Door and water: any reed switch or float switch on a GPIO pin.
  • AllStar: keyed state, linked nodes and uptime over AMI, on localhost only, with an AMI user that can query status and nothing else. Registration status is an opt-in extra.
  • AREDN: node reachability, firmware, links and RF links from the local node.
  • Rules: thresholds with hysteresis, slow trends ("battery fell 0.3 V in a week"), state changes, sensor faults, and silent sites.
  • Alerts: one message when something breaks, one when it escalates, one when it's fixed. Queued and retried when the hub's internet path is down.
  • Dashboard: a tile per site with sparklines, a plain-language status, a page per site with 7-day charts and alert history, and CSV export for every sensor. Weekly summary to Discord.
  • Built for transmitter sites: I2C error recovery, chips re-initialised after RF-induced resets, systemd watchdog, batched writes to spare the SD card.

Install

On each site's Pi (ASL3 / Raspberry Pi OS bookworm ship Python 3.11):

python3 -m venv /opt/sitemon
/opt/sitemon/bin/pip install "sitemon[pi]"

On the hub (any Linux box on the mesh, or a small VPS):

python3 -m venv /opt/sitemon
/opt/sitemon/bin/pip install sitemon

deploy/README.md has the full walk-through: wiring, the AMI user, systemd units and a read-only root. Public hub deployments sit behind Anubis to keep AI scrapers off; see deploy/hub/.

Usage

  1. On the site, make its signing key and note the public key it prints:

    sitemon keygen --out /etc/sitemon/site.key
    
  2. Add the site and its public key to the hub config, and point the agent at the hub (examples in deploy/).

  3. Check both configs, then start the services:

    sitemon check /etc/sitemon/agent.toml
    systemctl enable --now sitemon-agent
    

Each site also serves a small status page on 127.0.0.1:8471 for whoever is standing in the shack.

Configuration

File Where
Agent /etc/sitemon/agent.toml (example)
Hub /etc/sitemon/hub.toml (example)
Site key /etc/sitemon/site.key (0600, made by sitemon keygen)

Secrets never go in the TOML: the AMI password, webhook URLs and SMTP password are read from an environment variable (*_env) or a file (*_file), so a config can be pasted into a bug report as-is.

# hub.toml (excerpt)
[[rules]]
name = "Battery low"
metric = "batt.v"          # <sensor name>.<value>
below = 12.2               # warn
critical_below = 11.8
hysteresis = 0.1           # stays open until 12.3 V, so it doesn't flap
hold = "2m"                # must stay low 2 minutes; a key-up sag never alerts
unit = "V"

[[rules]]
name = "Battery falling"
type = "rate"
metric = "batt.v"
window = "7d"              # compare with a week ago...
smooth = "1d"              # ...using daily averages, so the solar cycle cancels out
drop = 0.3
unit = "V"

How is this different from Allmon3 or a PacketFlux SiteMonitor?

Allmon3 / Supermon PacketFlux / NetGuardian sitemon
AllStar link and keyed state ✅ ❌ ✅
Site power, temperature, door ❌ ✅ ✅
Every site on one page ❌ via your NMS ✅
Alerts when a site goes silent ❌ via your NMS ✅
Keeps readings through a link outage ❌ ❌ ✅
Cost per site, excluding the Pi free $130+ about $40-80 in parts

sitemon doesn't replace Allmon3; run both. It reads AMI the same way, read-only.

What it will not do

  • Control the repeater. sitemon is a monitor. Relay outputs (remote reboot, planned) will be signed, time-limited and watchdogged, and won't be offered over amateur RF links without a proper auxiliary station (47 CFR 97.213).
  • Encrypt data over the mesh. Part 97 doesn't allow it. Everything is signed instead, so the hub can tell a real reading from a forged one.
  • Measure RF power precisely. Forward and reflected trend alarms are planned; calibrated absolute power is not.

How it works

[site]  sensors --I2C/GPIO--> Pi: sitemon agent <--AMI 127.0.0.1-- Asterisk (app_rpt)
                                  |  <--HTTP-- AREDN node /a/sysinfo
                                  |  signed events, SQLite queue
[path]  AREDN mesh / cellular / internet: every configured hub gets every event
[hub]   verify signatures -> rules -> alerts (Discord, ntfy, email) -> dashboard
  • Every event is signed (Ed25519) and numbered with a per-site counter that never repeats, even after a power cut. The hub stores each number once, so a retried upload is harmless.
  • Time without a trusted clock: each event carries the agent's monotonic clock as well as its wall clock. The hub learns the offset from each upload and places events by that, so a Pi that boots without NTP after an outage still files its readings at the right time.
  • Store-and-forward: the agent keeps each event until every configured hub (say, one on the mesh and one on the internet) confirms it has it, backing off separately for each while its path is down.
  • Silence is an alarm: the hub raises it from its own clock, because a dead site can't report itself.

Building from source

git clone https://github.com/Londopy/sitemon
cd sitemon
python -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"
pytest && ruff check . && mypy sitemon

No hardware needed: the tests use simulated sensors and a fake AMI server.

Layout

sitemon/
  _events.py        # events, Ed25519 signing, upload envelope
  config.py         # agent and hub TOML
  agent/
    runtime.py      # sampling loops, heartbeat, sync, local status page
    store.py        # SQLite event queue, never-repeating sequence numbers
    ami.py          # read-only AMI client (loopback only)
    aredn.py        # AREDN sysinfo
    sensors/        # INA226/219, BME280, GPIO, I2C recovery, simulated sensors
  hub/
    ingest.py       # signature checks, de-duplication, time placement
    rules.py        # thresholds, trends, states, faults, silence
    alerts.py       # de-duplication, escalation, outbox
    channels.py     # Discord, ntfy, email
    server.py       # HTTP API, dashboard, CSV, background loops
    static/         # dashboard (plain HTML/JS/CSS)
deploy/             # example configs, systemd units, hub Docker + Anubis
tests/

Contributing

See CONTRIBUTING.md. The short version: it's a monitor, not a controller.

License

MIT — see LICENSE.

Metadata

Release files for sitemon 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sitemon 0.1.0
File Size Uploaded Provenance Actions
sitemon-0.1.0.tar.gz 95.1 kB With provenance Details for sitemon-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sitemon 0.1.0
File Interpreter ABI Platform Actions
sitemon-0.1.0-py3-none-any.whl Python 3 none any Details for sitemon-0.1.0-py3-none-any.whl

Total release size: 166.0 kB

Release files / sitemon-0.1.0.tar.gz

Download URL sitemon-0.1.0.tar.gz
Size 95.1 kB
Tags Source
SHA-256 checksum
How to use checksums
69c7e73c4e09e0660c72aa3f8a6ab60074d626814dcdd4e9c05a8ed18a264cb9
BLAKE2b-256 checksum
How to use checksums
5ea3e59e95ba5e0b2103ca3be42a2a94ad96a06b42664ff1b0b57df9f394cd71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / sitemon-0.1.0-py3-none-any.whl

Download URL sitemon-0.1.0-py3-none-any.whl
Size 70.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8874059876d6ecac81ef5dec42b29a0bdb784b26a7cd77dbed32db1fec59a83
BLAKE2b-256 checksum
How to use checksums
cda35f33015dbe7cc9cffe3dea303c030d9b66a579221fbe287ca9e856937469
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Security for sitemon 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sitemon-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page