diff --git a/powerwall.sh b/powerwall.sh index c263beae..0d3a86e6 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -125,8 +125,8 @@ CHECKTEMPSENSOR(){ temp_c=${temp_c%\'*}; temp_c=${temp_c#*=} elif [ "${PW_SENSOR_TYPE[${1}]}" == "remotesystem" ]; then - if [ "$(CHECK_HOST ${PW_REMOTE_SENSORS[${1}]})" != "false" ]; then - temp_c=$(ssh root@${PW_REMOTE_SENSORS[${1}]} vcgencmd measure_temp) + temp_c=$(ssh -q -o ConnectTimeout=1 -o ConnectionAttempts=1 root@${PW_REMOTE_SENSORS[${1}]} vcgencmd measure_temp) + if [ "${temp_c}" != "" ]; then temp_c=${temp_c%\'*}; temp_c=${temp_c#*=} fi