Aggiunto informazioni della versione in json_status
This commit is contained in:
10
CHANGELOG.md
10
CHANGELOG.md
@@ -1,6 +1,12 @@
|
|||||||
## 0.1 - 18/12/2015 - First release
|
## 0.2 - xx/xx/2017
|
||||||
First release to piGarden
|
Implementation of socket server fot 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
|
## 0.1.1 - 24/12/2015 - BugFix
|
||||||
Fix the problem for 'av_status' parameter
|
Fix the problem for 'av_status' parameter
|
||||||
|
|
||||||
|
## 0.1 - 18/12/2015 - First release
|
||||||
|
First release to piGarden
|
||||||
|
|
||||||
|
|||||||
11
piGarden.sh
11
piGarden.sh
@@ -418,6 +418,7 @@ function list_alias {
|
|||||||
function json_status {
|
function json_status {
|
||||||
local json=""
|
local json=""
|
||||||
local json_last_weather_online="\"\""
|
local json_last_weather_online="\"\""
|
||||||
|
local json_version="\"version\":{\"ver\":$VERSION,\"sub\":$SUB_VERSION,\"rel\":$RELEASE_VERSION}"
|
||||||
local json_error="\"error\":{\"code\":0,\"description\":\"\"}"
|
local json_error="\"error\":{\"code\":0,\"description\":\"\"}"
|
||||||
local last_rain_sensor="";
|
local last_rain_sensor="";
|
||||||
local last_rain_online="";
|
local last_rain_online="";
|
||||||
@@ -496,7 +497,7 @@ function json_status {
|
|||||||
fi
|
fi
|
||||||
local json_cron="\"cron\":{$json_get_cron}"
|
local json_cron="\"cron\":{$json_get_cron}"
|
||||||
|
|
||||||
json="{$json,$json_last_weather_online,$json_error,$json_last_info,$json_last_warning,$json_last_success,$json_last_rain_online,$json_last_rain_sensor,$json_cron}"
|
json="{$json_version,$json,$json_last_weather_online,$json_error,$json_last_info,$json_last_warning,$json_last_success,$json_last_rain_online,$json_last_rain_sensor,$json_cron}"
|
||||||
|
|
||||||
echo "$json"
|
echo "$json"
|
||||||
|
|
||||||
@@ -1097,8 +1098,8 @@ function socket_server_command {
|
|||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
add_cron_open)
|
add_cron_open)
|
||||||
local vret=""
|
local vret=""
|
||||||
|
|
||||||
vret=`add_cron_open "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7"`
|
vret=`add_cron_open "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7"`
|
||||||
|
|
||||||
@@ -1162,6 +1163,10 @@ function debug2 {
|
|||||||
. "$DIR_SCRIPT/debug/debug1.sh"
|
. "$DIR_SCRIPT/debug/debug1.sh"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VERSION=0
|
||||||
|
SUB_VERSION=2
|
||||||
|
RELEASE_VERSION=0
|
||||||
|
|
||||||
DIR_SCRIPT=`dirname $0`
|
DIR_SCRIPT=`dirname $0`
|
||||||
NAME_SCRIPT=${0##*/}
|
NAME_SCRIPT=${0##*/}
|
||||||
CONFIG_ETC="/etc/piGarden.conf"
|
CONFIG_ETC="/etc/piGarden.conf"
|
||||||
|
|||||||
Reference in New Issue
Block a user