Real-time home network monitoring for Zyxel Router + TP-Link Extender
Get instant connect/disconnect alerts in Telegram and Windows notifications.
WLAN Monitor continuously tracks devices on your local network, merges data from:
- Zyxel router
- TP-Link extender
Then it detects who connected/disconnected and notifies you in real time.
It is especially useful for:
- Smart-home monitoring
- Unauthorized device detection
- Family device presence tracking
- Quick network visibility from Telegram
- Real-time connect/disconnect detection
- Merged device view (router + extender)
- Telegram notifications with friendly formatting
- Telegram control menu with runtime commands
- Windows toast notifications
- Crash-safe mode:
- app does not exit on runtime/startup failures
- sends error details to Telegram
- waits for
/retry
- Editable host aliases and device types in
config.yaml - Reload config without restarting (
/reload_config)
After startup, use /menu in Telegram.
/devices- show currently connected devices/hosts- show cached hosts/status- show monitor status/start_monitor- resume monitoring/stop_monitor- pause monitoring/retry- retry initialization/session after crash/reload_config- reloadconfig.yaml/host_set <mac> <name>|<device_type>- add/update cached host/host_del <mac>- delete cached host
/host_set aa:bb:cc:dd:ee:ff Ahmed|PHONE
/host_del aa:bb:cc:dd:ee:ffNetwork Monitor/
├─ config.yaml
├─ pyproject.toml
├─ Makefile
├─ CHANGELOG.md
├─ out/ # build/runtime artifacts
└─ src/
└─ wlan/
├─ main.py # app entrypoint + monitor loop
├─ router/ # Zyxel router client + encryption/decryption
├─ extender/ # TP-Link extender session + parsing
├─ observers/ # connect/disconnect change detection
├─ notifiers/ # Telegram + Windows notifications
├─ managers/ # config/env/timer managers
├─ schemas/ # standard column schema
└─ mappers/ # source->standard field mapping
- Python
>= 3.8 - Windows (for
winotifydesktop notifications) - Access to:
- Zyxel router web API
- TP-Link extender interface
- Telegram Bot token + chat id
From project root:
pip install -e .Optional dev tools:
pip install -e .[dev]This file controls runtime behavior:
- polling interval (
main.wait_time) - output columns (
main.columns) - host aliases (
main.cached_hosts) - router/extender IP and protocol
- excluded MAC/IP lists
- Telegram chat id
- Windows notification columns
Keep your own values in
config.yamland avoid sharing private network data publicly.
Create a .env file in the runtime base path with required secrets:
TELEGRAM_BOT_TOKEN=
EXTENDER_PASSWORD=
EXTENDER_R_SU_ENCRYPT=
EXTENDER_T_SU_ENCRYPT=
ROUTER_USERNAME=
ROUTER_PASSWORD=
ROUTER_ENCRYPTION_KEY=
ROUTER_IV=
ROUTER_ENCRYPTED_CONTENT=
ROUTER_ENCRYPTED_KEY=
ROUTER_RSA_PUBLIC_KEY=python -m wlan.mainpython -m wlan.router.clientmake main
make start
make exemake exeThis generates a standalone executable in out/.
- Load env + config
- Start Telegram control bot
- Initialize router/extender sessions
- Poll connected devices from both sources
- Normalize and merge results
- Apply cached host aliases
- Detect connect/disconnect events
- Send Telegram + Windows notifications
If an error happens:
- app enters safe stop mode
- sends crash details to Telegram
- waits for
/retry
This means the router rejected login due to an existing session.
The monitor will stay alive in safe stop mode; use /retry to reinitialize.
- Check
TELEGRAM_BOT_TOKENin.env - Check
telegram.chat_idinconfig.yaml - Send
/menuto verify bot command handlers are active
- Verify router/extender IPs in
config.yaml - Ensure credentials and encryption values are correct
- Check logs in
running.log
- Current version:
1.2.3 - See full history in
CHANGELOG.md
PRs and ideas are welcome.
If you open an issue, include:
- your version
- relevant log lines
- whether issue is router, extender, or Telegram related