Deploying SIP Irrigation Control
Introduction
SIP (Sustainable Irrigation Platform) is an open-source irrigation control system designed for both residential and commercial applications. Originally developed for Raspberry Pi-based controllers, SIP provides a web interface for managing irrigation schedules, zones, and sensors while supporting water conservation through smart scheduling features.
The platform enables remote management of irrigation systems through any web browser, eliminating the need for proprietary apps or cloud subscriptions. SIP supports multiple station configurations, weather-based adjustments, and integration with various sensors for automated irrigation decisions.
Key highlights of SIP Irrigation Control:
- Web-Based Interface: Manage irrigation from any browser without proprietary apps
- Flexible Scheduling: Program-based scheduling with multiple start times and durations
- Zone Management: Control multiple irrigation zones independently
- Weather Integration: Adjust watering based on local weather conditions
- Sensor Support: Connect soil moisture, rain, and flow sensors
- Manual Control: Override schedules for immediate zone activation
- Water Usage Tracking: Monitor water consumption over time
- Plugin System: Extend functionality with community plugins
- Remote Access: Manage your system from anywhere via web interface
- Open Source: Fully customizable with no subscription fees
This guide walks through deploying SIP on Klutch.sh using Docker as a cloud-based management interface that communicates with your local irrigation controller hardware.
Why Deploy SIP on Klutch.sh
Deploying SIP on Klutch.sh provides several advantages for irrigation management:
Remote Access: Access your irrigation controller from anywhere without complex port forwarding or VPN configuration.
Simplified Deployment: Klutch.sh automatically builds your SIP configuration without manual server setup.
Persistent Storage: Attach persistent volumes for schedules, logs, and configuration data.
HTTPS by Default: Secure access to your irrigation controls with automatic SSL certificates.
Reliable Uptime: Cloud-hosted interface ensures management access even when local power is intermittent.
GitHub Integration: Store configuration in version control for backup and reproducibility.
Prerequisites
Before deploying SIP on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your SIP configuration
- Basic familiarity with Docker and containerization concepts
- Understanding of your irrigation hardware setup
- (Optional) MQTT broker for controller communication
- (Optional) A custom domain for your SIP interface
Architecture Overview
SIP deployments typically involve two components:
- Cloud Interface (Klutch.sh): Web interface for scheduling and monitoring
- Local Controller: Raspberry Pi or similar hardware controlling valves
Communication between components uses MQTT or HTTP webhooks.
Deploying SIP on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 8080
Create Your Repository
Create a new GitHub repository for your SIP deployment. Add a Dockerfile:
FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \ git \ && rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/Dan-in-CA/SIP.git .
RUN pip install --no-cache-dir -r requirements.txt
ENV SIP_PORT=8080
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \ CMD wget --no-verbose --tries=1 --spider http://localhost:8080/ || exit 1
CMD ["python", "sip.py"]Push to GitHub
Commit and push your Dockerfile to your GitHub repository.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project. Give it a descriptive name like “sip-irrigation” or “garden-control”.
Create a New App
Within your project, create a new app. Connect your GitHub account and select your repository.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Add the following environment variables:
| Variable | Value |
|---|---|
SIP_PORT | 8080 |
TZ | Your timezone (e.g., America/New_York) |
Attach Persistent Volumes
Add the following volumes for data persistence:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/app/data | 1 GB | Configuration and settings |
/app/logs | 1 GB | Operation logs |
Deploy Your Application
Click Deploy to start the build process.
Access SIP Interface
Once deployment completes, access your SIP interface at the provided URL.
Initial Configuration
Setting Up Stations
Configure your irrigation zones:
- Navigate to Stations in the menu
- Set the number of active stations
- Name each station for easy identification
- Configure master valve if applicable
Creating Programs
Set up watering schedules:
- Go to Programs section
- Create a new program
- Select which stations to include
- Set schedule (days, start times)
- Configure run durations for each station
Weather Adjustments
Enable weather-based scheduling:
- Access Options menu
- Configure weather service integration
- Set rain delay parameters
- Configure seasonal adjustments
Hardware Integration
Raspberry Pi Controller
For local hardware control:
- Install SIP on Raspberry Pi
- Connect relay board to GPIO pins
- Wire relays to irrigation valves
- Configure MQTT for cloud sync
MQTT Communication
Set up communication between cloud and local:
# MQTT broker configurationbroker_address: your-mqtt-broker.combroker_port: 1883topic_prefix: sip/irrigationSupported Hardware
SIP works with various hardware configurations:
- Raspberry Pi with relay boards
- ESP8266/ESP32-based controllers
- Commercial irrigation controllers with API support
- OpenSprinkler-compatible devices
Sensor Integration
Rain Sensors
Prevent watering during rain:
- Connect rain sensor to controller
- Configure sensor in SIP settings
- Set rain delay duration
Soil Moisture Sensors
Water based on soil conditions:
- Install moisture sensors in zones
- Connect to controller ADC inputs
- Configure thresholds in SIP
- Enable moisture-based scheduling
Flow Sensors
Monitor water usage:
- Install flow sensor on main line
- Connect to controller input
- Configure calibration in SIP
- Enable usage tracking and alerts
Plugin System
Available Plugins
Extend SIP functionality:
- MQTT Plugin: Cloud communication
- Email Plugin: Notification delivery
- Weather Underground: Weather data integration
- Pushover: Mobile notifications
- Proto Plugin: Custom hardware support
Installing Plugins
Add plugins to your deployment:
- Download plugin files
- Add to plugins directory
- Enable in SIP settings
- Configure plugin options
Remote Monitoring
Status Dashboard
Monitor system status:
- Current running zones
- Upcoming scheduled runs
- Recent activity log
- Water usage statistics
Mobile Access
Access from mobile devices:
- Responsive web interface
- Works on phones and tablets
- No app installation required
Alerts and Notifications
Configure system alerts:
- Schedule completion notifications
- Error alerts (sensor failures, etc.)
- Water usage warnings
- System status updates
Best Practices
Water Conservation
- Weather Integration: Skip watering on rainy days
- Soil Sensors: Water only when needed
- Time Restrictions: Respect local watering schedules
- Efficient Scheduling: Water early morning to reduce evaporation
System Maintenance
- Regular Checks: Inspect zones for proper operation
- Log Review: Monitor for errors or anomalies
- Backup Configuration: Export settings regularly
- Seasonal Adjustments: Update schedules for seasons
Troubleshooting
Zones Not Activating
- Verify relay connections
- Check station configuration
- Review program schedules
- Test manual activation
Communication Failures
- Verify MQTT broker connectivity
- Check network configuration
- Review authentication settings
- Confirm topic subscriptions
Sensor Issues
- Check wiring connections
- Verify sensor configuration
- Calibrate sensor thresholds
- Test sensor independently
Additional Resources
Conclusion
Deploying SIP Irrigation Control on Klutch.sh provides remote management capabilities for your irrigation system without complex networking setup. Combined with local controller hardware, you get a flexible, open-source solution for automated irrigation that can be accessed from anywhere while maintaining full control over your watering schedules and water usage.