- 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.
- 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.