Update powerwall.sh
This commit is contained in:
13
powerwall.sh
13
powerwall.sh
@@ -113,6 +113,18 @@ CHECKTEMP_SERVICE(){
|
||||
done # &
|
||||
}
|
||||
|
||||
CHECKPOWER(){
|
||||
INPUTV=$(curl -s "http://10.10.0.61/stats.json" | jq '.inputs .inV')
|
||||
INPUTA=$(curl -s "http://10.10.0.61/stats.json" | jq '.inputs .inA')
|
||||
OUTPUTV=$(curl -s "http://10.10.0.61/stats.json" | jq '.outputs .outV')
|
||||
OUTPUTA=$(curl -s "http://10.10.0.61/stats.json" | jq '.outputs .outA')
|
||||
BATTV=$(curl -s "http://10.10.0.61/stats.json" | jq '.inputs .battV')
|
||||
BATTA=$(curl -s "http://10.10.0.61/stats.json" | jq '.inputs .xfA')
|
||||
echo "Input Power: ${INPUTV}V / ${INPUTA}A"
|
||||
echo "Output Power: ${OUTPUTV}V / ${OUTPUTA}A"
|
||||
echo "Battery Power: ${BATTV}V / ${BATTA}A"
|
||||
}
|
||||
|
||||
CHECKACV_SERVICE(){
|
||||
voltstatus=0
|
||||
battstatus=0
|
||||
@@ -272,6 +284,7 @@ if [ ${action-x} ]; then
|
||||
startall) STARTALL_SERVICES;;
|
||||
restartall) RESTART_SERVICES;;
|
||||
checktemp) CHECKTEMP ${2};;
|
||||
checkpower) CHECKPOWER;;
|
||||
checktemp_service)
|
||||
if [ "${2}" = "stop" ]; then
|
||||
STOP_SERVICE ${3}
|
||||
|
||||
Reference in New Issue
Block a user