Skip to content
A Golang command line application to remind you to charge your Tesla vehicle based on GeoFencing.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



A Golang program to connect to a Tesla vehicle, determine if it's within a GeoFence, and once it enters, if it's not plugged in, send an email alert.

Given a account, interval, coordinates, and radius, it connects to the Tesla RESTful API, and determines the vehicles location and charging state.

The command line args are specified via minus sign, argname, equal sign, value.

You must first go on Google Maps or LatLong and get the Longitude and Latitude of the center point of your charging destination.


Install Go and Git if you don't have them. Go can be tricky with paths. Type $ go env and then $ cd into directory in $GOROOT/src. Clone this repository from within the src directory.

$ git clone

$ cd TeslaCommand

Below is an example run. The long/lat is for the Tesla Hawthorne, CA Supercharger (replace with your own values):

$ go run TeslaCommand.go -checkInterval=300 -fromAddress="" -geoFenceLatitude=33.921063 -geoFenceLongitude=-118.33015434 -mailServer="" -mailServerLogin="" -mailServerPassword="the-gmail-password" -mailServerPort=587 -radius=200 -teslaLoginEmail="" -teslaLoginPassword="the-teslamotors-password" -toAddress="" -vehicleIndex=0

Please see the "Issues" link for a list of "TO DO" items. It's a work in progress... :-)

You can’t perform that action at this time.