No description
Find a file
2026-05-27 20:09:44 -07:00
hosts/noisebell-do feat: add noisebell observability 2026-05-27 20:09:44 -07:00
pi feat: add noisebell observability 2026-05-27 20:09:44 -07:00
remote feat: add noisebell observability 2026-05-27 20:09:44 -07:00
scripts feat: add noisebell observability 2026-05-27 20:09:44 -07:00
secrets feat: add digitalocean noisebell host 2026-05-21 12:06:10 -07:00
.envrc feat!: make declarative version 2026-03-22 17:40:48 -07:00
.gitignore feat!: make declarative version 2026-03-22 17:40:48 -07:00
Cargo.lock feat: add noisebell observability 2026-05-27 20:09:44 -07:00
Cargo.toml feat: add home assistant capability with pi-relay 2026-03-24 00:24:12 -07:00
flake.lock feat!: make declarative version 2026-03-22 17:40:48 -07:00
flake.nix feat: add digitalocean noisebell host 2026-05-21 12:06:10 -07:00
README.md feat: add noisebell observability 2026-05-27 20:09:44 -07:00
rustfmt.toml feat: add basic rss feat support 2026-03-23 13:56:00 -07:00

Noisebell

Space status

Monitors the door at Noisebridge and tells you whether it's open or closed.

A Raspberry Pi reads a magnetic sensor on the door and pushes state changes to a cache server. The cache keeps the latest state and fans updates out to chat integrations such as Discord and Zulip.

Pi (door sensor) ──webhook──> Cache ──webhook──> Discord / Zulip
                                |
                     polls Pi <-+
                                |
                                +──webhook──> Pi relay ──webhook──> Home Assistant

Layout

Directory What it is
pi/ Raspberry Pi OS base with laptop-built Noisebell deploy
remote/ Server-side services (cache, RSS, Discord, Zulip)
hosts/noisebell-do/ Standalone DigitalOcean NixOS host for the remote services
secrets/ Shared agenix-encrypted secrets and recipient rules

Each directory has its own README with setup and configuration details.

For hosted deployment, this repo exports nixosConfigurations.noisebell-do, a small DigitalOcean NixOS host that imports noisebell.nixosModules.default. The host provides deployment-specific values like domains and the Pi address, while the Noisebell module itself points agenix at the encrypted files in secrets/ and consumes the decrypted runtime files on the target machine.

Useful commands:

  • ./scripts/deploy-do [jet@noisebell-do] redeploys the DigitalOcean remote host
  • ./scripts/nhs redeploys the old Hetzner host using the local checkout as the flake input
  • scripts/deploy-pios-pi.sh pi@100.66.45.36 redeploys the Raspberry Pi OS machine

The full Home Assistant relay workflow is documented in pi/README.md.

Observability

The DigitalOcean host runs Prometheus, Loki, Grafana, Alloy, node_exporter, and blackbox_exporter via hosts/noisebell-do/observability.nix. Grafana provisions the Noisebell DO + Pi dashboard from code, with Prometheus panels for both hosts, detailed DO-to-Pi poll health, and Loki journal panels for both hosts.

  • Grafana: http://noisebell-do:3030/ over Tailscale
  • Prometheus: http://noisebell-do:9090/ over Tailscale
  • Loki: http://noisebell-do:3100/ over Tailscale

The Pi deploy script enables persistent journald, installs prometheus-node-exporter, and installs noisebell-loki-journal.service to ship Pi journal logs to Loki on the DO host.

Prometheus is the source of truth for regular time-based data: scrape health, host CPU/memory/disk/uptime, DO-to-Pi poll counts and last results, GPIO state, Pi hardware readings, webhook counters, and retry counters. Loki/journald is reserved for sparse event logs that should be readable in chronological order: service start/stop, door state changes, cache state changes, Pi offline/online transitions, auth or rate-limit rejections, webhook retries/failures, stale events, and GPIO read errors. Routine successful polls, unchanged poll results, metrics scrapes, and badge/image/status reads are intentionally not logged at INFO.