Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Google Home/Assistant Tesla Commands

This site may earn commission on affiliate links.
I know there is an Alexa service somebody created to summon their Tesla, is anybody here working on a Google Home version?

I looked through IFTTT and didn't see anything made available to the public. Would be nice to voice control my S or X via Google Home if somebody is working it.
 
I know there is an Alexa service somebody created to summon their Tesla, is anybody here working on a Google Home version?

I looked through IFTTT and didn't see anything made available to the public. Would be nice to voice control my S or X via Google Home if somebody is working it.

Yes, you can integrate via Google Home and IFTTT with a Maker channel that e.g. talks to RPi that in turn talks to Tesla.
I have something though all I have at the moment is "unlock" and "turn on climate".
I don't think Tesla have a good way of giving out partial credentials and I already used a RPi at home for various other automations (OpenSprinkerPi, Denon amp, Samsung TV) so it was relatively easy to do.
 
Yes, you can integrate via Google Home and IFTTT with a Maker channel that e.g. talks to RPi that in turn talks to Tesla.
I have something though all I have at the moment is "unlock" and "turn on climate".
I don't think Tesla have a good way of giving out partial credentials and I already used a RPi at home for various other automations (OpenSprinkerPi, Denon amp, Samsung TV) so it was relatively easy to do.

Do you plan on publishing the ifttt?
 
There's nothing to "publish" on IFTTT because as I said in the reply, it uses the "maker channel".
The steps are:
- Google Home 'trigger' on IFTTT, e.g. "unlock <carname>"
- IFTTT action via Maker channel to send request at web server on RPi (RPi has to be on the internet / webserver, static IP or dyndns type setup)
- web server cgi script that authenticates its actually from IFTTT
- call relevant Tesla api (variety of these - folks here maintain - or just get it from github)

All that is required here is to glue all the parts together. But since part of it is on your premises and not in the cloud (Tesla API doesn't have a good OAuth type mechanism) there's some work required by each person.
 
  • Like
Reactions: highedu
I have written an "intent handler" called "Nikola" in Python that accepts Alexa requests (called "intents") specific to the Tesla and then acts via the Tesla API.

Nikola currently accepts and answers requests like "How charged is my car?", "How far can I drive?", "How warm/cold is my car?", "What does my odometer read?", and "Is my car locked". It also executes simple commands like "Start charging my car to 90 percent", "Unlock my car for 10 minutes," and "Change my maximum charge to 70 percent."

I must say it's a lot of fun to be around the house and just be able to ask: "Alexa, ask Nikola to charge my car to 75 percent"...and have it just happen.

I've made this code public in GitHub, and I'd imagine it's adaptable to Google Home. At the moment, I'm filling out more complex functionality (like "Get my car ready for a long drive by 9 o'clock tomorrow morning" -- which will charge the car to 100% just before I'm about to depart, as well as checking the internal temperature and warming/cooling the car to within 5 degrees of the climate control setting), and then was going to start working on an IBM Watson Conversation interface. But adapting it to Google Home might be more interesting. If anyone wants to fork my code and do some work on it, I'd encourage that -- much of the hard work is done on interfacing with the car, and this work will continue.

For those so inclined, here is the GitHub repository for the Alexa project: Nikola: An Alexa Skill for Monitoring and Managing Tesla Automobiles
 
I have written an "intent handler" called "Nikola" in Python that accepts Alexa requests (called "intents") specific to the Tesla and then acts via the Tesla API.

Nikola currently accepts and answers requests like "How charged is my car?", "How far can I drive?", "How warm/cold is my car?", "What does my odometer read?", and "Is my car locked". It also executes simple commands like "Start charging my car to 90 percent", "Unlock my car for 10 minutes," and "Change my maximum charge to 70 percent."

I must say it's a lot of fun to be around the house and just be able to ask: "Alexa, ask Nikola to charge my car to 75 percent"...and have it just happen.

I've made this code public in GitHub, and I'd imagine it's adaptable to Google Home. At the moment, I'm filling out more complex functionality (like "Get my car ready for a long drive by 9 o'clock tomorrow morning" -- which will charge the car to 100% just before I'm about to depart, as well as checking the internal temperature and warming/cooling the car to within 5 degrees of the climate control setting), and then was going to start working on an IBM Watson Conversation interface. But adapting it to Google Home might be more interesting. If anyone wants to fork my code and do some work on it, I'd encourage that -- much of the hard work is done on interfacing with the car, and this work will continue.

For those so inclined, here is the GitHub repository for the Alexa project: Nikola: An Alexa Skill for Monitoring and Managing Tesla Automobiles

Can't wait to see if somebody adapts it to Google Home....maybe they are waiting for the Google assistant sdk which comes out next month.

Have you tried adding summon functionality?
 
Have you tried adding summon functionality?
No, I haven't added Summon functionality to the Nikola app for Alexa quite yet. I'd really like to finish the "Get my car ready for a long/short drive by 9am" functionality first, and then the capper would be to have it pull out of the garage.

That said, though, pulling out of the garage is incompatible with having it plugged in to charge -- unfortunately, there is not an Eject_Charging_Cable API command (yet) for the car!
 
I wrote an IFTTT using the maker channel "Hey Google, Honk the Horn" and the Tesla honks its horn. Its very rudimentary. You have to grab your auth token using the API page, and then put that token into your app.

This simple code here hosted on a server will make your horn honk if you call it with the IFTTT maker app.

<?php
$token = "YOURTOKEN";
$VEHICLE_ID = "YOURID";

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://owner-api.teslamotors.com/api/1/vehicles/".$VEHICLE_ID."/command/honk_horn");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json; charset=utf-8",
"Authorization: Bearer $token"
));

$response = curl_exec($ch);

var_dump($response);
?>
 
  • Helpful
Reactions: LuckyLuke
Yes, you can integrate via Google Home and IFTTT with a Maker channel that e.g. talks to RPi that in turn talks to Tesla.
I have something though all I have at the moment is "unlock" and "turn on climate".
I don't think Tesla have a good way of giving out partial credentials and I already used a RPi at home for various other automations (OpenSprinkerPi, Denon amp, Samsung TV) so it was relatively easy to do.
Good idea, I'll put my RpI to use.... I was using old WAMP server to communicate with the Tesla. RPI is much better option.
 
Great to hear! I'm continuing to add to the intent handlers every few days, so "Nikola" will keep getting more and more capable. Just added "Where's my car?" today -- returns the street address where your car is parked.

Nice! Yeah what I'll do is send you the proposed changes on github so its essentially the same base code.
I've had to enhance the code for supporting multiple cars, I'll send you that too.
 
Yeah what I'll do is send you the proposed changes on github so its essentially the same base code.
I've had to enhance the code for supporting multiple cars, I'll send you that too.
That would be awesome -- thanks in advance for contributing!

Next, I'm working on the whole "Get my car ready for a trip at 9:00am tomorrow" stuff. My Google Home arrives on Tuesday, so I should be able to test it all.

M