Skip to content

TechNickAI/teslabot

Repository files navigation

TeslaBot 🤖

Automating functionality for Tesla, using the same API the app uses via Tessie

Github Build pre-commit Code style: black GitHub Super-Linter codecov

Various automations can be performed based on time of day, location of the vehicle, and conditions of the car. Have an idea for a feature? Submit a GitHub issue to suggest a feature.

Optional SMS notifications available via Twilio.

Screen Shot 2022-08-12 at 1 40 17 PM

Features

Auto Venting

It's hot out. Sun is streaming in. Interior temperatures can exceed 100°F, damaging the cars interior and making it uncomfortable when you get in. Tesla has a feature called Cabin Overheat Protection to cool down the cabin when it gets hot, but this uses up battery.

Yes, you can open the app to vent, but it's not ideal to have to remember to do it every time you park. It's also nice to only vent the windows when it is hot, not all the time.

autovent solves this by allowing you to set a threshold for venting

Usage: autovent.py [OPTIONS]

Options:
  --vin TEXT                 Tesla VIN number to auto vent  [required]
  --tessie-token TEXT        API access token for Tessie (see tessie.com)
                             [required]
  --vent-temp INTEGER RANGE  The threshold for when to roll up/down the
                             windows, degrees in fahrenheit  [default: 70;
                             0<=x<=135]
  --notify-phone TEXT        Send a message to this phone number when the
                             windows are moved
  --help                     Show this message and exit.

Off peak charging

Tesla's native off-peak scheduling sucks. It allows you to specify a "start time", but no end time, when in practicality you need to be able to specify a peak window, such as 4-9PM for PG&E in Northern California, and have the charging stop during this window.

Usage: peakoff.py [OPTIONS]

Options:
  --vin TEXT                      Tesla VIN number to auto vent  [required]
  --tessie-token TEXT             API access token for Tessie (see tessie.com)
                                  [required]
  --peak-start TEXT               When peak pricing starts, in military time.
                                  Ex: 16:00  [required]
  --peak-end TEXT                 When peak pricing ends, in military time.
                                  Ex: 21:00  [required]
  --low-battery-threshold INTEGER RANGE
                                  Don't pause charging if the battery is below
                                  this threshold  [default: 42; 0<=x<=100]
  --notify-phone TEXT             Send a message to this phone number when the
                                  charging is stopped/started
  --help                          Show this message and exit.

Development Environment

pip install -r requirements.txt for production, requirements-test.txt for testing/CI/CD, and requirements-dev.txt for local development.

About

🤖 for automating Tesla vehicles

Topics

Resources

License

Stars

Watchers

Forks

Languages