Skip to content

C++ library to communicate directly with Tesla vehicles over the BLE API

License

Notifications You must be signed in to change notification settings

yoziru/tesla-ble

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TeslaBLE - A C++ library for communicating with Tesla vehicles over BLE

This library is designed to communicate with Tesla vehicles locally via the BLE API. It follows the same principles as the official Tesla vehicle-command library (Golang), and is intended for use in embedded systems.

It exists to:

  1. Provide a local and offline alternative to the official Tesla API.
  2. Avoid the rate limits of the official Tesla API.

The main purpose of this library is to locally manage charging of the vehicle to enable use cases such as charging during off-peak hours, or to manage charging based on solar production. It is not intended to replace the official Tesla API for all use cases.

Usage

This project is intended to be used as a library in your own project. It is not a standalone application.

yoziru/esphome-tesla-ble is an ESPHome project that uses this library to control your Tesla vehicle charging.

Several examples are included for your convenience.

cd examples/simple/ 
cmake .
make

Dependencies

  • nanopb
  • mbedtls 3.x
    • NOTE: ESP-IDF <=4.4 includes mbedtls 2.x, and is not compatible with this library. You will need to use at least ESP-IDF 5.0.

Features

  • Implements Tesla's BLE protocol
  • AES-GCM key generation
  • Metadata serialization
  • Supports UniversalMessage.RoutableMessage encoding and decoding
    • Supports Vehicle Security (VSSEC) payload
    • Supports Infotainment payload

Credits

This fork builds on the original version by pmdroid.

IMPORTANT

Please take note that this library does not have official backing from Tesla, and its operational capabilities may be discontinued without prior notice. It's essential to recognize that this library retains private keys and other sensitive data on your device without encryption. I would like to stress that I assume no liability for any possible (although highly unlikely) harm that may befall your vehicle.

About

C++ library to communicate directly with Tesla vehicles over the BLE API

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages