Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 24 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ This software and documentation do not come from Tesla Motors Inc.
Use these programs at your own risk. The authors do not guaranteed the proper functioning of these applications. This code attempts to use the same interfaces used by the official Tesla phone apps. However, it is possible that use of this code may cause unexpected damage for which nobody but you are responsible. Use of these functions can change the settings on your car and may have negative consequences such as (but not limited to) unlocking the doors, opening the sun roof, or reducing the available charge in the battery.

#Contributors
[Joe Pasqua](https://github.com/jpasqua)
Joe Pasqua (https://github.com/jpasqua ): Author
Sune Jakobsson (https://github.com/sunejak ): Bug Fixes

[Greyson Fischer](https://github.com/greyson)

[Sune Jakobsson](https://github.com/greyson)

# Preparing your build environment (gradle)

The following command will resolve and download all dependencies, set
Expand All @@ -43,14 +46,14 @@ This project assumes a directory structure that looks like this:
src
ThirdParty -- A repository for third party library dependencies
apache
commons-codec-1.10
commons-lang3-3.3.2
commons-codec-1.9
commons-lang3-3.3
commons-logging-1.1.3
geocoder
google-gson-2.2.4
resty

The Tesla/TeslaClient directory corrsponds to this github project (TeslaClient.git).
The Tesla/TeslaClient directory corresponds to this github project (TeslaClient.git).

The following commands will create and populate the hierarchy. It assumes that:

Expand All @@ -70,16 +73,14 @@ Be sure to either set these variables or adapt the commands below:
git clone https://github.com/jpasqua/TeslaClient.git

# Download the apache libraries
cd $ROOT/ThirdParty/apache
curl -s -O http://www.eng.lsu.edu/mirrors/apache/commons/codec/binaries/commons-codec-1.10-bin.zip
unzip commons-codec-1.10-bin.zip
rm commons-codec-1.10-bin.zip
cd ThirdParty/apache
wget http://www.us.apache.org/dist//commons/codec/binaries/commons-codec-1.9-bin.zip
unzip commons-codec-1.9-bin.zip

curl -s -O http://mirror.cc.columbia.edu/pub/software/apache//commons/lang/binaries/commons-lang3-3.3.2-bin.zip
unzip commons-lang3-3.3.2-bin.zip
rm commons-lang3-3.3.2-bin.zip
wget http://www.us.apache.org/dist//commons/lang/binaries/commons-lang3-3.3-bin.zip
unzip commons-lang3-3.3-bin.zip

curl -s -O http://apache.mirrors.hoobly.com//commons/logging/binaries/commons-logging-1.1.3-bin.zip
wget http://www.us.apache.org/dist//commons/logging/binaries/commons-logging-1.1.3-bin.zip
unzip commons-logging-1.1.3-bin.zip
rm commons-logging-1.1.3-bin.zip

Expand All @@ -97,8 +98,19 @@ Be sure to either set these variables or adapt the commands below:
cd $ROOT/ThirdParty
cd resty
curl -s -O http://repo2.maven.org/maven2/us/monoid/web/resty/0.3.2/resty-0.3.2.jar
cd ..

# Create the library and test your car
cd Tesla/TeslaClient
ant run -Darg0=username -Darg1=password

# Consequent runs ( with the credential stored in cookies.txt )

ant run

#Tests and Samples
There are two test programs included in the project: <code>BasicTest</code> and <code>Interactive</code>. The former simply runs through a sequence of functions in the client library to demonstrate that it is connecting and working. The second presents an interactive shell that allows the user to issue the various commands that are available through the client library.

To use either of these programs you must have active credentials for a Tesla vehicle that has remote access enabled. If you have more than one vehicle, you may select which vehicle to use in the Interactive program. BasicTest will always use the first vehicle returned by the Tesla portal.

To compile and run "BasicTest" directly use: ant -Dapplication.args="userName passWord" run
4 changes: 3 additions & 1 deletion nbproject/build-impl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,8 @@ is divided into following sections:
<target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
<startprofiler/>
<antcall target="run"/>
<arg value="${arg0}"/>
<arg value="${arg1}"/>
</target>
<target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
Expand All @@ -1181,7 +1183,7 @@ is divided into following sections:
<target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
<startprofiler/>
<antcal target="run-test-with-main"/>
<antcall target="run-test-with-main"/>
</target>
<target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
Expand Down
13 changes: 9 additions & 4 deletions nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@ dist.jar=${dist.dir}/TeslaClient.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
file.reference.commons-codec-1.8.jar=../../ThirdParty/apache/commons-codec-1.8/commons-codec-1.8.jar
<<<<<<< HEAD
file.reference.commons-codec-1.8.jar=../../ThirdParty/apache/commons-codec-1.9/commons-codec-1.9.jar
file.reference.commons-lang3-3.1.jar=../../ThirdParty/apache/commons-lang3-3.3/commons-lang3-3.3.jar
=======
file.reference.commons-codec-1.10.jar=../../ThirdParty/apache/commons-codec-1.10/commons-codec-1.10.jar
file.reference.commons-io-2.4.jar=../../ThirdParty/apache/commons-io-2.4/commons-io-2.4.jar
file.reference.commons-lang3-3.1.jar=../../ThirdParty/apache/commons-lang3-3.1/commons-lang3-3.1.jar
file.reference.commons-lang3-3.3.2.jar=../../ThirdParty/apache/commons-lang3-3.3.2/commons-lang3-3.3.2.jar
>>>>>>> 60af0a012ad01539e8b0c8279e2c76ad39b63b8c
file.reference.commons-logging-1.1.3.jar=../../ThirdParty/apache/commons-logging-1.1.3/commons-logging-1.1.3.jar
file.reference.commons-logging-api-1.1.3.jar=../../ThirdParty/apache/commons-logging-1.1.3/commons-logging-api-1.1.3.jar
file.reference.geocoder-java-0.15.jar=../../ThirdParty/geocoder-java/geocoder-java-0.15.jar
Expand All @@ -38,8 +43,8 @@ file.reference.resty-0.3.2.jar=../../ThirdParty/resty/resty-0.3.2.jar
includes=**
jar.compress=false
javac.classpath=\
${file.reference.commons-codec-1.8.jar}:\
${file.reference.commons-lang3-3.1.jar}:\
${file.reference.commons-codec-1.10.jar}:\
${file.reference.commons-lang3-3.3.2.jar}:\
${file.reference.commons-logging-1.1.3.jar}:\
${file.reference.commons-logging-api-1.1.3.jar}:\
${file.reference.geocoder-java-0.15.jar}:\
Expand Down
Loading