SmartThings Community

Basic Tesla Integration

(Jonbur) #21

I’ve been using this DH with my car for about three months and haven"t noticed significant vampire drain. The presence sensor functionality in the device handler is based on the Poll() method, which SmartThings calls periodically. The timing of this is a little variable, so it can take a while for arrival/departure to register.

It depends what your use case is as to whether this is a problem. If you want something to happen immediately when your car arrives/departs, then this is not really a suitable solution (and probably never will be as increasing the poll frequency obviously increases the frequency of contacts with the car)

Hope that helps!

(Marc) #22

I got my first electric bill since I got a Tesla and it was double what I was expecting. I was polling my Tesla every minute and also preheating the car for up to 30 minutes during the week. I am still troubleshooting why my bill was so high but I’ve disabled both right now to see if I notice a difference.

(Jg506) #23

This device allows you to run these experiments and draw conclusions much quicker than waiting for next electricity bill

(Marc) #24

I actually splurged and got a Sense. That and should give me a good handle on my power consumption in my home.

(Jim) #25

I’ve had both the Sense and the Aeon labs. Sense is great, though I’m not finding that it’s discovering as many of my devices as I would like yet.

The Aeon Labs is nice in that there’s a Smartthings device handler out there for it so you can build events/trigger on its activity, which can be pretty cool (although you don’t get any device granularity).


(Lucky) #26

Hi Guys, if you cud help
Installed python3, pip, flask, geopy & teslajson on synology
when i run pyton3 install
I get this error
File “”, line 11
SyntaxError: invalid syntax

can you help
what commands I need to run after installing
I have already created Tesla device
Thank you

(Jonbur) #27


You need to edit ‘’ and set the variables:


To match your setup

‘HOME_LOCATION’ is your lat / long - e…g. (51.230402, -0.234512)


(Lucky) #28

Thank you Jon, manged to get the Home location
now get error
OSError: [Errno 98] Address already in use

is there a way to run it on different port, other then 5000


(Jonbur) #29


Off the top, I think ‘ flask run -h -p 8083’ should work (where 8083 is the port you want to use)

NOTE: Flask internal webserver is really not meant for any sort of production use!


(Lucky) #30

Thanks Jon for your input, you have been kind. no more errors
on running on server @, getting - - [27/Aug/2017 15:51:54] “GET /api/isvehiclehome HTTP/1.1” 200 - - - [27/Aug/2017 15:51:57] “GET /api/isclimateon HTTP/1.1” 200 - - - [27/Aug/2017 15:52:01] “GET /api/stophvac HTTP/1.1” 200 -

I assume this how it shud be!

Sorry, Only other thing is that I dont get any of the tiles on post#16
just have presence tile, on & off hvac tile & refresh tile
does it matter if it is Model X ?

(Lucky) #31

I the lights on Tesla lights up on pressing the presence button, i assume the device and app working fine. except that I dont get the fancy tiles as on post 15. I have device handle from Jon’s github
Any suggestions (its Model X, does it matter ?)

(MacTechGenius) #32

Any vampire drain with the Tesla?

(Jonbur) #33

Hi, that device handler is Mbhforum’s fork of the base code

(Lucky) #34

Thanks Jonbur, you have been kind…cheers

(Lucky) #35

Hi, I have not noticed any appreciable vampire drain, used it for about month

(Barry Murphy) #36

Heya. Just wondering if there were any plans to integrate further with Tesla ( specifically id like to use the start charging and stop charging functions in webcore to automate the charging process for TOU times and when my solar is generating power etc.

Many thanks in advance

(Marc) #37

@jonbur Did you ever make good on that idea of creating a docker image? I have to re-do my whole setup now and would love to port this over to Docker.

(Jonbur) #38

Hi Marc, afraid not - it transpired that the box I am running this on cannot run Docker without a bunch of changes, so I never got to it

(Marc) #39

No worries. I see there is a docker image already that has flask and python, so I might give that a try. Will let you know results:

(Barry Murphy) #40

I saw some work at anyone here working on that?