Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
# Existing FRITZ!Box user. A dedicated account is optional, not required.
# Router integration mode: auto, generic, or fritz.
# auto = use FRITZ!Box enhanced diagnostics when credentials are present,
# otherwise run as a generic Linux Internet monitor.
LINEWATCH_ROUTER_MODE=auto

# Optional FRITZ!Box enhanced diagnostics (TR-064).
# Leave blank for generic mode. A dedicated FRITZ!Box account is optional.
FRITZ_USER=
FRITZ_PASSWORD=

# Leave empty to auto-detect the default IPv4 gateway.
# Optional FRITZ!Box IPv4 address. Leave blank to use the default gateway.
FRITZ_HOST=

# Raspberry Pi Ethernet is normally eth0.
LINEWATCH_INTERFACE=eth0
# Leave blank to auto-detect the interface from the Linux default route.
LINEWATCH_INTERFACE=

# Gateway ICMP classification: auto, on, or off.
# auto disables gateway-based outage classification when the router does not
# answer ping while the Internet is otherwise healthy.
LINEWATCH_GATEWAY_PROBE=auto

LINEWATCH_POLL_SECONDS=2
LINEWATCH_HEALTHY_PERSIST_SECONDS=30
Expand All @@ -17,3 +28,4 @@ LINEWATCH_RING_SECONDS=120
LINEWATCH_PING_TARGETS=1.1.1.1,8.8.8.8
LINEWATCH_DNS_NAME=www.cloudflare.com
LINEWATCH_HTTP_URL=https://connectivitycheck.gstatic.com/generate_204
LINEWATCH_PUBLIC_IP_URL=https://api.ipify.org
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug report
about: Report a reproducible LineWatch problem
title: "[Bug] "
labels: bug
---

## What happened?

Describe the problem and what you expected instead.

## Environment

- Linux distribution/version:
- Architecture (`x86_64`, `aarch64`, ...):
- Wired or wireless:
- `LINEWATCH_ROUTER_MODE`:
- Router model:
- FRITZ!OS version, if applicable:
- LineWatch version/commit:

## Reproduction steps

1.
2.
3.

## Relevant logs

Please remove credentials, public IP addresses and other private network data before posting logs.

```text
journalctl -u linewatch --since "10 minutes ago"
```
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/compatibility-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Compatibility report
about: Report a host/router combination that works or needs support
title: "Compatibility: "
labels: ""
assignees: ""
---

## Host

- OS/distribution:
- Architecture:
- Installation method:
- Ethernet or Wi-Fi:

## Router

- Vendor:
- Model:
- Firmware/version:
- Mode: generic / FRITZ!Box

## Result

- Basic Internet monitoring works: yes/no
- Gateway monitoring works: yes/no
- Router telemetry works: yes/no/not applicable
- Reboot detection works: yes/no/not applicable
- WAN/session reset detection works: yes/no/not applicable

## Notes

Please remove credentials, public IP addresses and private network data before posting logs or screenshots.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest an improvement or router integration
title: "[Feature] "
labels: enhancement
---

## Problem / use case

What problem would this solve?

## Proposed behavior

Describe the smallest useful version of the feature.

## Environment or router, if relevant

- Linux distribution:
- Router/vendor/model:
- Available local API or protocol (TR-064, ubus, SNMP, RouterOS API, etc.), if known:

## Notes

For new router integrations, prefer an adapter that keeps the generic monitoring core vendor-neutral.
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## What changed

Describe the problem and the smallest useful change.

## Validation

Describe the host/router combination and checks used to validate the change.

## Checklist

- [ ] I did not include credentials, public IP addresses or private network data.
- [ ] Generic monitoring still works without vendor-specific telemetry where applicable.
- [ ] User-facing changes are documented.
- [ ] Compatibility claims are limited to what was actually validated.
11 changes: 9 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:

jobs:
syntax:
test:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -15,4 +15,11 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: python -m py_compile monitor.py dashboard.py
- name: Install dependencies
run: python -m pip install -r requirements.txt
- name: Compile Python sources
run: python -m py_compile monitor.py dashboard.py
- name: Run unit tests
run: python -m unittest discover -s tests -v
- name: Check shell scripts
run: bash -n install.sh configure.sh run_monitor.sh run_dashboard.sh
13 changes: 13 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Authors

LineWatch was created by **Luca Serioli** ([@LucaXTech](https://github.com/LucaXTech)).

## Original author and maintainer

- Luca Serioli — project creator, original architecture and maintainer

## Contributors

Community contributions are welcome and remain attributed through the Git history and GitHub contributor graph.

LineWatch is released under the MIT License; see [LICENSE](LICENSE).
56 changes: 56 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Contributing to LineWatch

Thanks for helping improve LineWatch.

The project aims to keep a small, dependable generic Internet-monitoring core while adding deeper router diagnostics through optional adapters.

## Useful contributions

Especially useful contributions include:

- Linux distribution and hardware compatibility reports
- FRITZ!Box model / FRITZ!OS compatibility reports
- reproducible bug fixes
- unit and integration tests
- documentation improvements
- router adapters that preserve the vendor-neutral core

## Before opening a pull request

1. Open or reference an issue when the change is substantial.
2. Keep credentials, public IP addresses, event logs and other private network data out of commits.
3. Keep changes focused; avoid unrelated formatting or refactors in the same PR.
4. Run:

```bash
python -m unittest discover -s tests -v
python -m py_compile monitor.py dashboard.py
bash -n install.sh configure.sh run_monitor.sh run_dashboard.sh
```

5. Explain how the change was tested.

## Router integrations

New vendor integrations should not make the generic monitor depend on that vendor. Prefer an adapter boundary that exposes optional router/WAN telemetry to the existing classifier and dashboard.

Do not claim compatibility with hardware you have not tested or for which there is no reliable external report.

## Compatibility reports

Please include:

- Linux distribution and version
- CPU architecture
- wired or wireless connection
- router model
- router firmware, if relevant
- generic or enhanced mode
- LineWatch version/commit
- what worked and what failed

See [docs/TESTING.md](docs/TESTING.md) for the validation checklist.

## License

By contributing, you agree that your contribution will be distributed under the project's MIT License.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Luca Serioli

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading