ESP32 · GPRS · Apple Home

GreenHouse

An off-grid controller for a greenhouse far from home. Battery-powered, connects over GPRS where there is no Wi-Fi, reads up to 10 temperature sensors, and reports them to Apple Home and a self-hosted history dashboard.

Works where Wi-Fi doesn't

Built for a greenhouse far from home. Talks over GPRS through an on-board SIM7600 modem, runs on a single 18650 cell, and spends most of its life in deep sleep — waking every 15 minutes to read and report.

Battery voltage and charge level travel back on the same MQTT stream, so you always know what is left before the next trip out.

Wake, read, send, sleep — 15-minute cycle

Up to 10 sensors, one wire

DS18B20 sensors share a single OneWire bus. Each one has a unique 64-bit address, stored on a microSD card — add or remove a sensor by editing config.txt, no reflashing needed.

The controller wakes, powers the bus, reads every sensor in order, and goes back to sleep. One outside, three inside — or ten across a large greenhouse.

DS18B20 sensors on a single OneWire bus

Apple Home and a history dashboard

Every sensor becomes a real Apple Home accessory through HomeBridge and the MQTTThing plugin — temperature, active status, and a low-battery warning on the controller itself.

The same MQTT stream feeds a small Flask app that stores every reading in SQLite. The dashboard shows up to a month of history, with presets for today, yesterday, week, month, and custom ranges.

GreenHouse live dashboard

Under the hood

  • ESP32
  • SIM7600
  • DS18B20
  • MQTT
  • HomeBridge
  • Python 3.11
  • Flask
  • SQLite
  • systemd
  • nginx

Self-hosted end to end

The firmware is plain Arduino with TinyGsmClient and PubSubClient. The logger and dashboard are Python, running as systemd services behind nginx. No cloud, no vendor lock-in — everything lives on your own server.

View on GitHub ↗

See it live

The dashboard is open. Four sensors, one outside and three inside a working greenhouse, updated every 15 minutes.

Open live dashboard ↗