Beekeeping Telemetry Platform Development Using ESP32

Adequate Infosoft designed the open-source IoT beehive monitoring platform HiveHub, which helps bring intelligence to the process of data collection in contemporary apiculture. The system is based on ESP32 controllers, custom PCB hardware and modular firmware, and it allows collecting information about up to 16 hives using one controller. The FastAPI backend, PostgreSQL database, support of MQTT, and a self-hosted dashboard show the proficiency of Adequate Infosoft in IoT product engineering and connected monitoring systems.

This platform consists of custom KiCad hardware, modular ESP32 firmware, FastAPI/PostgreSQL backend, automatic analysis of colonies, compatibility with MQTT protocol, self-hosted dashboard, and can be easily deployed by Docker Compose.

Project Background and the Scaling Challenge

The original design was HiveScale, an application-specific dual-load-cell scale for use in beekeeping. However, with growing demands for temperature gradients, internal sound, hive entrances, energy independence, and off-the-grid capabilities in the field, the initial scope had become too limited.

Adequate Infosoft re-branded the project as HiveHub and refactored its design into a hardware-neutral collector of sensor data. The internal designations, like database columns, OTA targets, Docker image names, and MQTT topics, were not modified in any way to allow existing data collection or device configuration schemes to remain valid.

HiveHub beekeeping monitoring mobile app

System Architecture: Hub-and-Spoke Telemetry

HiveHub uses a hub-and-spoke architecture. The ESP32-powered hub either polls data from or gets data from several hives, including wired sensors connected to common buses, BLE/GATT beacons, and special counting devices. This collected data is subsequently transmitted via Wi-Fi to the self-managed backend. The data are stored in PostgreSQL, analyzed for colony-level information, and made available through REST APIs to HivePal frontend and MQTT subscribers.

The architecture is deliberately modular at the build level: every sensor is optional and compiled into firmware per device, allowing a beekeeper to start with weight-only monitoring and add acoustic, thermal, or traffic sensing later without replacing the hub.

HiveHub beehive monitoring dashboard overview

Hardware Development and Custom PCB Design

Adequate Infosoft designed two generations of hardware. The legacy 30-pin ESP32 Scale Module established the sensor interface patterns, but the recommended production build is the Scale Module V0.4 built around the Seeed Studio XIAO ESP32-C6. The V0.4 module integrates a NAU7802 24-bit load-cell amplifier over I²C, a MAX17048 LiPo fuel gauge, a TPS63020 buck-boost converter, a TP4056 USB-C charger, a DS3231 real-time clock, a microSD slot, and an SHT40 ambient sensor.

Adequate Infosoft has designed an NAU7802 breakout printed circuit board (PCB) to support multi-hive installations that features a TCA9548A I2C multiplexer, which extends the functionality of the system up to 16 weight channels in total, 2 being able for the main module, and 14 weight channels connected through two breakout stages. All prototypes of circuit boards were tested, and complete documentation with KiCad files and fabrication details has been published.

The power supply design was highly developed. The TPS63020 allows turning USB or LiPo into stabilized 3.3 V voltage source, while the MAX17048 monitors the state of charge and generates low battery alerts. For the remote apiaries, Adequate Infosoft has managed to develop optional off-grid circuit using the CN3791 solar charging module, battery LiPo 10 Ah, and solar panel 6V 4.5W that power the same TPS63020 module. The hub is protected by an IP-rated enclosure with cable glands to ease the installation.

Firmware and Edge Processing

The firmware is a PlatformIO project for the ESP32-C6, deliberately decomposed into focused compilation units: main.cpp, hivehub_network.cpp, portal.cpp, sensors.cpp, scale_bus.cpp, i2c_bus.cpp, mics.cpp, ble_sensor.cpp, beehive_gatt.cpp, bee_counter_client.cpp, storage_power.cpp, device_prefs.cpp, and status_led.cpp. This separation allowed Adequate Infosoft to test sensor drivers and network logic independently and to exclude unused code paths at build time.

To promote efficiency, the firmware has been equipped with numerous capabilities, namely backend-side temperature compensation suitable for HX711 thermal drift, per-hive DS18B20 1-Wire probes, INMP441 I²S microphones with per-band FFT integrated for in-hive acoustics, BLE scanning and GATT bridging for third-party sensors such as HolyIot, RuuviTag, HiveInside, and HiveHeart, and SD-card caching that can be used for buffering readings during upload failures and providing a backup in AP mode based on the append-only principle.

It is worth noting that OTA updates are owner-curated and need to be accepted in order to be applied. Nevertheless, the hub can transfer guarded versions of the firmware to the HiveTraffic bee counters or HiveInside sensors via BLE GATT but cannot make a release by itself. To provide inspection mode, the following techniques can be applied: activating it via a button or a dashboard on the API level.

HiveHub mobile app alerts and firmware updates

Backend, API, and Data Pipeline

The backend is a Python FastAPI application backed by PostgreSQL 16. Adequate Infosoft packaged the API and database as a Docker Compose deployment: operators copy .env.example, set the master API key, HivePal service key, JWT secret, PostgreSQL password, and public base URL, then run docker compose up -d; the API listens on port 31115 by default. Devices register their own per-device keys on first contact, while server-to-server tooling uses the master X-API-Key header.

The backend creates dedicated /api/v1/app/... entry points for the HivePal integration by using user-specific JWTs and providing role-based access. It includes a /dashboard that allows the user to gain entry with username/password, comparison of beehives on different devices, adjustment of configuration settings, OTA commands, and SD-backup transfer.

Also, it has a Publish data option where a single metric could be made publicly visible by using a tokenized line that makes only the user-selected readings visible and thus revokable at any time. Finally, there is an optional MQTT bridge that connects it to Home Assistant, Node-RED, or openHAB, with the auto-discovery feature working in the fail-soft background mode.

HiveHub apiary map and hive monitoring insights

Insights Engine and Alerting

HiveHub real-time hive telemetry and alerts

A unique feature of Adequate Infosoft was the automated insights engine that operated as a background system. This background system is responsible for ongoing assessment of weight trends, temperature profiles, acoustic spectra, vibration levels, and inflow of traffic according to colony health standards set by scholarly research in the field of beekeeping.

When some new situation arises that leads to the escalation of the issue, for example, the preparation for swarming, the start of robbing, or winter starvation, the system is capable of sending notifications via SMTP email and Web Push platform the dashboard PWA on Android, iOS 16.4+, and desktop. Notifications are configured automatically unless changed by the user.

Validation and Release Engineering

Adequate Infosoft supported the emulation server and decoder/insight unit tests in test-data/ and set up GitHub Actions for backend image builds and for publishing the static website on GitHub Pages.

The hardware version is specifically marked tested and functioned properly. The documentation contains a complete bill of materials with corresponding pricing estimates and electrical schematics, secrets.h configurator, and a "Build your own" guide that is available for download.

Conclusion

HiveHub serves as a display of Adequate Infosoft's prowess in creating a full IoT product line ranging from custom mixed-signal PCB building to a low-energy ESP32 software to a packaged FastAPI/PostgreSQL backend.

The platform's purposefully developed modularity, backward-compatible name, and tested power design allows it to be considered a model for multi-sensor agro-telemetry, not just a beekeeping implement. By digitizing the hardware design along with software, backend, and automation, Adequate Infosoft eased up apiary monitoring barrier and provided a sustainable platform for sensor development.

Abhinav Akula
DevOps Engineer and 3� Microsoft Azure Certified professional specializing in Azure cloud solutions, migration, deployment automation, and multi-cloud environments. He holds Microsoft certifications as an Azure Developer Associate and Azure Solutions Architect Expert, with expertise in building scalable, secure, and reliable cloud infrastructure.

Project Repository: github.com/MacNite/HiveHub

What Our Clients Say About Us

Client satisfaction is our ultimate goal. Here are some kind words of our precious clients they have used to express their satisfaction with our service.

Leadership That Leads Worldwide

With a physical presence in over 15 countries and a global footprint spanning 25+ countries, we are ready to serve you anywhere. Location, language, or culture is never a barrier, because our global team can work with you in your language. Our strong international team ensures seamless collaboration across borders We have a strong tech team, highly recognized in their domains, with extensive technical expertise.