How I transfer excess power from my Powerwall to my Tesla Model S
One of the missing features from the #tesla software is the ability to easily move stored power from a Powerwall house battery to your car so that you can make the most of your solar generation in the up coming day.
Thankfully #tesla allow access to the owners API that lets us automate the Model S. Basically early each morning if the forecast for the day indicates it'll be somewhat sunny I will have my home automation system run the following command:
tesla 90
while true; do
if [[ $(curl -s http://tesla-eg/api/system_status/soe | jq '.percentage|floor') -lt 10 ]]
then
tesla stop
break
else
sleep 10
fi
done
What this does is move all but 10% of the power in my Powerwall into my car. This leaves me with 10% to do the morning routine (coffee, breakfast, etc.). The tesla
command you see in that script is one I wrote that can send some simple instructions to my car. tesla 90
tells the car to try and charge to 90%
state of charge (the ideal daily charge to aim for) and the tesla stop
tells it to stop charging. Pretty straight forward. The source code for the tesla
command is available on github.
Doing this simple step each morning ensures I self consume as much of my own solar power as possible and reduces my carbon footprint. In summer my solar system generates enough power to completely power my house and all the daily commute style driving I do. If I drive to Melbourne I do need to use the Supercharger network but thankfully they are 100% renewable powered :)
Photo: Taken by me of my Tesla at sunset at the Hornsdale Windfarm where the worlds biggest battery was recently unveiled
Nice information! I didn't know that Tesla offers access to an API.