diff --git a/powerwall.sh b/powerwall.sh index 4886365b..005af99e 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -168,7 +168,7 @@ NORMAL TEMP: ${temp_f}'F" last_temp[${SENSOR}]=1 fi - [ -f ${TMPFOLDER}/${SENSOR}.insert ] && errtime=$(expr `date +%s` - $(stat -c %Y ${TMPFOLDER}/${SENSOR}.insert)) || errtime=0 + [ -f ${TMPFOLDER}/${SENSOR}.insert ] && errtime=$(expr `date +%s` - $(stat -c %Y ${TMPFOLDER}/${SENSOR}.insert)) || errtime=100000 if [ ${errtime} -ge 300 ]; then if [ "${temp_h}" != "" ]; then QRY="USE servermonitor; INSERT INTO sensor_data (\`sensorid\`, \`date\`, \`temp\`, \`hum\`) VALUES ('${SENSOR_ID[${SENSOR}]}','${datetime}','${temp_f}','${temp_h}')"