Skip to content

Latest commit

 

History

History
68 lines (55 loc) · 2.52 KB

INSTALLATION.md

File metadata and controls

68 lines (55 loc) · 2.52 KB

Installation

Prerequisites

There are a number of prerequisite items required to get started.

  1. 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.
  2. Purchase an Amazon IOT Button

  3. Install Go Language

  4. Install deps

  5. Clone this repo

    • $GOPATH/src/github.com/stephbu/teslaiotkey

Building Binaries

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

Configure IOT Device

Follow steps in packaging.

  1. Register Device using Amazon IOT phone app.
  2. Setup button Wifi network connection.
  3. Test your device at Amazon IOT Portal

Create Lambda Function

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

  1. Create new function in Lambda console

  2. Add IOT Trigger

  3. Upload zip function code

    • from Building Binaries step
    • Go Runtime 1.x
    • function name Handle
  4. 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
    
  5. Configure Basic Settings

    • Memory: 256Mb should be plenty
    • Timeout: set this to a max of 1min 30sec
  6. Create test event

    {
      "SerialNumber": "G012345678901234",
      "ClickType": "SINGLE",
      "BatteryVoltage": "1592mV"
    }
    
  7. Save everything.

  8. Hit Test - your car should unlock.