Update powerwall.sh
This commit is contained in:
@@ -16,11 +16,11 @@ source /opt/idssys/defaults/default.inc
|
|||||||
GETTEMP(){
|
GETTEMP(){
|
||||||
echo ${SENSOR_MQTTID[$1]}
|
echo ${SENSOR_MQTTID[$1]}
|
||||||
mqtt_message=`mosquitto_sub -h 10.10.1.180 -t tasmota/discovery/${SENSOR_MQTTID[$1]}/sensors -u homeassistant -P 12home34assistant56 -C 1`
|
mqtt_message=`mosquitto_sub -h 10.10.1.180 -t tasmota/discovery/${SENSOR_MQTTID[$1]}/sensors -u homeassistant -P 12home34assistant56 -C 1`
|
||||||
echo $payload
|
echo $mqtt_message
|
||||||
echo $payload | cut -d':' -f 7 | cut -d',' -f 1 | read temp_c
|
echo $mqtt_message | cut -d':' -f 7 | cut -d',' -f 1 | read temp_c
|
||||||
temp_f=`echo "scale=2; $temp*1.8 + 32" | bc`
|
temp_f=`echo "scale=2; $temp*1.8 + 32" | bc`
|
||||||
|
|
||||||
echo "$temp_c -> $tempf"
|
echo "$temp_c -> $temp_f"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user