Skip to content

v1.1: generic Linux monitoring with optional FRITZ!Box diagnostics - #1

Merged
LucaXTech merged 18 commits into
mainfrom
feature/generic-linux-v1.1-clean
Sep 5, 2026
Merged

v1.1: generic Linux monitoring with optional FRITZ!Box diagnostics#1
LucaXTech merged 18 commits into
mainfrom
feature/generic-linux-v1.1-clean

Conversation

@LucaXTech

@LucaXTech LucaXTech commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

This PR evolves LineWatch from a Raspberry-Pi/FRITZ!Box-specific monitor into a generic Linux Internet connection black box while preserving FRITZ!Box as the first enhanced router integration.

Generic Linux mode

  • runs without router credentials
  • auto-detects the IPv4 default gateway and interface
  • monitors link state, gateway reachability, Internet ICMP, DNS, HTTP, public IP, outages and downtime
  • avoids false outages when a gateway or upstream target intentionally drops ICMP
  • keeps ISP report and CSV export useful without router-specific telemetry

FRITZ!Box enhanced mode

When TR-064 credentials are configured, LineWatch keeps the existing deep diagnostics:

  • router model / FRITZ!OS
  • router uptime and reboot detection
  • WAN uptime / state
  • WAN or PPPoE session-reset detection
  • router event logs around incidents when available

User experience

  • installer now offers generic or FRITZ-enhanced setup
  • Raspberry Pi is a recommended always-on target rather than a hard requirement
  • dashboard adapts automatically to the available telemetry
  • README is repositioned around the connection-black-box use case

Open-source project hygiene

  • MIT License, copyright Luca Serioli
  • explicit creator/maintainer attribution
  • contribution and security guidance
  • compatibility, bug and feature-request templates
  • Linux validation checklist
  • expanded CI with unit tests and shell syntax checks

Validation

CI

  • GitHub Actions passes on Python 3.11 and 3.13
  • classifier and route-detection unit tests pass
  • shell scripts pass syntax checks
  • outage timestamp/duration regression coverage added after physical testing

WSL2 smoke test — passed

Validated on Windows WSL2 with Ubuntu 26.04 LTS x86_64 and Python 3.14.4:

  • 14/14 unit tests passed at the time of the WSL validation
  • generic setup and route/interface autodetection passed
  • gateway-ICMP fallback behaved correctly: the WSL virtual gateway did not answer ICMP while Internet/DNS/HTTP remained healthy, and no false outage was raised
  • dashboard, API, SQLite history and public-IP observation worked
  • full install.sh path worked
  • linewatch.service and linewatch-dashboard.service ran successfully under systemd/Waitress
  • services returned automatically after wsl --shutdown and a fresh WSL start
  • FRITZ!Box enhanced mode was re-checked over the real LAN using an explicitly configured router address; TR-064 returned model, FRITZ!OS, router uptime, WAN status/uptime, PPPoE metadata and reconnect timing with no regression observed

Physical Raspberry Pi validation — passed

Validated on an Ethernet-connected Raspberry Pi running Debian 13 (trixie) arm64:

  • shell-script executable permissions verified from a fresh branch checkout
  • generic mode auto-detected the physical eth0 interface and real IPv4 default gateway
  • gateway ICMP capability detection passed
  • FRITZ!Box enhanced mode passed against a real FRITZ!Box 5530 Fiber using TR-064, including model, FRITZ!OS, router uptime, WAN state/uptime and PPPoE telemetry
  • physical Ethernet unplug correctly produced NETWORK_LINK_DOWN, rather than a generic gateway/Internet outage
  • monitor survived loss of SSH/network connectivity and detected recovery after reconnect
  • post-recovery carrier, gateway, Internet, DNS and HTTP checks all returned healthy
  • physical testing exposed an outage-duration timing inconsistency; the monitor now uses a consistent cycle-time reference for event timestamps and monotonic duration measurement
  • regression suite increased to 15/15 passing tests
  • a second physical unplug after the fix produced a 20.00 s timestamp delta and 20.20 s stored duration (0.20 s difference, consistent with second-resolution timestamps versus sub-second monotonic timing)

No private credentials or public IP addresses are recorded here.

Physical Linux validation is complete for the supported generic Linux and FRITZ!Box-enhanced paths tested above. OpenWrt, UniFi, MikroTik and other router-specific adapters remain future work rather than claimed integrations.

@LucaXTech
LucaXTech marked this pull request as ready for review September 5, 2026 17:11
@LucaXTech
LucaXTech merged commit a79294a into main Sep 5, 2026
4 checks passed
@LucaXTech
LucaXTech deleted the feature/generic-linux-v1.1-clean branch September 5, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant