SmartThings Community

Basic Tesla Integration


(newzwave) #41

Hi,

is there any new project how to integrate the Tesla Car to Smartthing? The one from jonbur haven’t been updated since 1 years.

The link from icepicknz look recent, but I have to input my email and password for my tesla account. Doesn’t look secure.

Thanks!


(Amit Bahree) #42

I was thinking about this, and some possible use cases especially around triggering rules based on presence. In the end I gave up on the idea - the effort and the value it provides wasn’t a lot for me. I figured the fact that the phone arrives home was good enough to kick off a bunch of rules.

Going off topic - in case anyone else is interested, I ended up geeking out in a couple of other ways - wrote a app for generating tokens - always suggest to use Auth tokens for Tesla as opposed your login credentials. And also use a IoT button to create a “keyfob” for the Model 3. If you have interest, you can check it out here and here.


(Marc) #43

Currently, I am using Home Assistant to integrate with Homebridge for my Model S. It’s nice to be able to use Siri to turn on climate, unlock doors, etc. I am surprised with the popularity with the Model 3 that there’s hasn’t been a Connect app built yet by the community.


(Jack Chen) #44

@Mbhforum, @jonbur: Could you point me to the fork of the device handler?
I tried the forked dev branch also.


(Marc) #45

#46

For webCoRE users see this post for another approach to utilizing the Tesla API.


(Trent Foley) #47

I’m going to start on a Tesla Connect Smart App / Device Handler that doesn’t require any middle ware. Anyone interested in collaborating with me on it?


(Trent Foley) #48

Here is my first pass at a Tesla integration:

Device Handler

SmartApp (Cloud Connector)

I implemented only select commands and vehicle states. If you try it out, let me know what other capabilities are important to you.


#49

I would give it a try later. How often does the smartapp pulls data and can u customize it (so that range is not affected)?


(Jeff Ramlow) #50

I ran it against our Model 3 and it is working fine.

I also am a bit concerned about range degradation by keeping the car awake too much. The temps up here are below freezing (last night it was 2 degrees F) and range is already being affected substantially. I’ve gone on the smartapp and every time i’m on there the car is awake. Generally speaking, I dont’ usually see that. As a matter of fact, utilizing the android Tesla app usually results in me waiting for 30 seconds to 2 minutes waiting for the car to wake up.


(Trent Foley) #51

The app will not wake your car on its own, so there should be no range degradation. The app does attempt to update status every 1 minute, but if the car is asleep, no data is refreshed.


(Jeff Ramlow) #52

Thanks for the update. I have a few more questions.

While it will not wake up a sleeping car, will the 1 minute updates cause it to keep a car from sleeping? Is the status update only happening when the smart app or other tile is being displayed? Or is it doing the query every minute behind the scenes at all times?

Another area that might be interesting is the ability to set the charge limit percentage. For the longer trip overrides.


#53

What is the primary use of the app?

  1. send audio alerts on connected speaker if charging started/ended
  2. turn on headlights maybe during sunset when u open the garage entrance
  3. create a tile on dashboard
    Anything else?

(Jeff Ramlow) #54

Living in Wisconsin, when I get up in the morning I fire up the Tesla app and start the car heater to heat up the cabin as well as the battery. This is based on the temperature outside. With this smartapp I would like to do a piston to automate it based on charging status, outside temperature, day of week, time, etc. Being a new owner and relatively inexperienced with EV cars, I can’t tell you how many times I forget in the morning and then jump in the car with cold batteries and limited regen braking.


(Trent Foley) #55

Not sure about it keeping the car from sleeping. Let me keep an eye on that. I know each morning after parking car at work the car goes to sleep on its own. The app does make requests each minute regardless of if the page is on screen or not.


(Jeff Ramlow) #56

Unfortunately I had to remove the smartapp because on the Model 3 the app is keeping the car awake. Shortly after removing the app the car went to sleep.

I have a second location that is using a non-smartthings product which also has a tesla addon. That addon has the exact opposite issue. It does not constantly request data unless you schedule the request. On the model 3 the request for data will wake the car up but in many situations it can take over 2 or 3 minutes to wake up once the request is made. In that time frame the original request usually times out.

I would be fine with a version that didn’t poll unless a refresh button was pressed. And if there was a WebCore command to send a wakeup for using in a piston. IE: at 7:00am send a wakeup and at 7:05 send a “Heater on”. type of scenario. I’m sure that won’t work for those people who want to have a constant battery display being updated constantly. Maybe a configuration option?


(Trent Foley) #57

Jeff - I also have a Model 3 but it is going to sleep. See my activity from today:

Is your’s plugged in when it stays awake? Or unplugged?


(Trent Foley) #58

Just saw that while my car did go to sleep at 1pm today, it did stay away from 8:20 - 1pm. I update the code to poll only every 10 minutes to see if that gives the car enough time to sleep and let you know.


(MacTechGenius) #59

Are multiple Tesla’s supported? Have an X and 3 that I would like to integrate on the same account.


(David Jacobs) #60

Hi Trent this sounds excellent, keeping the car awake will be an issue though. Is it not possible to set poll time’s only during certain hours and only based on certain creteria (e.g if the car has its battery at above 30%)?
Thanks