Jump to content
harper

Tesla Driver

Recommended Posts

I am thinking of writing a tesla driver that interfaces with the *unofficial* tesla API. 

Is there any interest? I will need some folks to test

Share this post


Link to post
Share on other sites

I did a bit of work in this area, but using third party tools like the Generic TCP/IP driver and RyanE's webevents driver.  If you search these forums you should find it.

Have you thought about how to do this?  One idea that I thought might make sense is to have your Tesla be a "room" in your house and use some existing proxies, like the tstat proxy for the Tesla's climate, light proxy for the lights, etc.This might involve writing a separate driver for each item that you want to control - light, horn, climate, trunk, panoroof, charging, etc.

Share this post


Link to post
Share on other sites
6 hours ago, IntrinsicGroup said:

ELAN

(This is a screen shot from an early Alpha build in August - hence the spelling mistake!)

 

What kinds of variables will be exposed for programming purposes? I could have a use case for this.

Share this post


Link to post
Share on other sites

Tesla API has pretty much everything you could possibly want to know in it (even down to whether the seats are vegan!).  It's just a matter of us selected most wanted features.  What would you be looking for?

Share this post


Link to post
Share on other sites
4 hours ago, IntrinsicGroup said:

Tesla API has pretty much everything you could possibly want to know in it (even down to whether the seats are vegan!).  It's just a matter of us selected most wanted features.  What would you be looking for?

I'm a long way off from providing energy automation at a reasonable price to consumers. Higher end clients, though, have the Sonnen/Adapt/Cinegration driver they can use. Adding in information from a Tesla for these clients makes sense. State of charge, time remaining to full charge, and interior climate would be the variables I would want to program off of for energy automation. Being able to remotely start/warm up the car would definitely be an action I would want to trigger from Control4.

Share this post


Link to post
Share on other sites
4 hours ago, IntrinsicGroup said:

Tesla API has pretty much everything you could possibly want to know in it (even down to whether the seats are vegan!).  It's just a matter of us selected most wanted features.  What would you be looking for?

IMO the most useful features are being able to turn on climate, start charging and seeing charge status.  It might also be useful to have a button sequence that allows you to unlock the car, although that is a bit of a security risk.  But who would know that you need to triple click a keypad button to unlock your car?  Of course the remote climate is more useful in Canada when it is -20C then in SoCal!

The API does have most things but one that is missing, or was a year or so ago, is the ability to change/set the scheduled charging time.  That was not available through the API.  I wrote a bit of code that allowed you to finish your charing at a specified time.  I had to manually start charging at the estimated time rather than just change the scheduled start time.  It seems that Tesla has added this type of functionality to the car in one of the most recent software updates, but there is a hard coded end time of 6am.  I want my charging to end at 7 as that is when the cheap electrical rates end for me and it is just before I leave.  Leaving just as charging is finished has benefits as the battery is warm and there will be less, or no, limited regen.

Share this post


Link to post
Share on other sites
19 minutes ago, BakerBalay said:

Being able to remotely start/warm up the car would definitely be an action I would want to trigger from Control4.

Warm (or cool) yes, but you don't actually start or stop a Tesla since there is no engine to turn on.  When I rent ICE vehicles I occasionally leave them running since I forget to turn off the vehicle after putting it in park.

Share this post


Link to post
Share on other sites
4 minutes ago, zaphod said:

Warm (or cool) yes, but you don't actually start or stop a Tesla since there is no engine to turn on.  When I rent ICE vehicles I occasionally leave them running since I forget to turn off the vehicle after putting it in park.

I forget to turn them on, not used to hearing an engine after three years! Son forgot to turn it off the other day.

 

I'm looking at it from a different view point as Time Of Use rates start to ramp up in SoCal.

Customer comes home in the winter and solar is not producing. Possible home battery discharging to offset Time Of Use rates. Pool pump comes on while car is charging= big $$ (although most in this category really don't care). Tesla charging causes a pause in the pool pump and filtering, sets back HVAC, may even trim the lights back. Really comes into play when there is a grid outage (can you say PG&E)- that car will way overload the battery, causing a shutdown. Now the customer has NO power and his freezer full of his deer meat from the last hunting trip is going to go bad.

 

Having the ability to STOP charging in this scenario is paramount if a critical loads panel is installed incorrectly. Being able to warm up the car to limit loss of regen or battery power when operating the heat/AC is an added bonus that will appeal directly to the customer. Especially those that may not have a set schedule for going to "work".

Share this post


Link to post
Share on other sites

I agree regarding TOU.  Here in Toronto we have TOU that differs in summer vs winter.  It also differs on weekends and holidays as the off-peak rate applies all day on those days.  Currently for weekdays off-peak in Toronto is 7pm to 7am.  7-11am and 5-7pm are peak and the middle of the day is mid-peak.  So I only want to charge on off-peak unless I really need a charge - but that has never happened in the 4.8 years that I have owned my Tesla.  I think in the summer the off-peak also ends at 7am but starts later at 11pm due to AC demand, so I always want to end my charging at 7 unless I am leaving very early.

One thing that might be needed in the future when almost all cars are EV is a randomizer for charging start times.  You don't want everyone charging at 5-7am as that will create a new peak in demand that could potentially overload the grid.  In that case it could be good to start charging randomly betwen the start of off-peak and a couple of hours between the end of off-peak.  I wonder if Tesla has thought of that?

But perhaps peak times will change in the future as once solar becomes a larger part of the grid then generation may also peak during the day, smoothing off pricing and allowing those who are at home all day to charge during the day.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...