Skip to main content

Woninet

PyPI version Python License Downloads

A local network monitoring system.

Woninet continuously monitors devices on a local network using ARP and ICMP probes. It enumerates candidate IP addresses in a /24 subnet, determines device availability, measures latency, packet loss, and jitter, stores metrics in database, and evaluates configurable alert rules in real time.

Woninet dashboard

Table of Contents

Features

  • ARP + ICMP host detection. Distinguishes real devices from nonexistent IP addresses and filters out Wi-Fi ARP-delay noise.
  • Alert engine. Evaluates real-time alert rules, such as latency thresholds, against collected metrics.
  • Threaded collectors. Sends ICMP probes concurrently using a configurable number of worker threads.
  • SQLite storage. Persists devices, recorded metrics, alert states, and alert events.
  • Database access from the CLI. Accepts a positional argument for easier access to the database.
  • Detailed logging.

Requirements

  • Python 3.12 or later.
  • Elevated network privileges, because ARP and ICMP probing use raw sockets. On Linux, either of the following satisfies this requirement:
    • the cap_net_raw capability granted to the Python interpreter (recommended, see Installation), or
    • root privileges (discouraged for security reasons).

Quick Start

On Linux, the minimal path is:

python3 -m venv --copies venv
source venv/bin/activate
pip install woninet
sudo setcap cap_net_raw=eip venv/bin/python3
woninet --help

For Docker, macOS, Windows, and source installs, see Installation.

Installation

Option 1: Install from PyPI

Create and activate a virtual environment. The --copies flag forces Python to copy the interpreter instead of symlinking it, which is required because the capability is applied directly to the interpreter binary:

python3 -m venv --copies venv
source venv/bin/activate

Install Woninet:

pip install woninet

Grant the required capability to the Python interpreter:

sudo setcap cap_net_raw=eip venv/bin/python3

Run Woninet:

woninet --help

Linux (fallback: system ping)

If you do not grant the capability, Woninet falls back to the system ping command. Create the environment without --copies:

python3 -m venv venv
source venv/bin/activate
pip install woninet
woninet --help

macOS and Windows

pip install woninet
woninet --help

See Platform Notes for privilege considerations on these systems.

Option 2: Docker (Linux only)

Clone the repository and run:

chmod +x build_docker.sh
sudo ./build_docker.sh

The script runs docker compose up -d --build and prints the device's private IP address to standard output so you can open the web interface in a browser.

To open Woninet manually, type device's private IP address with the default 8080 port in the browser.

Option 3: Install from source

  1. Clone the repository:

    git clone https://github.com/teymuri-alireza/woninet
    cd woninet
    
  2. Create and activate a virtual environment outside the project directory to avoid Multiple top-level packages discovered in a flat-layout errors.

    Linux

    python3 -m venv --copies ../venv
    source ../venv/bin/activate
    

    Windows (PowerShell):

    py -m venv ..\venv
    ..\venv\Scripts\Activate.ps1
    
  3. Install Woninet locally:

    pip3 install .
    
  4. Grant raw-socket access and run.

    Linux: grant the capability to the virtual environment's interpreter, then run Woninet:

    sudo setcap cap_net_raw=eip ../venv/bin/python3
    woninet --version
    

    Running with sudo instead is possible but discouraged for security reasons:

    sudo ../venv/bin/python3 -m woninet
    

    macOS and Windows: run woninet --version after installation.

Configuration

Alert rules and monitoring settings are defined in a JSON file. Rename config.example.json to config.json; Woninet loads it at startup.

When installing from PyPI, config.example.json is not included, so Woninet creates a config.json file with default values.

To use a different configuration file, pass its path with the --config CLI flag.

Example

{
    "monitoring": {
        "arp_noise_limit": 300.0,
        "max_workers": 4
    },
    "database": "woninet.db",
    "target_ip_list": [
        "192.168.1.1", "192.168.1.10", "192.168.1.20-30"
    ],
    "alert_rules": [
        {
            "metric": "latency",
            "threshold": 100,
            "consecutive_checks": 3
        },
        {
            "metric": "packet_loss",
            "threshold": 0.0,
            "consecutive_checks": 1
        },
        {
            "metric": "jitter",
            "threshold": 40.0,
            "consecutive_checks": 3
        }
    ]
}

Settings reference

Monitoring

Key Description
arp_noise_limit Latency threshold in milliseconds used to filter ARP resolution noise. Set to 0 to disable filtering. Helps eliminate Wi-Fi latency spikes.
max_workers Maximum number of worker threads used to send ICMP pings. Higher values may increase system load and latency.

Database

Key Description
database Path to the SQLite database file where metrics and alerts are stored.

Target IP list

Key Description
target_ip_list A single address, a list of addresses, or a range (for example 192.168.1.1-100) to scan. Monitoring is currently limited to a /24 subnet (see Known Issues).

Alert rules

Key Description
metric The metric to evaluate: latency, packet_loss, or jitter.
threshold The value that triggers the alert.
consecutive_checks Number of consecutive evaluations required before the alert state changes. Higher values reduce false positives.

Units and ranges

  • Latency: thresholds are evaluated in milliseconds.
  • Jitter: thresholds are evaluated in milliseconds.
  • Packet loss: values are percentages in the range 0.0 to 100.0. A value of 100.0 indicates 100% packet loss, and a threshold of 0.0 triggers on any packet loss.

Usage

See the usage guide for common ways to run Woninet and how to resolve common issues.

Platform Notes

Platform Probing method Privileges
Linux icmplib (recommended) or system ping (fallback) cap_net_raw on the interpreter, or root
macOS Untested Untested
Windows Untested Untested

Woninet has been developed and tested on Linux. macOS and Windows have not been tested, so installation and behavior on those platforms are not guaranteed. Feedback and bug reports from users on these systems are welcome.

Docker deployment is available on Linux only.

Testing

Install the optional test dependencies:

pip install -e ".[test]"

Then run:

pytest

The test suite currently focuses on API behavior and core logic and uses pytest for automated verification.

Known Issues

  • Monitoring is currently limited to a single /24 subnet.

Documentation

For questions or clarification, see the documentation.

Contributing

Thank you for considering a contribution to Woninet. To help maintain code quality, stability, and a predictable release process, please review the Contributing Guide before submitting changes.

License

This project is licensed under the terms of the MIT license.

Metadata

Release files for woninet 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for woninet 2.2.0
File Size Uploaded Provenance Actions
woninet-2.2.0.tar.gz 60.3 kB Without provenance Details for woninet-2.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for woninet 2.2.0
File Interpreter ABI Platform Actions
woninet-2.2.0-py3-none-any.whl Python 3 none any Details for woninet-2.2.0-py3-none-any.whl

Total release size: 136.3 kB

Release files / woninet-2.2.0.tar.gz

Download URL woninet-2.2.0.tar.gz
Size 60.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d6637440d1a9e9c220fb80ac7c27c138935f34b9d2d486051e0f782f69d8be09
BLAKE2b-256 checksum
How to use checksums
1a18e6d62b40e1821b972fb4d6d7752fcbe0d7ebe2f8e62ba87728da42d73f25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / woninet-2.2.0-py3-none-any.whl

Download URL woninet-2.2.0-py3-none-any.whl
Size 76.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d0b57dd4be14108289ef48b14acf5aba9b76cbe620dcfb11dc00594c83e6078
BLAKE2b-256 checksum
How to use checksums
0fd47cf83113d26a6593a2c302ffea473cc6fe618031cb1328e87e4d59263283
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for woninet 2.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page