# AWS IoT Button Integrations



## sclyde (May 26, 2017)

In uncontrollable anticipation of my configuration invite, I decided to do a fun little project and integrate my future Model 3 with my AWS IoT button (programmable Amazon "Dash Button"). Wrote up a quick lambda function with .NET Core that sets the HVAC target temp to 72F and starts pre-conditioning on a single tap of the button, or turns off pre-conditioning on a double tap of the button.

Planning on putting the button on my nightstand to quickly start pre-conditioning the car when I wake up in the morning. I was hoping this would distract me from my several-times-a-day ritual of scouring M3OC, Twitter, and /r/teslamotors for any and all Model 3 news, but it didn't take nearly as long as I was thinking, haha.

Has anyone else done anything similar? Or have any other neat ideas for things to do on press, double press, or long press of a simple IoT button like this? I'm still 1-3 weeks (best guess) out from my config invite, so I think I'm going to move on to a simple web app to track my trips and usage.


----------



## Bokonon (Apr 13, 2017)

sclyde said:


> In uncontrollable anticipation of my configuration invite, I decided to do a fun little project and integrate my future Model 3 with my AWS IoT button (programmable Amazon "Dash Button"). Wrote up a quick lambda function with .NET Core that sets the HVAC target temp to 72F and starts pre-conditioning on a single tap of the button, or turns off pre-conditioning on a double tap of the button.


Wow, great idea! I might have to do something similar, if for no other reason than to make my wife's eyes roll. 

I presume your code uses the Tesla API to communicate with the car? Do you happen to have a link to a reference resource for that API? I haven't actually looked closely at the API before, but you've inspired me to think about what else might be possible.

Wondering in particular if you could automate the preconditioning by adding an exterior temperature sensor into the mix, so it would automatically preheat the cabin on weekdays at 8am when the temperature was below 40 degrees, for example...


----------



## sclyde (May 26, 2017)

Bokonon said:


> Wow, great idea! I might have to do something similar, if for no other reason than to make my wife's eyes roll.
> 
> I presume your code uses the Tesla API to communicate with the car? Do you happen to have a link to a reference resource for that API? I haven't actually looked closely at the API before, but you've inspired me to think about what else might be possible.
> 
> Wondering in particular if you could automate the preconditioning by adding an exterior temperature sensor into the mix, so it would automatically preheat the cabin on weekdays at 8am when the temperature was below 40 degrees, for example...


Yep! "Tesla Model S JSON API" on Apiary is the best outline of the API I've seen.

https://timdorr.docs.apiary.io/

You could definitely automate preconditioning based on a schedule and exterior temperature. In fact, the "climate settings" API call includes the interior *and* exterior temperature.


----------



## 3V Pilot (Sep 15, 2017)

Very cool idea! I love the whole thought of integrating the car into the smarthome and Amazon Alexa. Does this button require the use of Alexa is it a standalone? I wonder if anyone has integrated a Model 3 with Alexa, what can be done and how do you go about setting that up?


----------



## sclyde (May 26, 2017)

Mike Land said:


> Very cool idea! I love the whole thought of integrating the car into the smarthome and Amazon Alexa. Does this button require the use of Alexa is it a standalone? I wonder if anyone has integrated a Model 3 with Alexa, what can be done and how do you go about setting that up?


The dash button is standalone, no need for an Echo or other Alexa device. Someone created a Tesla integration with Alexa called "EV Car". You can enable the skill from the EV Car skill page.


----------



## 3V Pilot (Sep 15, 2017)

sclyde said:


> The dash button is standalone, no need for an Echo or other Alexa device. Someone created a Tesla integration with Alexa called "EV Car". You can enable the skill from the EV Car skill page.


That's perfect, thanks!


----------

