Giter VIP home page Giter VIP logo

teslaiotkey's Introduction

Tesla IOT Key

Home | Installation | Development Notes | Licence

Overview

Goal of this project is to create some code to support using a smart-button to unlock a Tesla parked within a geofence boundary.

Problem Statement

When I leave for work, I need to unplug my Tesla, however this cannot be done until the car is awoke and unlocked e.g. by opening the door, or using the app to unlock and wake the car, then walking back to unplug the car.

Further still I only want this button to function while the car is in the garage or near the house. I do not want the car to unlock when it is not at home.

Requirements

  • Enable a smart-button to unlock Tesla cars
  • Prevent the car from being unlocked when out of eye-sight from my house or garage.
  • Be robust enough to function every day without fail
  • Be cheap enough to use everyday

Solution Overview

Use an Amazon IoT button to send a message to unlock the Tesla via the Tesla API.

The code inside of this repository contains a basic implementation of a Lambda function to respond to Amazon IOT Button, and its related IoTButtonEvent.

architecture

Licence

This project is licensed under the terms of the MIT license. See the LICENSE file.

This project is in no way affiliated with Tesla Inc. This project is open source under the MIT license, which means you have full access to the source code and can modify it to fit your own needs.

References

Tesla API Reference

Geographic Coordinate System

Amazon IOT Button Gen.2

AWS Lambda Golang Reference

AWS Lambda Deployment Package in Go

IotButtonEvent Sample

teslaiotkey's People

Contributors

stephbu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

teslaiotkey's Issues

CI Build

Creat appveyor config to build release and debug binaries, run CI test suite

Support Mapping Tesla Commands To Button ClickTypes

Configuration and commands to map IOT Button actions like SINGLE and DOUBLE to other commands such as open frunk. e.g.

actions = {
"SINGLE":"unlock",
"DOUBLE":"openfrunk",
"LONG":"opentrunk"
}

TODO: Implement configuration structure and deserializer
TODO: Implement command map array and function binder
TODO: Implement open frunk
TODO: Implement open trunk
TODO: Implement turn on climate

Script to install/config release binary into Lambda

Write a script that can:

  • Upload a build from ./bin directory to S3
  • Assert existence of Lambda execution roles and policies
  • Assert existence of Lambda Function referring uploaded build
  • Assert existence of Test Payload
    == cut line ==
  • Smoke test Lambda Handler and check for success

handler.go init function not getting called in Lambda function

Code which worked fine on the test harness is not invoking handler:: init function when run in AWS lambda function. Task is to investigate why lambda does not invoke the function before calling the handler. Suspect only main::init is getting invoked.

Secure Password Storage in KMS

Use KMS to carry encrypted version of the password.
Use KMS API to decipher encrypted secret.
Create script to encode and store password in KMS

VIN to Device Serial mapping

Enable multiple devices to be handled by the same lambda instance/configuration by assigning VIN numbers to specific devices in configuration.

Wakeup Timeout

Change wakeup timeout to be configurable, and set startup default to longer than maximum timeout at 15 second.

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.