Aggiunto prima implementazione del driver sonoff_tesmota_http, aggiunto implementazione parametro EVx_MONOSTABLE per potere definire singolarmente le elettrovamvole monostabili, corretto alcuni commenti

This commit is contained in:
lejubila
2018-05-20 17:14:58 +02:00
parent 7c96a6afd1
commit 3eb45fd1e9
13 changed files with 215 additions and 5 deletions

View File

@@ -85,6 +85,8 @@ function ev_open {
local EVNORAIN=`ev_number2norain $EVNUM`
local EV_IS_REMOTE_VAR=EV"$EVNUM"_REMOTE
local EV_IS_REMOTE=${!EV_IS_REMOTE_VAR}
local EV_IS_MONOSTAVLE_VAR=EV"$EVNUM"_MONOSTABLE
local EV_IS_MONOSTAVLE=${!EV_IS_MONOSTAVLE_VAR}
if [ ! "$2" = "force" ] && [ "$EVNORAIN" != "1" ]; then
if [[ "$NOT_IRRIGATE_IF_RAIN_ONLINE" -gt 0 && -f $STATUS_DIR/last_rain_online ]]; then
@@ -132,7 +134,7 @@ function ev_open {
lock
# Gestisce l'apertura dell'elettrovalvola in base alla tipologia (monostabile / bistabile)
if [ "$EV_MONOSTABLE" == "1" ] || [ "$EV_IS_REMOTE" == "1" ]; then
if [ "$EV_MONOSTABLE" == "1" ] || [ "$EV_IS_REMOTE" == "1" ] || [ "$EV_IS_MONOSTABLE" == "1" ]; then
drv_rele_close "$g"
if [ $? -eq 1 ]; then
unlock