There are a number of prerequisite items required to get started.
-
Amazon Web Services Account - sign up at AWS Console.
- YES use the same account as your Amazon.com shopping account.
- DO enable multi-factor authentication such as the Authy app to protect your account and your car
- FREE TIER should be sufficient for your development and day-to-day use.
-
Purchase an Amazon IOT Button
-
Install Go Language
-
Install deps
-
Clone this repo
$GOPATH/src/github.com/stephbu/teslaiotkey
Project has a makefile in the root of the repo $REPO/make currently I've only validated the Makefile on OS/X
-
HELP: welcome PRs to make build and CI work for other OS's/Platforms
-
Expects completely packaged Unix binaries in zip form.
-
binaries dropped as
$REPO/bin/Handle
-
zipped binaries dropped as
$REPO/bin/Handle.zip
Follow steps in packaging.
- Register Device using Amazon IOT phone app.
- Setup button Wifi network connection.
- Test your device at Amazon IOT Portal
HELP Open issue to write scripts to install and configure the Lambda function, create test event etc.
HELP Open issue to enable KMS storage of password blob
-
Create new function in Lambda console
-
Add IOT Trigger
-
Upload zip function code
- from Building Binaries step
- Go Runtime 1.x
- function name
Handle
-
Add environment variables (no quotes, no leading/trailing spaces)
TESLA_VIN=13 character Vehicle VIN Number e.g. 5YJ3E1EB3JFxxxxxx TESLA_USERNAME=your tesla account username e.g. test@gmail.com TESLA_PASSWORD=your tesla password e.g. Password1! FENCE_LATLONG=homelat,homelong e.g. 47.629272,-122.147589 FENCE_RADIUS=activationDistance(meters) e.g. 30
-
Configure Basic Settings
- Memory: 256Mb should be plenty
- Timeout: set this to a max of 1min 30sec
-
Create test event
{ "SerialNumber": "G012345678901234", "ClickType": "SINGLE", "BatteryVoltage": "1592mV" }
-
Save everything.
-
Hit Test - your car should unlock.