Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

RaspberryWaterSystem

CI - make test Go version Issues codecov

Overview

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.

Features

Irrigation Control

  • Multi-zone irrigation support.
  • Manual and automatic watering.
  • Fertilizer injection support.
  • Cleaning and flushing cycles.
  • Configurable watering durations.

Automation

  • Scheduled irrigation tasks.
  • Smart watering integrations.
  • Remote execution.
  • External trigger support.

Monitoring

  • System health monitoring.
  • Structured logging.
  • Notifications and alerts.
  • Metrics and observability support.

Notifications

  • Irrigation alerts.
  • Error notifications.
  • Fertilization events.
  • System status updates.

Use Cases

RaspberryWaterSystem is designed for:

  • Bonsai collections.
  • Greenhouses.
  • Indoor gardens.
  • Small automated irrigation systems.
  • Experimental agriculture projects.

Hardware

Typical installations may include:

  • Raspberry Pi.
  • Relay modules.
  • Solenoid valves.
  • Peristaltic pumps.
  • Water pumps.
  • BME280 temperature/humidity sensor (I2C).
  • Rain sensor (SPI ADC).

Installation

Requirements

  • Raspberry Pi.
  • Go 1.27+.
  • Linux-based operating system.

Clone repository

git clone https://github.com/bruli/raspberryWaterSystem.git
cd raspberryWaterSystem

Install dependencies

go mod download

Run

go run ./cmd/server

Configuration

The 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/protobuf

Docker

Build image

docker build -t raspberry-water-system .

Run container

docker run raspberry-water-system

Development

Run tests

go test ./...

Run linter

golangci-lint run

Check vulnerabilities

go tool govulncheck ./...

Roadmap

  • Smart irrigation improvements.
  • Enhanced notification system.
  • Additional integrations.
  • Dashboard and monitoring improvements.
  • Improved automation workflows.
  • Extended hardware compatibility.

Security

Recommendations:

  • Use private networks whenever possible.
  • Protect remote endpoints.
  • Restrict access to management interfaces.
  • Use HTTPS when exposing services.

License

MIT


Author

Developed by Pablo Braulio

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages