Skip to content

monxas/ping-watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ping Watcher

License: MIT Platform: ESP32-C6 Setup: Web Notifications: Telegram

ESP32-C6 firmware + cloud relay that monitors any HTTP target on your LAN and sends a Telegram alert when it stops responding.

Built for non-technical users. No apps, no Home Assistant, no command line. Plug the ESP32 in, connect to its Wi-Fi once, finish setup from a phone browser on esp.monxas.casa/setup. 2 minutes.

Why

Most "uptime monitors" assume you have a cloud account, a smartphone app, and know what an API token is. This one assumes none of that — it ships as a physical device a parent or partner can plug into the wall. The only thing it asks them for is a Telegram bot token (which has its own walkthrough tutorial).

Real-world targets:

  • Shelly devices (auto-discovered via mDNS during setup)
  • Routers / mesh nodes that should stay reachable
  • NAS web UIs that flag a sleeping NAS
  • Anything that serves HTTP on your LAN

Architecture

ESP32-C6  ────►  HTTP probe  ────►  Target (Shelly / router / NAS / any HTTP)
   │
   │  on failure → POST sendMessage
   ▼
 Telegram Bot API ────►  your phone

ESP32-C6  ───── register / long-poll  ─────►  esp.monxas.casa  ◄──── browser /setup
                                                                       (configures everything)

Three components in this repo:

Path What
firmware/ PlatformIO project for ESP32-C6 (Arduino + WiFiManager + ArduinoJson)
relay/ Node.js + Express server hosted at esp.monxas.casa. Pairs phones to devices and pushes config via HTTP long-poll.
docs/ End-user tutorials (e.g. Telegram bot setup)

How the setup flow works

  1. First boot — ESP has no Wi-Fi credentials → creates an AP PingWatcher-XXXX (last 4 hex of MAC = pairing code).
  2. User connects their phone to that AP. The captive portal opens; they pick their home Wi-Fi and save.
  3. ESP reboots, joins the home Wi-Fi, scans the LAN for Shelly devices via mDNS, and registers itself at esp.monxas.casa.
  4. User opens esp.monxas.casa/setup on the same phone. The relay auto-detects the device (same public IP / subnet) and shows it, with detected Shellys listed as cards.
  5. User picks a Shelly (or types any URL) and fills in their Telegram bot token + chat ID. Submit.
  6. Relay delivers the config via long-poll. ESP saves it to NVS, reboots into monitor mode, and sends 🟢 Ping Watcher iniciado to Telegram.
  7. Monitor loop — ESP probes the target on the configured interval. After N consecutive failures it sends 🚨 DOWN, after 1 success ✅ UP.

Hardware

  • ESP32-C6 (any flavor, tested on DevKitC-1) — ~5€ on AliExpress
  • USB-C power supply (any phone charger works)
  • 2.4 GHz Wi-Fi in range of the target

No additional components, no soldering, no breadboards. Pluggable into any USB-C wall adapter.

Recovery

Hold the BOOT button (GPIO 9 on C6 DevKitC-1) for 5 seconds to wipe Wi-Fi credentials and saved config, restarting the provisioning flow from scratch.

Build & flash

Firmware

cd firmware
pio run -t upload --upload-port /dev/cu.usbmodem*

OTA updates via the relay are planned but not yet wired — flash via USB for now. PRs welcome.

Relay (development)

cd relay
npm install
PORT=8080 node server.js
# in another terminal:
curl http://localhost:8080/health

Open http://localhost:8080/setup in your browser.

Relay (production)

The production relay runs as a Docker container behind Caddy on my home server, published at esp.monxas.casa via a Cloudflare tunnel. See relay/Dockerfile for the build.

cd relay
docker build -t ping-watcher-relay .
docker run -d -p 8080:8080 --name ping-watcher-relay ping-watcher-relay

Project status

Live and in use at home. The setup flow has been tested with non-technical family members. Feedback / PRs welcome.

Related

If you're already deep in the smart-home rabbit hole, you probably don't need this — Home Assistant + Uptime Kuma covers it. Ping Watcher exists for the case where you want the simplest possible "is this thing online?" sensor gifted to someone who'd never touch a YAML file.

License

MIT

About

ESP32-C6 Ping Watcher · monitors any HTTP target on your LAN and sends Telegram alerts. Cloud-paired setup via esp.monxas.casa — no Home Assistant, no app.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors