Update powerwall.sh

This commit is contained in:
2023-10-31 20:34:41 -05:00
parent 60e99dcd54
commit 58c51c22cf

View File

@@ -505,11 +505,8 @@ DAILYTEMP(){
}
GETHOSTPOWER(){
echo "HERE1: ${1}"
hostip=${PW_iDRACHOST_SHORTNAMES[${1}]}
echo "HERE2: $hostip"
hostip=${PW_HOST_ADDRESSES[${hostip}]}
echo "HERE3: $hostip"
if [ "$(CHECK_HOST ${hostip})" != "false" ]; then
if [ "${1}" == "10.10.2.26" ]; then
temp=0
@@ -536,19 +533,20 @@ check_GETHOSTPOWER(){
CHECKPOWER(){
start=`date +%s`
rm -f ${PW_TMPFOLDER}/*.hostpower*
echo -e "\n${idsCL[Yellow]}Power Information"
DIVIDER . yellow 75
if [ "${1}" == "" ] || [ "${1}" == "sensors" ]; then
rm -f ${PW_TMPFOLDER}/*.hostpower*
if [ "${1}" == "" ] || [ "${1}" == "hosts" ]; then
for SENSOR in ${PW_SENSOR_ORD[@]}; do
if [ "${PW_HOST_IDRACS[${SENSOR}]}" != "" ]; then
GETHOSTPOWER ${PW_HOST_IDRACS[${SENSOR}]} &
fi
done
check_GETHOSTPOWER &
fi
if [ "${1}" == "" ] || [ "${1}" == "sensors" ]; then
if [ "$(CHECK_HOST inv1.scity.us)" != "false" ]; then
INVSTATSINFO=$(curl -s "https://inv1.scity.us/stats.json")
INPUTV=`echo ${INVSTATSINFO} | jq '.inputs .inV'`