Add command last_rain_sensor_timestamp, last_rain_online_timestamp, reset_last_rain_sensor_timestamp, reset_last_rain_online_timestamp. Add socket server api for reset_last_rain_sensor_timestamp, reset_last_rain_online_timestamp

This commit is contained in:
lejubila
2021-08-10 23:39:38 +02:00
parent 5152252653
commit 7242b1c2ab
4 changed files with 72 additions and 1 deletions

View File

@@ -240,6 +240,19 @@ function socket_server_command {
nohup $PATH_SCRIPT poweroff > /dev/null 2>&1 &
;;
reset_last_rain_sensor_timestamp)
reset_last_rain_sensor_timestamp
message_write "success" "Timestamp of last sensor rain successfull reset"
json_status
;;
reset_last_rain_online_timestamp)
reset_last_rain_online_timestamp
message_write "success" "Timestamp of last online rain successfull reset"
json_status
;;
*)
json_error 0 "invalid command"
;;