Repository navigation
# HiveHub V0.3 β sensor choice, Home Assistant & field-hardening π
The third HiveHub release builds on V0.2 and focuses on flexibility and
robustness: pick the ambient sensor that fits your build, get every in-hive
module as its own Home Assistant device, and run the whole stack β device and
backend β with materially better field reliability and safer self-host defaults.
What is HiveHub?
HiveHub is an open-source, ESP32-based data collector for beehive sensors and
scales. One device gathers weight, temperature, humidity, sound, vibration,
entrance traffic, power state, and network state from up to 16 hives and sends
the readings to a self-hosted FastAPI + PostgreSQL backend, where they can be
viewed in HivePal or the built-in web
dashboard.
Highlights of this release
Configurable ambient sensor + a leaner default build. The single
device-level outside-hive sensor is now selectable at build time: SHT4x/SHT40
(default) or SHT3x for temperature + humidity, or a BME280 that
additionally reports barometric pressure (ambient_pressure_hpa). The three
drivers are mutually exclusive and guarded at compile time so a bad secrets.h
fails the build instead of fighting over the shared I2C read path. In the same
pass the wired DS18B20 in-hive stack became fully optional and OFF by
default β in-hive temperature usually comes from a BLE sensor now β so a stock
build no longer pulls in the 1-Wire libraries it isn't using. Both are exposed
in the in-browser secrets.h configurator.
Every in-hive module is its own Home Assistant device. The optional MQTT
bridge now publishes each in-hive module (HiveHeart, HolyIot/RuuviTag/HiveInside
beacons, wireless HiveScale) as a distinct Home Assistant device with its full
telemetry β temperature, humidity, pressure and vibration β via per-module
auto-discovery, and a wireless HiveScale's barometric pressure is surfaced
alongside its weight. See docs/mqtt.md.
Extended Device & admin status panel. The dashboard's device and admin
status views were expanded to show more of what each device is actually doing,
and the dead cellular-modem code path was removed so the panel reflects only the
transports HiveHub really uses.
Idempotent ingest, end to end. Re-delivering a cached measurement β after a
flaky upload, an SD-card replay, or a backend restart β no longer creates
duplicate rows: the backend de-duplicates on a stable measurement_id
(migration 019_measurement_id_idempotency) and the firmware's replay path was
made idempotent, including dropping a stale cache staging file on a full replay.
Your history stays clean no matter how many times a reading is retried.
Safer self-host defaults. The shipped Docker / Docker Compose deployment was
hardened against accidental direct network exposure (bind to localhost by
default, secure-by-default posture) and the shipped compose file was repaired so
docker compose up works out of the box. Combined with the existing rate-limit /
request-size DoS knobs, a default deployment is safe to stand up before you put
it behind TLS / a reverse proxy.
ESP32-C6 field reliability. A broad I2C reliability and data-integrity
refactor: all wired I2C sensors are now read before the radios start (with
WiFi modem-sleep disabled during the read), a wedged ESP32-C6 I2C-NG driver is
healed rather than losing the whole cycle, the ambient SHT4x read is hardened
against a stuck bus, the RTC time is captured before SD initialisation, and
repeated probes of an absent NAU7802 are suppressed. NimBLE-Arduino was bumped to
2.5.0 to fix HiveHeart GATT "no data", the provisioning portal now offers BLE
sensor dropdowns from a startup scan (with in-page rescan), and a device stays
claimable after a backend rebuild/restore.
Tunable deep-sleep from secrets.h. The wake / deep-sleep duty-cycle
settings can now be overridden from secrets.h, so off-grid duty cycles are a
build-time choice rather than a source edit.
Dashboard polish & accessibility. An Apply (approve & flash) button now
appears right after a firmware upload, and the dashboard gained keyboard access /
focus-management fixes and accessible names on its chart canvases.
Docs, CI & fixes. New and consolidated documentation (the MQTT bridge and
per-module HA discovery, a project-wide code/documentation/UX audit, a refreshed
README), a corrected beehivemonitoring GATT battery-voltage decode, and CI that
builds and runs the BLE-decoder host tests on every change.
Component versions in this release
| Component | Version | Location | Status |
|---|---|---|---|
| ESP32-C6 Scale Module PCB | V0.4 | pcb-design/scale module/esp32-c6/ (_V0_4-Scale_Module-.zip) |
β Recommended β tested and working |
| NAU7802 breakout PCB | v0.2 | pcb-design/NAU7802 breakout pcb/ (_v0_2_NAU7802_breakout_board-.zip) |
β Recommended β tested and working |
| Firmware | 0.24.2 | firmware/ (pio run -e xiao_esp32c6 / legacy -e esp32dev) |
β Current |
| Server (backend) | 0.3.0 | server/ + docker/ (reported by GET /health) |
β Current |
Recommended setup
- Fabricate/assemble the ESP32-C6 Scale Module (V0.4) β off-the-shelf modules on pin headers, no SMD soldering for the core build.
- Need more than 2 wired scales? Add the NAU7802 breakout PCB on the I2C expansion header (up to 16 scales).
- Flash the firmware with
pio run -e xiao_esp32c6and configure everything from the on-device provisioning portal. - Stand up the backend with Docker Compose (docs/docker-install.md) and claim the device in HivePal or the built-in dashboard. Optionally enable the MQTT / Home Assistant bridge and e-mail / Web Push alerts.
See pcb-design/README.md for board details and the
main README for the full setup guide.
Deprecation notes
- The ESP32 30-pin Scale Module (HX711/INMP441-based) is obsolete. Existing boards keep working and the
esp32devfirmware target remains, but no further board revisions are planned β use the ESP32-C6 Scale Module for new builds. - The separate Power Module is being discontinued: the C6 Scale Module carries its own buck-boost regulator and battery fuel gauge, so most builds can power it directly.
- The wired DS18B20 in-hive temperature stack is now OFF by default and the wired I2C BeeCounter transport has been removed β in-hive temperature and entrance counting are BLE-based on new builds.