Commit Graph
29 Commits
Author SHA1 Message Date
rzuastiandClaude Opus 4.8 be2a8fce58 Make [notifications.pushover] optional for non-pushover methods
The pushover config section is now only required when notifications.method
is "pushover". Validation at startup rejects the missing-section case so a
misconfiguration fails fast instead of erroring on every notification.

Updates the sample TOML, README and nix module for consistency.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 17:45:02 -04:00
rzuasti 38946d3abe Make optional config fields fall back to defaults
Several settings were required at parse time even though they had a
sensible default, causing the backend to panic on startup when omitted:

- notifications.notify_when_not_seen_for now defaults to "1w"
- the whole [networking] section is now optional (no mandatory fields)
- scanner duration/timeout fields (ARP, mDNS, SSDP, SNMP) now fall back
  to their defaults when the section is present but the field is omitted.
  serde only applies a field default when marked #[serde(default)], so
  the per-field attributes were added and the Default impls now share the
  same default functions as the single source of truth.

Updates the sample TOML and README accordingly and adds tests covering
each defaulting case.
2026-06-04 09:02:36 -04:00
rzuastiandClaude Opus 4.8 c3acd29e97 Rework storage considerations for default multi-scanner config
Recompute the storage estimates around the deduplication window as the
governing cap across all four default-enabled scanners (ARP, mDNS, SSDP,
DHCP), using the documented defaults rather than the old single-ARP
720-scans/day worst case. Present typical (not worst-case) figures, add a
per-scanner event breakdown, rework the tuning levers around retention and
disabling scanners, and note that the SNMP scanner is disabled by default
and excluded from the figures.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 18:54:43 -04:00
rzuastiandClaude Opus 4.8 bee492b703 Default web_server.ip_address and port
Fall back to "0.0.0.0" and 3000 when these fields are omitted from the
[web_server] section (api_key remains required). Update the sample TOML
and README to reflect the new defaults; the Nix module already used them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 18:33:35 -04:00
rzuastiandClaude Opus 4.8 0393378d24 Default log.level to "warn"
Make the [log] section and its level field optional, falling back to
"warn" when omitted. Update the sample TOML, Nix module and README to
reflect the new default.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 18:05:59 -04:00
rzuastiandClaude Opus 4.8 920279e9b3 Document actual config defaults in the options table
Replace the README config table's "Sample value" column with
"Default value" reflecting the real defaults from settings.rs:
mark options with no built-in default as Required and list the
code defaults for the scanners, retention and deduplication.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 17:50:52 -04:00
rzuastiandClaude Opus 4.8 5872fcf8db Restructure README into a getting-started-first layout
Reorganize into What is OOTT?, Getting started (Docker + mobile apps),
Deeper dive (Nix flake, config options, HTTPS), and Things to keep in
mind (storage, privileges/ports). Inline a minimal oott.toml and the
compose file in the Docker quickstart, and document the missing
web_server.* options.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 17:37:10 -04:00
rzuastiandClaude Opus 4.8 dd089a9cbc Deduplicate device_events within a time window
When the same scanner sees the same device (same MAC and IPv4) again within
a configurable window (default 1 minute), only one device_events row is
recorded, keeping the events table from filling with near-identical rows.
Device last_seen updates and notifications are unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 16:11:27 -04:00
rzuastiandClaude Opus 4.8 38158a4ffc Give the ARP scanner code defaults and make its config section optional
Add an ArpScanner Default impl (30m/1m/10m, enabled) and mark the
arp_scanner field with serde default, so the [arp_scanner] section can
now be omitted entirely and fall back to code defaults — matching the
pattern used by the SNMP scanner. Previously these three durations were
mandatory and the backend would not start without them.

Reconcile the documentation to the canonical 30m/1m/10m: fix the README
NixOS example (was 15m/20m/30m) and options table (was 15m), and note
that the section is optional in both the README and sample TOML. The
NixOS module and sample TOML already used these values.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 08:31:17 -04:00
rzuastiandClaude Opus 4.8 b283699b3c Set SNMP scanner default timings to 10m/5s
A typical router keeps active devices' ARP entries fresh continuously,
so a 10-minute poll interval stays well within common ARP cache TTLs
while keeping device-event churn modest (each poll records a DeviceSeen
event per device). A 5s per-request timeout adds margin for a busy
agent or large ARP table at no cost on the happy path.

Updates the default in settings.rs and the sample TOML, README and
NixOS module. TODO timing-review item narrowed to the ARP scanner.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 08:23:20 -04:00
rzuastiandClaude Opus 4.8 2987f66363 Add SNMP scanner that polls a gateway's ARP table
Introduce a sixth scanner that periodically queries an SNMP agent
(typically the router/firewall) for its ARP/neighbour cache via
SNMPv2c and feeds discovered devices into the shared devices, events
and notifications pipeline. Unlike the ARP scanner it generates no
traffic on the local segment and can surface devices across all
subnets the agent routes.

Scope is intentionally minimal: SNMPv2c only, a single target, and the
ipNetToMediaTable (ARP) only. SNMPv3 and switch MAC/forwarding-table
polling are left as follow-ups in TODO.md.

- backend: csnmp dependency; SnmpScanner config (opt-in, off unless a
  [snmp_scanner] section is present); DeviceEventScanner::Snmp;
  scanners/snmp/{finder,scanner,status}; main.rs wiring; status API
  endpoint wired into OpenAPI
- frontend: SNMP scanner status model, card, API method, status screen
  and summary card rows, and device-event label
- docs/config: sample TOML, README options, NixOS module option, and
  setup notes for enabling SNMP on pfSense/OPNsense

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 08:03:20 -04:00
rzuastiandClaude Opus 4.8 a90bcc360d Document backend connection options and allow iOS local networking
Add NSAllowsLocalNetworking ATS exception so the iOS app can reach a
backend over HTTP on the local network, and document the supported
connection paths (direct private-IP HTTP vs. reverse proxy with HTTPS)
in the README.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 19:38:43 -04:00
rzuastiandClaude Opus 4.8 08ee4fc0ea Add per-scanner enable/disable configuration
Each scanner (ARP, mDNS, SSDP/UPnP, DHCP) can now be turned off via an
`enabled` flag in its config section, defaulting to true so existing
deployments are unchanged. A disabled scanner's entry function returns
early and never starts.

Documented in the README options table (also fixing the stale `timings.*`
key names to the actual `arp_scanner.*` keys), and added to the TOML
samples and the NixOS module.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 19:00:56 -04:00
rzuastiandClaude Opus 4.8 189b79233b Add passive DHCP-snooping scanner
Listen for DHCP DISCOVER/REQUEST broadcasts on UDP 67 to catch devices as
early as possible — a device must request an address before doing almost
anything else, often before it has an IP.

Follows the mDNS/SSDP scanner pattern (finder/scanner/status modules) and
feeds the shared devices/events/notifications pipeline. The client MAC is
taken directly from the packet's chaddr, so no ARP probe is needed; a
DISCOVER with no assigned IP reuses any previously recorded address rather
than clobbering it. Exposes GET /api/dhcp_scanner/status, wired into the
OpenAPI generation, and adds a Dhcp variant to DeviceEventScanner.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 18:34:02 -04:00
rzuastiandClaude Opus 4.8 e8159f2b40 Document scanner network ports in README
Add a Network ports section noting that the mDNS (UDP 5353) and SSDP
(UDP 1900) ports are fixed by their protocols and must be available on
the host, alongside the configurable web server port.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 18:02:07 -04:00
rzuastiandClaude Sonnet 4.6 2077f970f9 Update README to reflect optional networking.interface config
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 07:36:31 -04:00
rzuastiandClaude Sonnet 4.6 60dbf56327 Add AGPL v3 license
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 17:00:26 -04:00
rzuastiandClaude Sonnet 4.6 22d30a146c Document retention.window parameter and add storage sizing guidance
Adds the retention.window option to the NixOS module and documents it
in the README alongside a new Storage considerations section covering
per-network-size estimates and guidance on tuning scan timings and the
retention window to meet storage requirements.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 09:18:46 -04:00
rzuasti f72bf06801 Update README.md 2026-01-28 13:54:52 -05:00
rzuasti 62e753b4f1 Update README.md 2026-01-28 13:54:06 -05:00
rzuasti ef8fbbde5b Update README.md 2026-01-28 13:53:45 -05:00
rzuasti 36353f7e40 Update README.md 2026-01-28 13:52:43 -05:00
rzuasti 0f0a8fdfdb Update README.md 2026-01-28 13:48:04 -05:00
rzuasti 787a723316 Update README.md 2026-01-28 13:45:37 -05:00
rzuasti 344711bad8 Update README.md 2026-01-27 18:43:51 -05:00
rzuasti 40a0269fdb Update README.md 2026-01-27 18:38:09 -05:00
rzuasti 111dd2a0fb Update README.md 2026-01-27 18:29:47 -05:00
rzuasti 732c9222b3 Update README.md 2026-01-27 18:27:17 -05:00
Ricardo Zuasti c4984c4ed2 First commit 2026-01-13 07:57:47 -05:00