- Easy to use interface.
- Quick set up.
- Mobile support.
- Customizable sprinkler name and run time.
- Automatic running of the schedule (each zone from top to bottom.)
- Zones can be customized to be enabled during the schedule run.
- Zones that are disabled from this schedule are marked in red.
- Automatic shut off of sprinklers that are turned on from web page
- Zones can be customized to have this feature turned on or off.
- Zones that have this feature turned off are marked in italics
- Customizable zone ordering (done via drag+drop on the settings page)
- On debian, run the following command (after updating):
# apt install apache2 php libapache2-mod-php php-mysql composer mariadb-server cron
- Make sure "AllowOverride" in
/etc/apache/apache2.conf
is set toAll
- Run:
# a2enmod php
# apachectl restart
- Once you verify that apache is running properly, navigate to your phpmyadmin page, and create a database called
SQLSprinkler
- (Recommended) You may wish to create a user that only has access to this database.
- The user must have INSERT, UPDATE, DELETE, SELECT and CREATE permissions.
- Update the
.env-sample
file to contain the username and password of the user you used to edit the database, save it as.env
. - Run
compose install
in the project root directory- You may need to install composer with the following commands if your system does not have a package for it
wget -O composer-setup.php https://getcomposer.org/installer
sudo php composer-setup.php --install-dir=/usr/bin --filename=composer
- You may need to install composer with the following commands if your system does not have a package for it
- Run
bash setup_mysql.sh
to setup the database. - Navigate to
http://localhost/SQLSprinkler
to see if the page loads. - Click on the bottom left icon, click on settings, then click on the bottom left icon again, then click the plus sign to start adding sprinkler systems.
- Run the following command
sudo apt install python3 python3-pip
- Run:
pip install pymysql python-dotenv RPi.GPIO
- Add the following line to
/etc/sudoers
:www-data ALL=NOPASSWD: /var/www/html/modules/SQLSprinkler/lib/*.py
- Run
sudo -s
- Run
su www-data -s /bin/bash
- Run
crontab -e
- Add your schedule for when you want the system to run automatically.
- If you need help, see https://crontab.guru
- Please use the following command:
sudo /var/www/html/modules/SQLSprinkler/lib/sys.py
- After the configuration of the cron tab, save and exit.
- Done!
- (Recommended) You may wish to create a user that only has access to this database.
- Write a script to run setup automatically.
- Add a user to run python commands.
- Add a day schedule (like A and B days) for zones (?)
- Add a script to allow user to control when the system automatically runs (cron) (?)
- Better mobile support
- python3
- maria-db
- MySQL
- PHP7 or greater
- Composer
- MariaDB
- python-dotenv
- pymysql
- RPi.GPIO
- php-mysql
- apache2
- pip
- Cron
- jquery
- jquery ui
- Touch Punch
- w3.css
- Font Awesome
- A raspberry pi running buster or better
- A stable internet connection
- There can only be one zone running at a time.
- As of now, all zones are configured to automatically shut off if turned on from the web page after their respective run time has elapsed.
- This system relies on relays to control the sprinkler system (one relay per zone)
- General knowledge of how to wire an electrical system is required.
- Please be careful while handling electricity. I am not responsible for anything.
- General knowledge of how to wire an electrical system is required.
Copyright 2021 Gavin Pease