Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.

Tesla CAN bus logging/display with Raspberry Pi

I posted a video about my project in which I use a Raspberry Pi to display realtime CAN bus data in the car's own web browser.

Let me know if you have any questions. -Ben

Shortcut to the links:

I show how to collect detailed CAN bus data from a Tesla Model S, and display it in the car's own web browser!

Complete Raspberry Pi with CAN bus shield and 12V buck converter: Raspberry Pi 3 System With CAN Bus Interface

Diagnostic connector pinout (scroll through the images):
EVTV Motor Verks Store: Tesla Model S and Model X CAN Monitor, OEM Electric Vehicle Items, TeslaCANKit

Tesla diagnostic connector: Tesla Diagnostic Cable For MS/MX (Sept 2015 and up) - Bare Wire Version

RPi CAN bus tutorial: CANned Pi: (Part1)

Get node.js installed on the RPi: Guide to Installing Node.js on a Raspberry Pi | thisDaveJ

I used socket.io, which is a module that installs into node.js: socket.io

Basic sequence to setup the server on the Pi:
sudo ip link set can0 type can bitrate 500000 listen-only on
sudo ip link set can0 up

candump -cae can0,0:0,#FFFFFFFF

candump -cae can0,0:0,#FFFFFFFF | grep 106 | awk -Winteractive '{ print $10}' | node app.js

Tesla CAN bus reverse engineering: wk057's SkieNET

I will post the node.js code on my blog:
Ben Krasnow
Very nice work. Thank you for posting this! I have been searching for a decent Linux CAN setup for doing analysis on my Model S. This will certainly improve over the current Android setup I have and looks like I may be able to feed in some old captures I have for better analysis.

Looking forward to the ultimate graphing/performance monitor you are working on!

Wonder what the best solution is to keep the Raspberry Pi firewalled from the internet connection? Maybe acting as a bridge or some other clever routing manipulation can accomplish this.

Products we're discussing on TMC...

About Us

Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.

Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.