Documentation — Connected greenhouse kit
What the kit contains, prerequisites and procedure.
Diagrams
Prerequisites
- A Raspberry Pi (the guide is written on a Pi 5 running Debian 13) ;
mosquittoandmosquitto-clients;- Python 3 with the standard library only — no external dependency for the collector and the watering decision.
Files included
| File | Role |
|---|---|
examples/capteurs.py |
reads SHT31 (I2C), BH1750, DS18B20 (1-Wire) |
examples/collecteur.py |
MQTT subscriber → SQLite, with value rejection |
examples/arrosage.py |
relay, watchdog, fail-safe shutdown |
examples/decision.py |
shows the decision without touching the relay |
examples/publier.py |
publishes one measurement cycle |
examples/config.yaml |
example configuration |
examples/dashboard.json |
Grafana dashboard |
tests/test_kit.py |
the 18 tests |
Procedure
- Assemble the hardware, everything unplugged.
- Enable I2C and 1-Wire, reboot, check
i2cdetectand/sys/bus/w1. - Run
capteurs.py: are the values plausible? - Start Mosquitto, publish a test message.
- Run the collector, check the SQLite table.
- Import the dashboard.
- Only then connect the relay and the pump.
The order matters: the relay is the last component to be connected, never the first. It is written in the guide, and a regression test protects the primary key of the database.