Tesla Automated Sentry : My first Golang project

Hi there, thanks for reading my blog.
As an IT guy i’m seeing, using and writing all kinds of programming languages for small tools, scripts and other stuff that helps me with doing my job. But sometimes, i also like to build some small projects to make my private live a bit easier.

I drive a Tesla Model 3, and i love it. It’s a superb car, with amazing features and for a tech-guy like me it’s heaven with all the fancy updates, the 15″ touchscreen and all the API’s. One thing i also love from Tesla is Sentry Mode, recording video from 4 camera’s while your car is parked is great for additional security. It works great, but i was missing one huge feature : Enable sentry mode when the car is charging.
So i started my very first own personal GoLang project, to learn a new language.

And here it is : https://github.com/dennisbrouwer91/tesla-automated-sentry
A small GoLang tool that runs on any platform, Docker builds are included and available here.

How does it work?

Super simple, you set 2 environment variables ( TESLA_SENTRY_EMAIL & TESLA_SENTRY_PASSWORD ) and run the tool, either with –daemon true or without.
The tool connects to the Tesla API and checks in what state your car is. If it’s online (charging) it will go ahead and make sure sentry mode is on. If it’s sleeping it doesn’t wake the car so it won’t be draining your batteries.

To make this project work i used the Tesla GoLang library from Jason and made a few PR’s to add functonality to his Go Module!

If you have any questions, remarks or improvents, please let me know by contacting me, or making an issue on my Github repo!
Pull Requests with enhancements are also greatly appreciated of course.

See you in my next blog šŸ™‚

Laat een reactie achter

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *