RaspberryWaterSystem is a smart irrigation controller designed for bonsai trees and delicate plants.
The project runs on a Raspberry Pi and manages irrigation zones, fertilization systems, and automated watering tasks while integrating with external monitoring and automation platforms.
The main goal of the project is to provide a reliable and intelligent irrigation system focused on:
- Plant health.
- Water efficiency.
- Automation.
- Remote management.
- Observability.
- Scalability.
- Multi-zone irrigation support.
- Manual and automatic watering.
- Fertilizer injection support.
- Cleaning and flushing cycles.
- Configurable watering durations.
- Scheduled irrigation tasks.
- Smart watering integrations.
- Remote execution.
- External trigger support.
- System health monitoring.
- Structured logging.
- Notifications and alerts.
- Metrics and observability support.
- Irrigation alerts.
- Error notifications.
- Fertilization events.
- System status updates.
RaspberryWaterSystem is designed for:
- Bonsai collections.
- Greenhouses.
- Indoor gardens.
- Small automated irrigation systems.
- Experimental agriculture projects.
Typical installations may include:
- Raspberry Pi.
- Relay modules.
- Solenoid valves.
- Peristaltic pumps.
- Water pumps.
- BME280 temperature/humidity sensor (I2C).
- Rain sensor (SPI ADC).
- Raspberry Pi.
- Go 1.27+.
- Linux-based operating system.
git clone https://github.com/bruli/raspberryWaterSystem.git
cd raspberryWaterSystemgo mod downloadgo run ./cmd/serverThe application is configured using environment variables; see internal/config/config.go for the full
list. The required ones are:
SERVER_URL=:8080
ENVIRONMENT=development
ZONES_FILE=/data/zones.yaml
AUTH_TOKEN=change-me
DAILY_PROGRAMS_FILE=/data/daily_programs.yml
ODD_PROGRAMS_FILE=/data/odd_programs.yml
EVEN_PROGRAMS_FILE=/data/even_programs.yml
WEEKLY_PROGRAMS_FILE=/data/weekly_programs.yml
TEMPERATURE_PROGRAMS_FILE=/data/temperature_programs.yml
EXECUTION_LOGS_FILE=/data/execution_logs.json
STATUS_FILE=/data/status.json
PENDING_IRRIGATIONS_DIRECTORY=/data/pending_irrigations
NATS_SERVER_URL=nats://localhost:4222
EVENTS_DIRECTORY=/data/events
LOG_LEVEL=info
NTFY_URL=https://ntfy.sh
NTFY_TOPIC=water-system
NTFY_USER=user
NTFY_PASSWORD=change-me
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
OTEL_TRACES_SAMPLER=always_on
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobufdocker build -t raspberry-water-system .docker run raspberry-water-systemgo test ./...golangci-lint rungo tool govulncheck ./...- Smart irrigation improvements.
- Enhanced notification system.
- Additional integrations.
- Dashboard and monitoring improvements.
- Improved automation workflows.
- Extended hardware compatibility.
Recommendations:
- Use private networks whenever possible.
- Protect remote endpoints.
- Restrict access to management interfaces.
- Use HTTPS when exposing services.
MIT
Developed by Pablo Braulio