A FastAPI + SQLite + Leaflet app to visualize live GPS locations of Digi Remote Manager (DRM) devices on a map.
It supports:
- Listing connected devices
- Viewing device details and metrics
- Playback of historical location data
- Live updates via Server-Sent Events (SSE)
DRM/
├── frontend/ # Static frontend (Leaflet + JS)
├── db.py # SQLite helper functions
├── digirm.py # Digi Remote Manager API client
├── server.py # FastAPI backend
├── sse.py # Simple SSE broker
├── telemetry.db # SQLite database (created at runtime)
├── .env # Environment variables (not committed)
├── requirements.txt # Python dependencies
└── .gitignore # Git ignore rules
git clone https://github.com/your-org/drm-live-map.git
cd drm-live-map
python -m venv .venv
source .venv/bin/activate # Linux / macOS
.venv\Scripts\activate # Windows
pip install -r requirements.txt
Copy .env.example
→ .env
and set your DRM credentials:
DRM_BASE_URL=https://remotemanager.digi.com
DRM_USERNAME=your-username
DRM_PASSWORD=your-password
# Poll interval (seconds)
POLL_SECONDS=3
# SQLite file path
DB_PATH=telemetry.db
# Allowed frontend origins (for CORS)
CORS_ORIGINS=http://localhost:8000,http://127.0.0.1:8000
uvicorn server:app --reload --host 0.0.0.0 --port 8000
Open: http://localhost:8000/app/
If you want to share the app over the internet, use ngrok:
ngrok http 8000
Ngrok will give you a public URL like:
https://xxxx-1234.ngrok-free.app
Open: https://xxxx-1234.ngrok-free.app/app/
- SQLite is used for storing device metadata and location history.
- The database file is
telemetry.db
(ignored by git). - A new one is created automatically on startup if it doesn’t exist.
- Device list with details (name, type, FW)
- Playback controls (play, pause, step, speed)
- Live SSE updates
- Timeline slider improvements
- Export data (CSV/GeoJSON)
- Docker image for deployment