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

Tesla Car API - What are your best automations?

This site may earn commission on affiliate links.
I send myself a text in the evening when the car is under 150 mile range and unplugged (I charge from 2-5am). I also use the programmable LEDs on a Homeseer dimmer switch to show a always on "fuel guage" in my home. Not really necessary, but makes a good home automation demo.

I'm thinking a good automation for me is to turn on a blue light in the garage when I arrive home with under 150 mile range. That would prompt me to plug the car in if I'm not headed out again.

What are you doing? I use a Homeseer plugin that enables the Tesla API. I'm sure Home Assistant and others have implemented the API.
 
  • Like
Reactions: jmaddr
Good ideas. I am self-hosting a database and code to pull stats from my car every hour (more often if driving). My Wifi is Unifi, and I have home assistant integrated with it so I can see my car's activity. Some stuff I've set up:
  • Text message when >200MB downloaded, indicating a possible update
  • Text message when I leave anything open for 2 hours (doors, frunk, trunk, sunroof)
  • Close sunroof if open and short term weather forecast calls for precipitation
  • Text message for environmental extremes on internal temperature (very hot or freezing)
  • I have a database of locations, and I get a message when arriving or leaving locations. Before PIN to drive, I used to optionally enable valet mode when arriving at a location.
  • I get a text if the car's location has changed but the odometer has not changed
  • Low battery notification (<15%)
  • I get a text if the software update status is downloading_wifi_wait
  • Pull stats from the car 5 minutes after disconnecting from wifi, under the assumption I'm driving somewhere and want to begin collecting stats more frequently
 
I'm integrated through Teslamate and Home Assistant. Main automation is the opening and closing of my garage door as I arrive and depart. It's also programmed to alert me if I forgot to plug in an hour after I arrive home and it's still unplugged. In the winter it starts heating the house as soon as I leave the office parking lot. Once the integration in HA is fixed for those of us who use TOTP authentication, I'd like to be able to send the command to the car to start pre-heating the interior based around whether or not I'm scheduled to work in the office that day.
 
With Tasker (Android) I fully automated the temperature preconditioning of my M3.
At a pre-set time tasker sets the moment that the preconditioning in the car must start depending of the outside temperature, also the settings of the seatheaters is set.
During the night Tasker checks the outside temperature. If the temperate has been below 0 degrees celcius (freeze) the defrost setting will also be activated. Of course not at weekends or other not working days which I can define.

When i leave the car and the bluetooth connection with the car has been lost and I'm not connected to my home Wifi within 2 minutes, Tasker decides, you're not at home and activates the sentry mode.

With Tasker I almost never have to think about these thinks. And combined with the app minimilistic text I created a dashboard at my phone with all relevant information like when the preconditioning will start with which settings, current range, outside amd inside temperature.