Meshquake monitors real-time earthquakes via USGS and sends alerts over Meshtastic mesh radios.
- Polls the USGS real-time earthquake feed
- Filters quakes by:
- ZIP code location
- Radius (in miles)
- Minimum magnitude
- Sends formatted messages with emojis via Meshtastic CLI
- Announces initialization on startup with monitoring parameters
- Stores quake history in SQLite
- Logs activity and errors
- Fully containerized with Docker + Compose
- Persistent logs and DB outside container
- Docker
- Docker Compose
git clone https://github.com/gsilvr/meshquake.git
cd meshquake
mkdir -p data
docker-compose build
docker-compose up -dThis will:
- Build the container
- Persist logs and DB to
./data/ - Run in
prodmode with default flags (see below) - Send an initialization message to the mesh on startup
- You will need to wait for a quake to actually happen in order to see if it's working
Edit docker-compose.yml to change runtime flags.
Example:
command: >
prod --zip 95014 --min-mag 1.0 --max-distance 100
--radio-ip 192.168.69.211 --ch-index 1| Mode | Description |
|---|---|
dev |
Dry run, log only |
devsend |
Sends to test radio, logs to separate dev table |
prod |
Full runtime, persistent logging + DB |
| Flag | Description |
|---|---|
--zip |
ZIP code for center location (required) |
--min-mag |
Minimum quake magnitude (e.g. 1.5) |
--max-distance |
Max radius in miles (default: 120) |
--radio-ip |
Target Meshtastic node IP |
--ch-index |
Channel index for sending (default: 0) |
All output is stored in the ./data directory:
meshquake_error.log— logsearthquakes.db— SQLite DB of quake events
On startup (in prod and devsend modes), meshquake sends:
🌎 Meshquake initialized! 📡
Monitoring near Mt View
M1.0+ | 120mi
Earthquake alerts are formatted with emojis and multi-line formatting:
🌎 Earthquake Alert!
📍 M2.3 | 88mi from Mt View
🗺️ 3 km W of Cobb, CA
⏰ 05-21 22:01 PDT
Long messages (>200 bytes) are automatically chunked into separate messages:
🌎 Earthquake Alert!
📍 M2.3 | 88mi from Mt View
🗺️ 3 km W of Cobb, CA
⏰ 05-21 22:01 PDT
To clear logs and DB:
rm -f data/earthquakes.db data/meshquake_error.logdocker-compose down- Logs rotate manually (watch file size)
- DB stores quake IDs to avoid duplicates
prodpolls every 60 seconds- All files persist under
./data/
Stable • Dockerized • Ready for unattended use