A Python app that continuously polls your home WiFi and network uptime, logs any downtime, and serves a live status dashboard in your browser. The dashboard can be accessed by any device on the same network.
Project description
Heimdall Network Watcher
A Python app that continuously polls your home WiFi and network uptime, logs any downtime, and serves a live status dashboard in your browser. The dashboard can be accessed by any device on the same network.
Features
- Continuous monitoring - Pings a configurable target (default:
8.8.8.8) at a set interval - Downtime logging - Records each outage with start and end time in SQLite
- Live dashboard - Web UI showing current status, 24h uptime %, and recent downtime events
- Cross-platform - Uses the system
pingcommand (Windows and Unix)
Install with pip
Install from PyPI:
pip install heimdall-network-monitor
python -m heimdall
Install from local source:
pip install .
python -m heimdall
Quick start
Project structure:
heimdall/
pyproject.toml
README.md
src/
heimdall/
__main__.py
app.py
config.py
database.py
monitor.py
templates/
dashboard.html
static/
style.css
logo.png
-
Create a virtual environment and install dependencies
python -m venv .venv .venv\Scripts\activate # Windows # source .venv/bin/activate # macOS/Linux pip install -e .
pip install -e .installs this project in editable mode so local source changes are picked up without reinstalling. -
Run the app
python -m heimdall
-
Open the dashboard
In your browser go to: http://localhost:9000 On the same WiFi, other devices can use http://:9000 (for example,
http://192.168.1.42:9000).
The monitor runs in the background and the dashboard auto-refreshes every few seconds.
Configuration
Environment variables (optional):
| Variable | Description | Default |
|---|---|---|
HEIMDALL_PING_TARGET |
Host to ping (IP or hostname) | 8.8.8.8 |
HEIMDALL_POLL_INTERVAL |
Seconds between checks | 10 |
HEIMDALL_PING_TIMEOUT |
Ping timeout in seconds | 5 |
HEIMDALL_DB |
SQLite database path | heimdall.db |
HEIMDALL_HOST |
Flask bind address | 0.0.0.0 |
HEIMDALL_PORT |
Flask port | 9000 |
Example: Monitor your router and check every 5 seconds:
set HEIMDALL_PING_TARGET=8.8.8.8
set HEIMDALL_POLL_INTERVAL=5
python -m heimdall
On Linux/macOS use export HEIMDALL_PING_TARGET=192.168.1.1 etc.
API
GET /- Dashboard (HTML)GET /api/status- Current status (up/down, last check, current downtime)GET /api/stats- 24h uptime % and sample countGET /api/downtimes- Recent downtime intervals
Requirements
- Python 3.8+
- Flask (see
requirements.txt)
No special permissions needed; uses standard ping and a local SQLite file.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file heimdall_network_monitor-0.2.4.tar.gz.
File metadata
- Download URL: heimdall_network_monitor-0.2.4.tar.gz
- Upload date:
- Size: 127.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4adc2c9e8c04d1f160d8d5f4fe26078edd876f13701e712caad106495e92ba47
|
|
| MD5 |
5cae1d0bbd02eb63bdc013d862fc07c1
|
|
| BLAKE2b-256 |
d85af23cb364a5d596092de944d10aff1ec77820a2c4481959259b268ae87147
|
Provenance
The following attestation bundles were made for heimdall_network_monitor-0.2.4.tar.gz:
Publisher:
python-publish.yml on vishnuupanickar/heimdall
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
heimdall_network_monitor-0.2.4.tar.gz -
Subject digest:
4adc2c9e8c04d1f160d8d5f4fe26078edd876f13701e712caad106495e92ba47 - Sigstore transparency entry: 947287494
- Sigstore integration time:
-
Permalink:
vishnuupanickar/heimdall@f2b256e139bddafc9d765fd3f4d91550fd9a5c81 -
Branch / Tag:
refs/tags/v0.2.4 - Owner: https://github.com/vishnuupanickar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@f2b256e139bddafc9d765fd3f4d91550fd9a5c81 -
Trigger Event:
release
-
Statement type:
File details
Details for the file heimdall_network_monitor-0.2.4-py3-none-any.whl.
File metadata
- Download URL: heimdall_network_monitor-0.2.4-py3-none-any.whl
- Upload date:
- Size: 126.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbaf4c1426763eca1f23fd727b98a497e712c0eb2d62ae83b75bac1db5c2c1f0
|
|
| MD5 |
210b868b07af1e50c2e4359a76c6e310
|
|
| BLAKE2b-256 |
c7c990c06685568df6dec0c0e603b9c348b3f4cc3b74cc75510034ff8c24c85d
|
Provenance
The following attestation bundles were made for heimdall_network_monitor-0.2.4-py3-none-any.whl:
Publisher:
python-publish.yml on vishnuupanickar/heimdall
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
heimdall_network_monitor-0.2.4-py3-none-any.whl -
Subject digest:
dbaf4c1426763eca1f23fd727b98a497e712c0eb2d62ae83b75bac1db5c2c1f0 - Sigstore transparency entry: 947287496
- Sigstore integration time:
-
Permalink:
vishnuupanickar/heimdall@f2b256e139bddafc9d765fd3f4d91550fd9a5c81 -
Branch / Tag:
refs/tags/v0.2.4 - Owner: https://github.com/vishnuupanickar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@f2b256e139bddafc9d765fd3f4d91550fd9a5c81 -
Trigger Event:
release
-
Statement type: