Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9743198315 | ||
|
|
2889758b28 | ||
|
|
477f2b15a0 | ||
|
|
973bcf0b3d | ||
|
|
95199d2bb1 | ||
|
|
2fc1c04f3d | ||
|
|
ff608dc8d9 | ||
|
|
8b55f1526a | ||
|
|
6bcdea07e2 | ||
|
|
73364decda | ||
|
|
50489dc61a | ||
|
|
285cda3caf | ||
|
|
6100686f5b | ||
|
|
7c7c565a0b | ||
|
|
e5ec446a0d | ||
|
|
e113af429b | ||
|
|
3b45d068a8 | ||
|
|
750ca9c66e | ||
|
|
a58fe0b3e7 | ||
|
|
3001d705f9 | ||
|
|
0d646c3fec |
28
CHANGELOG.md
28
CHANGELOG.md
@@ -1,2 +1,30 @@
|
|||||||
|
## 0.3.1 - 13/05/2017
|
||||||
|
Add experimental support for monostable solenoid valve:
|
||||||
|
- define in your config file the variable EV_MONOSTABLE and assign value 1
|
||||||
|
- if the solenoid valves close instead of opening and vice versa, reverse the values of the RELE_GPIO_CLOSE and RELE_GPIO_OPEN variables in your configuration file
|
||||||
|
|
||||||
|
## 0.3.0 - 07/05/2017
|
||||||
|
Add command "open_in" for scheduling on the fly the opens/close a solenoid
|
||||||
|
Add command "del_cron_open_in" for delete scheduling the fly the opens/close a solenoid
|
||||||
|
Add api in socket server for command open_in and delete_cron_open_in
|
||||||
|
Fix minor bug on command "open"
|
||||||
|
Changed the path of some temporary files to prevent sd card faults
|
||||||
|
|
||||||
|
## 0.2.2 - 25/04/2017
|
||||||
|
Fix bug: if it's reining, the solenoid valves were also closed even if they were pushed open in "force" mode
|
||||||
|
|
||||||
|
## 0.2.1 - 22/04/2017
|
||||||
|
Add installation instructions in README.md file
|
||||||
|
|
||||||
|
## 0.2 (Easter egg) - 17/04/2017
|
||||||
|
Implementation of socket server for communicate with piGardenWeb
|
||||||
|
Implementation of messages (error, warning, success) passed to piGardenWeb
|
||||||
|
Added many information in json status to be passed to piGardenWeb
|
||||||
|
Added management cron for scheduling open and closed solenoid, for initialize control unit, for rain control
|
||||||
|
|
||||||
|
## 0.1.1 - 24/12/2015 - BugFix
|
||||||
|
Fix the problem for 'av_status' parameter
|
||||||
|
|
||||||
## 0.1 - 18/12/2015 - First release
|
## 0.1 - 18/12/2015 - First release
|
||||||
First release to piGarden
|
First release to piGarden
|
||||||
|
|
||||||
|
|||||||
61
README.md
61
README.md
@@ -1,4 +1,4 @@
|
|||||||
## piGarden
|
# piGarden
|
||||||
|
|
||||||
Bash script to manage an irrigation system built with a Raspberry Pi
|
Bash script to manage an irrigation system built with a Raspberry Pi
|
||||||
|
|
||||||
@@ -9,3 +9,62 @@ Documentation of piGarden and build system irrigation with Raspberry Pi can be f
|
|||||||
## License
|
## License
|
||||||
|
|
||||||
This script is open-sourced software under GNU GENERAL PUBLIC LICENSE Version 2
|
This script is open-sourced software under GNU GENERAL PUBLIC LICENSE Version 2
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
1) Installs the necessary packages on your terminal:
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
sudo apt-get install git curl gzip grep sed ucspi-tcp
|
||||||
|
```
|
||||||
|
|
||||||
|
2) Compile and install Jq (commandline JSON processor):
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
cd
|
||||||
|
sudo apt-get install flex -y
|
||||||
|
sudo apt-get install bison -y
|
||||||
|
sudo apt-get install gcc -y
|
||||||
|
sudo apt-get install make -y
|
||||||
|
sudo apt-get install autotools -y
|
||||||
|
sudo apt-get install dh-autoreconf -y
|
||||||
|
wget https://github.com/stedolan/jq/releases/download/jq-1.5/jq-1.5.tar.gz
|
||||||
|
tar xfvz jq-1.5.tar.gz
|
||||||
|
cd jq-1.5
|
||||||
|
autoreconf -i
|
||||||
|
./configure --disable-maintainer-mode
|
||||||
|
make
|
||||||
|
sudo make install
|
||||||
|
```
|
||||||
|
|
||||||
|
3) Compile and install gpio program from WiringPi package:
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
cd
|
||||||
|
git clone git://git.drogon.net/wiringPi
|
||||||
|
cd wiringPi
|
||||||
|
git pull origin
|
||||||
|
./build
|
||||||
|
```
|
||||||
|
|
||||||
|
4) Download and install piGarden in your home
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
cd
|
||||||
|
git clone https://github.com/lejubila/piGarden.git
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Copy configuration file in /etc
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd
|
||||||
|
sudo cp piGarden/conf/piGarden.conf.example /etc/piGarden.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
Customize the configuration file.
|
||||||
|
For more information see
|
||||||
|
[www.lejubila.net/2015/12/impianto-di-irrigazione-con-raspberry-pi-pigarden-lo-script-di-gestione-quinta-parte/](https://www.lejubila.net/2015/12/impianto-di-irrigazione-con-raspberry-pi-pigarden-lo-script-di-gestione-quinta-parte/)
|
||||||
|
and
|
||||||
|
[www.lejubila.net/2017/04/pigarden-0-2-easter-egg/](https://www.lejubila.net/2017/04/pigarden-0-2-easter-egg/)
|
||||||
|
|||||||
@@ -14,15 +14,40 @@ JQ="/usr/local/bin/jq"
|
|||||||
# Percorso curl
|
# Percorso curl
|
||||||
CURL="/usr/bin/curl"
|
CURL="/usr/bin/curl"
|
||||||
|
|
||||||
# Percors wc
|
# Percorso wc
|
||||||
WC="/usr/bin/wc"
|
WC="/usr/bin/wc"
|
||||||
|
|
||||||
# Percorso gzip
|
# Percorso gzip
|
||||||
GZIP="/bin/gzip"
|
GZIP="/bin/gzip"
|
||||||
|
|
||||||
# Percors mv
|
# Percorso mv
|
||||||
MV="/bin/mv"
|
MV="/bin/mv"
|
||||||
|
|
||||||
|
# Percorso di tr
|
||||||
|
TR="/usr/bin/tr"
|
||||||
|
|
||||||
|
# Percorso di cut
|
||||||
|
CUT="/usr/bin/cut"
|
||||||
|
|
||||||
|
# Percorso tcpserver
|
||||||
|
TCPSERVER="/usr/bin/tcpserver"
|
||||||
|
|
||||||
|
# Percorso cron
|
||||||
|
CRONTAB="/usr/bin/crontab"
|
||||||
|
|
||||||
|
# Percorso grep
|
||||||
|
GREP="/bin/grep"
|
||||||
|
|
||||||
|
# Percorsp sed
|
||||||
|
SED="/bin/sed"
|
||||||
|
|
||||||
|
# Percorso readlink
|
||||||
|
READLINK="/bin/readlink"
|
||||||
|
|
||||||
|
# Se impostato con il valore 1, indica che il sistema gestisce elettrovalvole monostabili,
|
||||||
|
# se impostato a 0 il sistema gestirà elettrovalvole bisstabili
|
||||||
|
EV_MONOSTABLE=0
|
||||||
|
|
||||||
# Id gpio usati per simulare il doppio deviatore con cui eseguire l'alimentazione alle elettrovalvole
|
# Id gpio usati per simulare il doppio deviatore con cui eseguire l'alimentazione alle elettrovalvole
|
||||||
SUPPLY_GPIO_1=2
|
SUPPLY_GPIO_1=2
|
||||||
SUPPLY_GPIO_2=3
|
SUPPLY_GPIO_2=3
|
||||||
@@ -82,3 +107,7 @@ NOT_IRRIGATE_IF_RAIN_ONLINE=86400
|
|||||||
# Il parametro è simile a quello precedente, il controllo però anziché essere fatto attingendo a wunderground, viene eseguito direttamente sul sensore se installato. Inserendo il valore zero non viene eseguito nessun controllo.
|
# Il parametro è simile a quello precedente, il controllo però anziché essere fatto attingendo a wunderground, viene eseguito direttamente sul sensore se installato. Inserendo il valore zero non viene eseguito nessun controllo.
|
||||||
NOT_IRRIGATE_IF_RAIN_SENSOR=86400
|
NOT_IRRIGATE_IF_RAIN_SENSOR=86400
|
||||||
|
|
||||||
|
# Indirizzo ip e porta di ascolto del socket server
|
||||||
|
TCPSERVER_IP="127.0.0.1"
|
||||||
|
TCPSERVER_PORT="8084"
|
||||||
|
|
||||||
|
|||||||
1122
piGarden.sh
1122
piGarden.sh
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user