Apps

Commanding a Tesla Model S Using Amazon Echo (Video)

While Tesla has not released a public API for developers to date, that does not stop one from hacking on the car anyway. Over the weekend I put together a working prototype with many of my favorite technologies, including: a drone, Golang, an Amazon Echo, AWS Lambda, and, of course, a Tesla Model S.
The result is the ability to ask Alexa to pull the Tesla out of or into the garage (asking ‘KITT’ to do it of course):

 

A fun weekend project for sure, but there are a lot of security issues to address before I leave this skill enabled on my Echo. Not least is the fact my kids could have a lot of fun asking the Tesla to pull in and out of the garage repeatedly while I am fast asleep.

The day will come soon where I may also apply voice biometrics and computer vision to properly secure such a use case. Imagine the day I could ask Alexa from within my house to get my car ready. The car pulls out of the garage and adjusts its settings to my preferences based on the weather, opening my sunroof and windows on a nice sunny day. All the technologies are already here, its stringing them together just right.

We could all be Michael Knight as Tesla makes the platform ever more affordable with the Model 3 and other auto manufacturers, like GM, follow suit…

Tesla-API-AWS-Amazon-Echo-Infra

The tech behind this is all based in the cloud. I am using the Amazon Echo’s Alex Skill Kit to trigger on a keyword (‘ask KITT’) and send the resulting event to AWS Lambda. Lambda then executes my code (I built my Lambda function with Apex, which I highly recommend for anyone working with Lambda) where I use the Tesla Golang library I recently published. The Golang code on Lambda then calls the unofficial Tesla API which in turns triggers the car to take action. In this case, to open the garage door via Homelink and drive on out using the Summon capability. You may see the various code snippets needed to tie this together here. If you have a look, with the power of the cloud it is actually very little code. Amazing.

The conclusion here is that no cloud API is truly unpublished. Our friends at Tesla should work with the burgeoning developer community to open a fully supported and safe public API. The real power of any cloud-connected platform, whether it be an iPhone or an amazing electric vehicle, may only be fully realized by building and encouraging a vibrant developer ecosystem. Tesla has built the beginnings of an excellent platform, but it will take a concerted effort to attract developers to build the apps that even Elon Musk hasn’t dreamed of (yet).

Every single cloud connected platform must design for developers as first class users, just as they do for end users. Tesla and Elon, are you up for it?

Credits: A big call out to Tim Dorr, who did the original heavy lifting to reverse engineer the API and come out with the first Ruby library.

 

To Top