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

TeslaPi: Security Alarm Integration Project w/ Tesla API and RaspBerry Pi

primo

Member
Jun 18, 2019
32
80
Florida
I was getting familiar with the Tesla API even before my car was delivered. I just finished my first project: TeslaPi. The project can be downloaded here on GitHub.

Here is a video demo.

It is a very basic security alarm integration that uses an outdoor motion sensor and RaspBerry Pi to trigger the headlights and horn on my Model 3. The monitoring time is configurable and there are alarm escalation levels that are also configurable. The code is written in Python.

It is more a proof of concept at this point, so I do not recommend it for any production security systems. It certainly can be tested and improved further to be production ready though. It is also easy to customize and add additional alarm actions.

I think that it will work with all Tesla Models being that they use the same API.
 

primo

Member
Jun 18, 2019
32
80
Florida
Is there any way to setup a raspberry pi with the Tesla API to do a DIY teslafi-type server/ data logger?
All of the API commands for retrieving data and settings are defined here.
State And Settings

All of the API commends that take some type of action are defined here.
Commands

As far as I know, that is everything that is available. If someone knows different, please post.
 

robertvg

Extremely Well-Known Member
Jul 3, 2015
5,227
6,098
Amsterdam, Netherlands
All of the API commands for retrieving data and settings are defined here.
State And Settings

All of the API commends that take some type of action are defined here.
Commands

As far as I know, that is everything that is available. If someone knows different, please post.

I was hoping a RPI could do the logging directly from the canbus/diag port.
Something like ScanMyTesla but then on an RPI.
And copy the collected data every x hours or once a day through a LTE connection on the RPI.
 

primo

Member
Jun 18, 2019
32
80
Florida
I was hoping a RPI could do the logging directly from the canbus/diag port.
Something like ScanMyTesla but then on an RPI.
And copy the collected data every x hours or once a day through a LTE connection on the RPI.

Robert,

I wonder how the developers of those applications are doing that. Maybe there is additional API access available via special requests or partnerships with Tesla. If you find out anything, please post it.

Thanks!
 

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.


SUPPORT TMC
Top