gitwtfhub

wtf is tmhi-watchdog?

kevin1724/tmhi-watchdog — explained in plain English

Analysis updated 2026-05-18

3PythonAudience · ops devopsComplexity · 3/5Setup · moderate

TL;DR

A self-hosted watchdog that detects when a T-Mobile Home Internet gateway loses its cellular connection and automatically reboots it to restore internet.

Mindmap

mindmap
  root((TMHI Watchdog))
    What it does
      Detects internet outage
      Reboots gateway
      Logs event history
    Tech stack
      Python
      Docker
      FastAPI
      SQLite
    Use cases
      Auto gateway reboot
      Outage dashboard
      REST API status
    Audience
      Home lab users
      Docker self-hosters

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Automatically restart a stuck T-Mobile Home Internet gateway without manually unplugging it.

REASON 2

Monitor home internet uptime and see a history of outages on a simple dashboard.

REASON 3

Get a REST API you can hook into other home automation tools to check connectivity.

REASON 4

Test reboot logic safely in dry run mode before trusting it to act on its own.

What's in the stack?

PythonDockerFastAPISQLite

How it stacks up

kevin1724/tmhi-watchdog0marildo/imago0xdfi/glm-5.2-1m-4x-dgx-spark
Stars333
LanguagePythonPythonPython
Setup difficultymoderateeasyhard
Complexity3/52/55/5
Audienceops devopsgeneralresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires Docker Compose and a supported T-Mobile gateway model, some models like the Nokia 5G21 are not supported.

Wtf does this do

TMHI Gateway Watchdog is a self-hosted tool that watches your internet connection and automatically restarts your T-Mobile Home Internet gateway when it loses its cellular connection but is still reachable on your local network. This solves a specific and annoying problem: your phone or computer stays connected to Wi-Fi and can still reach the gateway's own settings page, yet no actual internet traffic is getting through. The tool runs as a Python program packaged in Docker, so you install it on something like a Linux server, a NAS device, or a small always on computer that sits on the same network as the gateway. Once running, it repeatedly checks several different internet addresses to confirm whether the connection is actually down, waits until the outage has lasted long enough to be sure it is not temporary, then logs into the gateway's own local web interface and asks it to reboot. It supports several specific gateway models used with T-Mobile Home Internet, though not all of them, and the README is careful to list exactly which ones work with the current version. Safety comes first in how the tool is designed. It starts in a dry run mode by default, meaning it will detect and log outages and even simulate what a reboot request would look like, without actually restarting anything, until you deliberately turn that mode off. It also includes built in limits like a grace period after startup, a cooldown between reboots, and a cap on how many reboots can happen per day, so it cannot get stuck in a restart loop. Once set up, you can watch what is happening through a small web dashboard and a REST API, both served from the same container, and every event is saved to a local database so you can look back at outage history. The project also publishes ready to use Docker images so you do not need to build the software yourself. This is built for people comfortable running Docker containers on their own hardware, rather than a plug and play consumer app.

Yoink these prompts

Prompt 1
Help me set up tmhi-watchdog with Docker Compose and confirm it recognizes my gateway model.
Prompt 2
Explain what dry run mode does in tmhi-watchdog and why I should keep it on at first.
Prompt 3
Walk me through testing tmhi-watchdog's gateway login before enabling real reboots.
Prompt 4
Show me how to adjust tmhi-watchdog's outage threshold and daily reboot limit.

Frequently asked questions

wtf is tmhi-watchdog?

A self-hosted watchdog that detects when a T-Mobile Home Internet gateway loses its cellular connection and automatically reboots it to restore internet.

What language is tmhi-watchdog written in?

Mainly Python. The stack also includes Python, Docker, FastAPI.

How hard is tmhi-watchdog to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is tmhi-watchdog for?

Mainly ops devops.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.