Coder Social home page Coder Social logo

teslalexa's Introduction

Teslalexa npm

Control your Tesla from Alexa. Uses the Tesla JSON API.

Prerequisites

Install

Yes, I know this is huge. I'm looking to automate this more in the future. PRs to help are appreciated!

  1. Go to the Releases tab and download the zip or tar.gz of the latest release.
  2. Unzip to somewhere and open up a terminal console in that location.
  3. Run npm install to obtain any dependencies.
  4. In AWS, create a function in Lambda:
  5. Choose the Blank Function blueprint.
  6. Select Alexa Skills Kit as your trigger.
  7. Name the function TeslaControl and make sure the Runtime is Node 4.3.
  8. Leave the code section alone.
  9. Set the following Environment Variables: - TESLA_EMAIL - Your tesla.com email address - TESLA_PASS - Your tesla.com password - TESLA_VIN - The VIN of the vehicle you want to control - TESLA_CLIENT_ID - You can get these two here - TESLA_CLIENT_SECRET
  10. Under Role, Create a new role from a template. Name it TeslaControl and choose the Simple Microservice permission.
  11. Create the function and grab the ARN from the top right of the screen.
  12. Head over to the IAM section of the AWS Console and go to Roles.
  13. Select the TeslaControl role and click on the policy that starts with AWSLambdaMicroserviceExecutionRole-.
  14. Edit the policy and change the Action section it so it reads:
"Action": [
    "dynamodb:*"
]
  1. Validate the policy to be sure it's right and Save it.
  2. In the Amazon Developers Console, create a new Alexa skill:
  3. The Skill Type is Custom Interaction Model, you can name it whatever you want, and the Invocation Name should be "my car" ("my Tesla" will also work. I wouldn't recommend "my Model S")
  4. In the Interaction Model tab, copy the contents of intents.json into the Intent Schema, and utterances.txt into the Sample Utterances box.
  5. Create two Custom Slot Types: - LOCK_UNLOCK lock unlock - START_STOP start stop
  6. On the Configuration tab, choose the AWS Lambda ARN as Service Endpoint Type, region of North America, and enter the ARN from the AWS Lamda function you created.
  7. On the Test tab, it should be enabled for testing on your account.
  8. Grab the ID at the top of the page (starts with amzn1.ask.skill).
  9. Head back to the AWS Lambda function you created and add a new APP_ID environment variable with the Skill ID you just copied.
  10. Back in the terminal console, run npm run lambda to publish the code to your Lambda function.
  11. Back in the Amazon Developer Console, you should be able to test with an utterance of "Tell my car to log in" and get back some code that says something about being logged in.
  12. Also run "Tell my car to get vehicle" to make sure it can find your vehicle.

teslalexa's People

Contributors

timdorr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

funkytaco jonekee

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.