π Xfinity Upload Watchdog
Automatically monitor your upload speed, track history, and reboot your Xfinity modem when performance drops.
If you use Xfinity, youβve probably seen this:
- Download speeds are fine β
- Upload suddenly drops far below normal β
- Restarting the modem instantly fixes it π
This is a common issue with many Xfinity gateways and DOCSIS networks:
- Upload channels can degrade or get stuck
- Signal conditions fluctuate throughout the day
- The modem doesnβt always recover on its own
- A simple reboot often restores full upload speed
π This tool automates that process.
Xfinity upload speeds vary depending on your plan.
Typical DOCSIS upload tiers:
| Plan Type | Typical Upload |
|---|---|
| Lower tiers | 10β20 Mbps |
| Mid tiers | 20β50 Mbps |
| Higher tiers | 100β200 Mbps |
| 2 Gig+ / Next Gen | 200β400+ Mbps |
- High upload speeds (200β400 Mbps) are usually only available on newer plans
- Set your threshold based on your normal performance, not max advertised
This is NOT for slow plans.
This is for when:
- You normally get 200β400 Mbps upload
- But suddenly drop to 20β80 Mbps
- And a reboot fixes it
π This detects and fixes that automatically.
Every scheduled interval (default: :15 and :45 each hour):
-
Runs a Speedtest
-
Checks your upload speed
-
If below threshold:
- Retries multiple times
-
If still below threshold:
- Logs into your modem
- Sends the real backend reboot command
- Tracks reboot history and streaks
- π‘ Accurate Speedtest (Ookla CLI)
- π Retry logic with configurable attempts
- π Automatic modem reboot when needed
- β±οΈ Scheduled checks (:15 / :45 default)
- π₯οΈ Web UI dashboard (Flask)
- π Upload speed chart (last checks)
- π Reboot history list
- π Check log (good / reboot / failed)
- β‘ Auto-refresh (every 60s)
- π― Threshold visualization
-
Saves history to
/logs/state.json -
Survives container restarts
-
Tracks:
- recent speeds
- reboot history
- check results
- reboot streaks
- π Optional Discord notifications
- π¨ Escalation warning after repeated failures
- Reboot streak detection
- Recovery detection ("back to normal")
- Prevents silent failures
- Docker-based
- Raspberry Pi friendly
- Lightweight
- Xfinity modem/router with local UI (
http://10.0.0.1) - Docker + Docker Compose
- Modem admin credentials
git clone https://github.com/YOUR_USERNAME/xfinity-upload-watchdog.git
cd xfinity-upload-watchdogEdit config:
nano docker-compose.ymlSet your modem password:
MODEM_PASSWORD: "your_password_here"Start it:
docker compose up -dMake sure logs are persisted:
volumes:
- /home/YOUR_USER/xfinity-watchdog:/app
- /home/YOUR_USER/xfinity-watchdog/logs:/logsπ Without this, history will reset on restart.
Once running:
http://YOUR_DEVICE_IP:8080
Shows:
- Live upload status
- Speed history chart
- Reboot history
- Check logs
- Threshold tracking
UPLOAD_THRESHOLD_MBPS: "100"
MAX_ATTEMPTS: "3"
RETRY_WAIT_SECONDS: "30"
DISCORD_WEBHOOK_URL: ""
ENABLE_REBOOT: "true"Set based on your normal upload speed:
| Plan | Suggested Threshold |
|---|---|
| 20 Mbps | 15 |
| 50 Mbps | 40 |
| 200β400 Mbps | 100β150 |
Run a check immediately:
docker exec -it xfinity-watchdog python /app/watchdog.py --run-nowReboot modem manually:
docker exec -it xfinity-watchdog python /app/watchdog.py --reboot-nowRuns ΠΎΡΠ»ΠΈΡΠ½ΠΎ on:
- Pi 4 / Pi 5 recommended
- Very low resource usage
- Great for 24/7 monitoring
Install Docker:
curl -sSL https://get.docker.com | shInstead of clicking UI buttons, this script:
- Logs into the modem using Playwright
- Extracts session + CSRF tokens
- Sends real backend requests:
/actionHandler/ajaxSet_Reset_Restore.jst
/actionHandler/ajaxSet_mta_Line_Diagnostics.jst
π More reliable than UI automation.
Starting check...
Test 1: 42 Mbps
Test 2: 38 Mbps
Test 3: 41 Mbps
Upload LOW after 3 tests...
Rebooting modem...
DISCORD_WEBHOOK_URL: "https://discord.com/api/webhooks/..."- Designed for Xfinity gateways only
- Firmware changes may break endpoints
- Requires modem UI access enabled
Most scripts:
β Click buttons (fragile)
This:
β Uses real backend API β Handles auth + tokens β Tracks history + trends β Has a full dashboard
- Manual trigger button in dashboard
- Real-time updates (WebSocket)
- Smarter trend detection
- Multi-ISP support
If this helped you:
π Star the repo π Share it
Use at your own risk.
This interacts with your modemβs internal API and is not officially supported by Xfinity.