Giter Site home page Giter Site logo

Tesberry - A Tesla CAN bus utility for Raspberry Pi

This project is still work in progress

Setup

  1. Flash Raspberry Pi OS Lite (32-bit) using the Raspberry Pi Imager with the following settings:
    1. Set hostname to tesberryPi
    2. Enable SSH
    3. Set a username and password
    4. Configure your network and region
  2. Start Raspberry Pi and connect via SSH
  3. Run bash <(curl -s https://raw.githubusercontent.com/tesberry/tesberry/main/setup.sh) on your Pi

Stack

Service Enabled Port Description
Tesberry UI true 80 The Web Interface for Tesberry in the Tesla Browser
Tesberry Bridge true - Bridges the CAN Messages to MQTT and decodes/encodes them
Portainer true 9000 Web Interface to manage the Docker Containers
SavvyCan MQTT Bridge false - Bridges the CAN Messages to MQTT to debug them with SavvyCAN
Mosquitto MQTT Broker true 1883 / 9001 The MQTT Broker to where all services are communicating through
NodeRED true 1880 The rule engine to listen to and write CAN messages

Network Setup

There are 2 problems we have to solve:

  1. The Tesla does not connect to a WIFI Network without an internet connection
  2. The Tesla web browser is locked to only access public IPs, so we cannot use a hostnames or local IP

One way to solve these issues is to setup a mobile 4G/5G router in your car (usually you can use 5V or 12V to power them) and connect your Raspberry Pi to it. Then you have to setup a static IP lease in your Router for your Raspberry Pi to get 192.186.1.42 as it's IP address. After this is done you need to forward port 80 from 42.42.42.42 to 192.186.1.42. Additionally you can setup a hostname like tesberry for 42.42.42.42. Now you can access your tesberry UI with your Tesla browser using http://tesberry/.

Roadmap

  • check power state of usb port when sentry mode is off
  • speed up boot
  • 64-bit support

Read and Write from/to CAN bus

You can pretty much read but not write everything. Some values have a checksum, so it's not possible to write them, but UI values should not have a checksum. To rewrite a value we will read a message in the CAN bus, change a value and immediately send it again. It's also not possible to change configs without doing a man-in-the-middle attack but you can trigger actions instead e.g. opening the frunk.

Helpful Resources

tesberry's Projects

tesberry icon tesberry

A Tesla CAN bus utility for Raspberry Pi (WIP)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.