Python interface for connecting to Tesla vehicles directly using the BLE API
Project description
PyTeslaBLE
Python library for communicating with Tesla vehicles directly using the BLE API
:bangbang: | WARNING: This library is not supported by Tesla, and it could break at any moment. It should be noted that this library stores private keys and other sensitive data unencrypted on your machine. I am not responsible for any (extremely unlikely) damage done to your car. |
---|
Usage
pip install pyteslable
from pyteslable import BLE
tesla_ble = BLE("private_key.pem")
print("Scanning for vehicles...")
list = tesla_ble.scan()
print(list)
# Connect to a specific vehicle by BLE address
vehicle = list.getAddress("05:eb:6d:b7:f7:92")
vehicle.connect()
if not vehicle.isAdded():
print("Tap your keycard on the center console")
vehicle.whitelist()
# Now we are ready to send commands!
vehicle.unlock()
Cryptography Library Modification
If you have the latest cryptography
library, you will likely get an error about not supporting 4-bit nonces.
For now, the best solution I have is to simply modify the if statement that produces the error.
Credits
Huge props to Lex Nastin for putting together some documentation for the Tesla BLE API. Check out the documentation here.
Also many thanks to Kevin Dewald from Neuralink for the BLE library!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyteslable-0.1.3.tar.gz
(29.6 kB
view hashes)
Built Distribution
pyteslable-0.1.3-py3-none-any.whl
(29.2 kB
view hashes)
Close
Hashes for pyteslable-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d5673907ac5a26f89c45242ca3e5139d1b1b1f4ae25aaba8ac8588a43c71880 |
|
MD5 | 6c3b902469275eb3a02e2e4d2584078e |
|
BLAKE2b-256 | c33460e074d6404694135a0ceebe47dc693a7136ae5da3da524a64645e0600d6 |