Automating functionality for Tesla, using the same API the app uses via Tessie
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.
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.
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.
- Python 3.11
- GitHub actions for CI/CD
- Super Linter for linting, including:
- pytest for unit testing
- pre-commit to automate checks on commit
pip install -r requirements.txt
for production, requirements-test.txt for testing/CI/CD, and requirements-dev.txt for local development.