Draco is an automated plant watering system for Raspberry Pi. It controls a 4-relay shield to drive a water pump and up to three valves, with optional Telegram and MQTT integration for remote monitoring and control.
| Interface | Required | Description |
|---|---|---|
| GPIO | Yes | Controls the 4-relay shield (pump + valves) |
| Scheduler | Conditional | Time-based automatic watering (activated by default when Telegram/MQTT are disabled) |
| Telegram | No | Remote commands and log streaming |
| MQTT | No | Integration with Home Assistant or any MQTT broker |
GPIO + SchedulerGPIO + TelegramGPIO + MQTTGPIO + Telegram + MQTTGPIO + Scheduler + Telegram + MQTT
Note: If neither Telegram nor MQTT is enabled, the scheduler activates automatically. Watering runs at the interval defined in
config.json(first run afterholidays_frequency_daysdays from start).
- Raspberry Pi (any model with GPIO)
- Python 3.9+
- uv (recommended) or pip
git clone https://github.com/jpizquierdo/Draco.git
cd Draco
uv syncgit clone https://github.com/jpizquierdo/Draco.git
cd Draco
python -m venv .venv
.venv/bin/pip install .Copy and edit the example config:
cp config/config.yaml config/my_config.yamlKey fields in config.yaml:
telegram_bot:
enable: true
api: YOUR_TELEGRAM_BOT_TOKEN
allowed_users:
user1: CHAT_ID
relayshield:
WaterPump: 4
Valve1: 22
Valve2: 6
Valve3: 26
scheduler:
holidays_frequency_days: 3
water_start_time_HH: "10"
water_start_time_MM: "00"
water_stop_time_HH: "10"
water_stop_time_MM: "02"
enable_alive_logging: false
mqtt:
enable: true
broker_ip: 192.168.1.153
broker_port: 1883GPIO pin numbers refer to BCM numbering.
# With uv
uv run python draco.py -c config/config.yaml
# With activated venv
python draco.py -c config/config.yamlSee docs/systemd/how_to_systemd.md.
MQTT-based switch configuration and a custom Lovelace card are provided under docs/homeassistant/.
See docs/homeassistant/readme.md for setup instructions.
See docs/telegram_commands.md for the full command list to register with @BotFather.
- Moisture sensor support for demand-based watering
- DHT temperature and humidity sensor integration
Open a discussion to ask questions, share your setup, or propose ideas.