Advertisement
Guest User

Untitled

a guest
Mar 12th, 2020
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #your tesla account
  4. teslauser="info@yourmail.com"
  5. teslapwd="yourpassword"
  6.  
  7. #Getting Watt from KOSTAL PIKO 5.5 inverter:
  8. wget -q http://192.168.1.10/ --http-user=pvserver --http-passwd=yourpassword -O /tmp/pv.txt
  9. watt=$(grep "aktuell</td>" -A 2 /tmp/pv.txt | grep -v "aktuell" | cut -d '<' -f 1 | xargs | replace "&nbsp" "" | replace "x x x" "0")
  10. echo "Watt: $watt W"
  11.  
  12. if [ "$watt" -gt "2000" ];
  13. then
  14. echo "Charging ON ..."
  15. teslacmd -u "$teslauser" -p "$teslapwd" --charge start
  16. else
  17. echo "Charging OFF ..."
  18. teslacmd -u "$teslauser" -p "$teslapwd" --charge stop
  19. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement