IoT Button – Lambda Function package to unlock Tesla

  • Version
  • Download 56
  • File Size 1.47 MB
  • File Count 1
  • Create Date September 15, 2018
  • Last Updated September 15, 2018

IoT Button - Lambda Function package to unlock Tesla

Lambda function package that executes when a IoT button is pressed, essentially making the IoT Button as a "key fob" for a Tesla. Quite handy for a Model 3, which as of this writing does not have a key fob. You can see this post for an example and more details.

The zip file contains the lambda function package and the dependencies (internally it calls the TeslaJS library to make the Tesla API calls to talk to the car). You don't need to unzip this, but you can upload this as a zip file to a AWS lambda console that you configure to do actions against the IoT button.

Note:

  • This is not the asynchronous version of the API call - which means it make a blocking call - which in our use case isn't necessarily a bad thing.
  • If the car is sleeping, executing this one, wakes it up but does not execute the function/code you were trying; and then a second time (now that the car is awake) would execute it. For example in the morning, to unlock the car, we need to press the button twice, but not in quick succession. The second one, once we know the car is awake.

Published by

Amit Bahree

This blog is my personal blog and while it does reflect my experiences in my professional life, this is just my thoughts. Most of the entries are technical though sometimes they can vary from the wacky to even political – however that is quite rare. Quite often, I have been asked what’s up with the “gibberish” and the funny title of the blog? Some people even going the extra step to say that, this is a virus that infected their system (ahem) well. [:D] It actually is quite simple, and if you have still not figured out then check out this link – whats in a name?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.