update
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
VERS='2.6.91-04102024'
|
VERS='2.6.92-04102024'
|
||||||
|
|
||||||
noheader=' update service dailytemp confsync -r -report '
|
noheader=' update service dailytemp confsync -r -report '
|
||||||
|
|
||||||
|
|||||||
@@ -698,7 +698,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
|||||||
|
|
||||||
|
|
||||||
if [ -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ] || [ -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
|
if [ -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ] || [ -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
|
||||||
if [ -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ]; then
|
if [ -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ] || [ -f ${PW_TMPFOLDER}/${SENSOR}.restart ]; then
|
||||||
SENDNOTICE "${SENSOR} Data" "${SENSOR} is reporting data again"
|
SENDNOTICE "${SENSOR} Data" "${SENSOR} is reporting data again"
|
||||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSOR} - Sensor is reporting data again" >> ${logtemp}
|
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSOR} - Sensor is reporting data again" >> ${logtemp}
|
||||||
fi
|
fi
|
||||||
@@ -983,11 +983,11 @@ Previous Temp: ${last_temp}${GAUGESH}"
|
|||||||
|
|
||||||
elif [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSOR}-error.reading)) -ge 60 ]; then
|
elif [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSOR}-error.reading)) -ge 60 ]; then
|
||||||
if [ "${SENSOR}" == "ServerRoomTemp" ] && ([ ! -f ${PW_TMPFOLDER}/${SENSOR}.restart ] || ([ -f ${PW_TMPFOLDER}/${SENSOR}.restart ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSOR}.restart)) -ge 900 ])); then
|
if [ "${SENSOR}" == "ServerRoomTemp" ] && ([ ! -f ${PW_TMPFOLDER}/${SENSOR}.restart ] || ([ -f ${PW_TMPFOLDER}/${SENSOR}.restart ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSOR}.restart)) -ge 900 ])); then
|
||||||
|
touch ${PW_TMPFOLDER}/${SENSOR}.restart
|
||||||
SENDNOTICE "Restarting TG-Outlet-2 to restart ServerRoomTemp" "ERROR reading ServerRoomTemp"
|
SENDNOTICE "Restarting TG-Outlet-2 to restart ServerRoomTemp" "ERROR reading ServerRoomTemp"
|
||||||
RUN=$(curl -m 8 -s -H "Authorization: Bearer ${PW_ESPHOME_API}" -H "Content-Type: application/json" -d '{"entity_id": "switch.smart_15em_plug_in_2_socket"}' http://10.10.1.180:8123/api/services/switch/turn_off)
|
RUN=$(curl -m 8 -s -H "Authorization: Bearer ${PW_ESPHOME_API}" -H "Content-Type: application/json" -d '{"entity_id": "switch.smart_15em_plug_in_2_socket"}' http://10.10.1.180:8123/api/services/switch/turn_off)
|
||||||
sleep 2s
|
sleep 2s
|
||||||
RUN=$(curl -m 8 -s -H "Authorization: Bearer ${PW_ESPHOME_API}" -H "Content-Type: application/json" -d '{"entity_id": "switch.smart_15em_plug_in_2_socket"}' http://10.10.1.180:8123/api/services/switch/turn_on)
|
RUN=$(curl -m 8 -s -H "Authorization: Bearer ${PW_ESPHOME_API}" -H "Content-Type: application/json" -d '{"entity_id": "switch.smart_15em_plug_in_2_socket"}' http://10.10.1.180:8123/api/services/switch/turn_on)
|
||||||
touch ${PW_TMPFOLDER}/${SENSOR}.restart
|
|
||||||
|
|
||||||
elif [ ! -f ${PW_TMPFOLDER}/${SENSOR}.disable ] && ([ ! -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ] || ([ -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSOR}-error.sent)) -ge $(echo "scale=0; ${PW_RENOTIFY_TIMEOUT}*60" | bc) ])); then
|
elif [ ! -f ${PW_TMPFOLDER}/${SENSOR}.disable ] && ([ ! -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ] || ([ -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/${SENSOR}-error.sent)) -ge $(echo "scale=0; ${PW_RENOTIFY_TIMEOUT}*60" | bc) ])); then
|
||||||
touch ${PW_TMPFOLDER}/${SENSOR}-error.sent
|
touch ${PW_TMPFOLDER}/${SENSOR}-error.sent
|
||||||
|
|||||||
Reference in New Issue
Block a user