Hardware
The firmware is yours
No black-box binaries. PlantHub firmware is open source on GitHub, organized into hardware variants with shared sensor and actuator templates. Fork it, audit it, extend it.
Repository
github.com/vic7z/plant-hub-firmware
GitHub Actions publish the signed manifests to GitHub Pages so the web flasher can pick them up. Every release is reproducible from the matching git tag.
Supported boards
- ESP32-C3 — recommended for new builds. Single-core RISC-V, BLE5, USB-Serial-JTAG.
- ESP32-S3 — best for camera or AI-on-device extensions. Dual-core, USB OTG.
- Classic ESP32 — supported for legacy boards. Dual-core Tensilica.
MQTT topic structure
{tenantId}/{nodeId}/sensors → device publishes sensor JSON
{tenantId}/{nodeId}/actuators → server publishes actuator commands
{tenantId}/{nodeId}/status → device publishes online/offline (LWT)
{tenantId}/{nodeId}/capabilities → device declares supported sensors/actuators
{tenantId}/{nodeId}/actuator-state → device reports actuator state changes
{tenantId}/{nodeId}/system → firmware version, RSSI, battery, free heapSelf-provisioning
On first boot the firmware generates a claim code, exposes a captive portal for Wi-Fi credentials, and self-registers with the backend by MAC address. The backend returns mutual-TLS credentials (AWS IoT Core) or a Mosquitto username/password depending on the deployment. The flasher guides users through this end-to-end.
Adding a sensor
Sensors are template files. Copy the capacitive_soil.cpp template, wire the I2C/analog pins, set the sensor key (any string —soilMoisture, ph, ec, anything), and the backend auto-detects it on the next reading. No server-side schema change.
Adding an actuator
Actuators follow the same template pattern. Declare the actuator key and type (BINARY or RANGE) in the capabilities payload on boot, and the dashboard and rule engine pick it up automatically. Hard limits like maxDuration are declared in firmware so the server cannot push commands that exceed safe values.
Mock device profiles
Three mock profiles ship with the firmware — Greenhouse Controller, Weather Station, Hydroponic Garden — that generate realistic sensor data every 30 seconds with no wiring required. Useful for testing the full backend pipeline before you buy sensors.