Lightweight MQTT data logger & dashboard: history, CSV export, LWT status, retention. amd64 + arm64
5.4K
Lightweight, self-hosted MQTT data logger and dashboard. Run → Add Topic → Publish → See Data.
SenseHive subscribes to the MQTT topics you add, logs every message to SQLite 24/7 (with or without the dashboard open) and shows live values, history and device status in a clean web UI.
pip install sensehive-iotdocker run -d --name sense-hive \
-p 5000:5000 \
-v $(pwd)/sensehive-data:/app/data \
--restart unless-stopped \
devprincekumar/sense-hive:latest
Open http://localhost:5000 and sign in as admin with SENSEHIVE_ADMIN_PASSWORD if you set it, otherwise admin123 (change it under
Settings → Account). The default broker is the public broker.hivemq.com; change it
under Settings.
| Tag | Description |
|---|---|
latest | Latest release, multi-arch (amd64 + arm64) |
1.8.2, 1.8 | SenseHive 1.8.2, multi-arch |
1.7.0, 1.7 | SenseHive 1.7.0 |
1.6.1, 1.6 | SenseHive 1.6.1 |
1.6.0 | SenseHive 1.6.0 |
1.5.0, 1.5 | SenseHive 1.5.0 |
1.4.2, 1.4 | SenseHive 1.4.2 |
1.4.1 | SenseHive 1.4.1 |
1.4.0 | SenseHive 1.4.0 |
1.3.0, 1.3 | SenseHive 1.3.0 |
1.2.0, 1.2 | SenseHive 1.2.0 |
1.1.0, 1.1 | SenseHive 1.1.0 |
arm-pi-5 | Same multi-arch release image; kept for existing Raspberry Pi setups |
edge | Built from the main branch on every commit (tested, unreleased) |
One image runs on x86-64 servers and on ARM64 boards (Raspberry Pi 4/5, Jetson, Apple Silicon). Docker picks the right architecture automatically.
| Area | What you get |
|---|---|
| MQTT logging | Any broker, username/password auth, wildcard topics (sensors/#, home/+/temp), JSON or plain payloads |
| Dashboard | Live updates (SSE) across all open tabs, last value per topic, last 50 entries history, CSV export |
| Payload rendering | Nested JSON and arrays are pretty-printed and wrap correctly in Chrome and Firefox |
| Organization | Mandatory tag and Node ID per topic; filter by tag; sort by name, tag, status, last update, entries or size; group cards by node |
| Device health | Optional LWT/status topic per topic: online/offline per topic and per node, counts in the navbar, pushed live |
| Stats | Entry count and approximate size per topic, total entries and database size |
| Data management | Retention by age and/or max entries per topic (hourly, or "Run Cleanup Now"), SQLite WAL mode |
| Security | Login-protected UI and API, no CDN and a strict Content Security Policy, SQL-safe topic names, salted slow password hashes, lockout after repeated failed sign-ins, CSRF protection, HttpOnly cookies, persistent random session secret, no data baked into the image |
| Operations | /api/health and /api/status endpoints, Docker HEALTHCHECK, timezone-aware timestamps |
| Heartbeats (1.2) | Optional receiver for the MQTT heartbeat agent: encrypted, authenticated heartbeats and LWT over a public broker, /heartbeats page, read-only API. Off unless HEARTBEAT_MASTER_KEY is set |
docker exec sensehive python demo_fleet.py --broker HOST --register http://127.0.0.1:5000 fills the dashboard with devices and their last wills.sensehive-demo, an emulated fleet to try SenseHive with; the quick start (pip and Docker) is tested end to end with a broker and a browser in CI.git clone the agent and sudo python3 setup.py, and it appears by itselfHEARTBEAT_BROKER_USERNAME / HEARTBEAT_BROKER_PASSWORD for a broker with loginsHEARTBEAT_MASTER_KEY=auto: every SenseHive its own private fleet; nodes of other SenseHives on the same broker never appearsensehive/secure/... and their topics appear by themselves. Bulk keys with CSV, keys bound on first use, unused keys expire, show again with the password, revoke1 core (ARMv8 64-bit or x86-64), 128 MB free memory (uses about 28 MB idle), 200 MB disk plus data, Docker 20.10+, a reachable MQTT broker, a correct clock (NTP).
SENSEHIVE_ADMIN_PASSWORD for the first password/heartbeats page, read-only API with a bearer token. See the README/app/data volume.services:
sense-hive:
image: devprincekumar/sense-hive:latest
container_name: sense-hive
ports:
- "5000:5000"
volumes:
- ./sensehive-data:/app/data
environment:
DEFAULT_BROKER_HOST: broker.hivemq.com # first start only
DEFAULT_TIMEZONE: UTC
restart: unless-stopped
| Variable | Default | Purpose |
|---|---|---|
DEFAULT_BROKER_HOST / DEFAULT_BROKER_PORT | broker.hivemq.com / 1883 | Broker for a new database |
DEFAULT_BROKER_USERNAME / DEFAULT_BROKER_PASSWORD | empty | Broker credentials for a new database |
SENSEHIVE_FORCE_BROKER | false | true applies the DEFAULT_BROKER_* values on every start |
DEFAULT_TIMEZONE | UTC | Timezone for a new database |
RETENTION_DAYS / RETENTION_MAX_ENTRIES | 0 (off) | Initial retention policy |
RETENTION_INTERVAL | 3600 | Seconds between retention runs |
SQLITE_WAL | true | Set false on network filesystems (NFS/SMB) |
SECRET_KEY | random, persisted | Session secret |
DB_PATH | /app/data/iot_dashboard.db | Database location |
HAOS / Supervised users can install the add-on in one click: it opens in the sidebar, connects to the Mosquitto add-on automatically and stores data in Home Assistant backups. See https://github.com/855princekumar/sensehive-ha-addon
Every image is built by CI after the full regression suite passes (73 tests on Python 3.9 to 3.13, including an end-to-end run against a real Mosquitto broker), plus a container health check and a pip package smoke test.
Content type
Image
Digest
sha256:a4dd66798…
Size
52.6 MB
Last updated
22 days ago
docker pull devprincekumar/sense-hive