Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #your tesla account
- teslauser="info@yourmail.com"
- teslapwd="yourpassword"
- #Getting Watt from KOSTAL PIKO 5.5 inverter:
- wget -q http://192.168.1.10/ --http-user=pvserver --http-passwd=yourpassword -O /tmp/pv.txt
- watt=$(grep "aktuell</td>" -A 2 /tmp/pv.txt | grep -v "aktuell" | cut -d '<' -f 1 | xargs | replace " " "" | replace "x x x" "0")
- echo "Watt: $watt W"
- if [ "$watt" -gt "2000" ];
- then
- echo "Charging ON ..."
- teslacmd -u "$teslauser" -p "$teslapwd" --charge start
- else
- echo "Charging OFF ..."
- teslacmd -u "$teslauser" -p "$teslapwd" --charge stop
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement