HBME Server — centralized MeshCore packet ingestor, analysis and visualization
- Python 56.5%
- HTML 42.8%
- Mako 0.5%
- Dockerfile 0.2%
|
All checks were successful
Tests / test (push) Successful in 1m9s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .forgejo/workflows | ||
| alembic | ||
| app | ||
| tests | ||
| .env.example | ||
| .gitignore | ||
| alembic.ini | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| docker-compose.yml | ||
| Dockerfile | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
meshcore-meshdd
Centralized MeshCore packet ingestor, analysis and visualization server.
Empfängt Paket-Metadaten von MeshCore-Bots (via POST /api/v1/ingest), speichert sie in PostgreSQL und stellt ein Web-Dashboard sowie eine REST-API bereit.
Stack
- FastAPI — async REST API + automatische OpenAPI-Docs unter
/docs - PostgreSQL — persistente Speicherung (Nodes, Pakete, API-Keys)
- SQLAlchemy async — ORM mit Alembic-Migrations
- Jinja2 + Bootstrap 5 — Web UI
Schnellstart
# Mit Docker Compose
docker compose up -d
# Manuell
cp .env.example .env
# .env anpassen (DATABASE_URL etc.)
pip install -e .
uvicorn app.main:app --reload
Web UI: http://localhost:8000
API Docs: http://localhost:8000/docs
API
Paket einliefern
POST /api/v1/ingest
X-API-Key: <key>
{
"route_type": "ROUTE_TYPE_FLOOD",
"payload_type": "PAYLOAD_TYPE_TXT_MSG",
"snr": 8.5,
"rssi": -95,
"path": "aabbcc",
"path_len": 2,
"packet_hash": "abc123...",
"raw_hex": "..."
}
Node + API-Key anlegen
POST /api/v1/admin/nodes
{"name": "mein-bot", "description": "..."}
→ {"id": 1, "name": "mein-bot", "api_key": "<key>"}
Pakete abfragen
GET /api/v1/packets?limit=50&payload_type=PAYLOAD_TYPE_TXT_MSG
GET /api/v1/nodes
Konfiguration
Alle Einstellungen via Umgebungsvariablen oder .env:
| Variable | Standard | Beschreibung |
|---|---|---|
DATABASE_URL |
postgresql+asyncpg://meshdd:meshdd@localhost:5432/meshdd |
PostgreSQL-URL |
SECRET_KEY |
change-me-in-production |
Secret für interne Signierung |
DEBUG |
false |
SQL-Logging aktivieren |
PACKET_RETENTION_DAYS |
90 |
Paket-Aufbewahrung in Tagen |
Verbindung mit meshcore-bot
Im meshcore-bot die [HBMEIngestor]-Konfiguration anpassen:
[HBMEIngestor]
enabled = true
api_url = http://localhost:8000/api/v1/ingest
api_key = <erzeugter-key>
preview_mode = false