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

TeslaMate: Yet another self-hosted data logger for your Tesla

This site may earn commission on affiliate links.
After playing around with this software for the day, it looks to be an incredibly powerful and quick logger set. Running it on a Raspberry Pi 3B+ is plenty powerful enough. Kudos to @addison for creating this, I'll be buying you a beer through your paypal link - thanks so much! With @BigTonyTones image, the installation was super easy, and I wouldn't have had the skill set to get this going without you. Since the software is so powerful, it also looks I'll be also cancelling my subscription to my hosted logger soon because of this.

One question I have. I set up external port forwarding on my router to my RPi so I can access this from work and get my trip mileage etc. This is straight forward and easy enough to do, but I'm concerned about security in doing this? All someone has to do is enter in my home IP address and the external port, and it forwards directly to the Teslamate interface. What is the exposure risk to the RPi, my home network & my car? Is there a way to add a secure password to external access?
 
After playing around with this software for the day, it looks to be an incredibly powerful and quick logger set. Running it on a Raspberry Pi 3B+ is plenty powerful enough. Kudos to @addison for creating this, I'll be buying you a beer through your paypal link - thanks so much! With @BigTonyTones image, the installation was super easy, and I wouldn't have had the skill set to get this going without you. Since the software is so powerful, it also looks I'll be also cancelling my subscription to my hosted logger soon because of this.

One question I have. I set up external port forwarding on my router to my RPi so I can access this from work and get my trip mileage etc. This is straight forward and easy enough to do, but I'm concerned about security in doing this? All someone has to do is enter in my home IP address and the external port, and it forwards directly to the Teslamate interface. What is the exposure risk to the RPi, my home network & my car? Is there a way to add a secure password to external access?

You really should NOT forward the IP of the Pi to the public, you're also forwarding the SSH service which is one of the most targeted services by malware/hackers. SSH is essentially a remote command line for linux. You could setup a reverse proxy with HTTPS for the Pi and add credentials / disable registrations and anonymous access to Grafana then just forward the single port to your reverse proxy. However, I don't want to sound like an ass but if installing the container was beyond your skills that may be as well, here's a good guide on how to do it.

How To Install and Secure Grafana on Ubuntu 18.04 | DigitalOcean

A better option would be to not forward anything and just VPN into your home network. Most new routers have an option to enable a VPN server then just add DDNS (free hostname so you don't have to remember your ever changing IP). All phones/tables/PCs nowadays support VPN connections as well.
 
Just jumping in here.. I found the VPNs built into different routers to be problematic... then I found this product called Firewalla (it was a kickstarter project) -- it's a tiny device that goes on your router and acts as a firewall and VPN server, device monitoring,ad blocking, parental controls, and lots of other features (see link below). It's about $100 and no monthly fees. It's the best $100 I spent! I can access the VPN via Tunnelblick on my MacbookPro or OpenVPN on my iPhone and it "just works" and is very stable. I use it constantly while traveling to access my home network devices without exposing anything to the outside.

https://www.amazon.com/Firewalla-Security-Firewall-Business-Parental/dp/B079TNMKKY
 
You really should NOT forward the IP of the Pi to the public, you're also forwarding the SSH service which is one of the most targeted services by malware/hackers. SSH is essentially a remote command line for linux. You could setup a reverse proxy with HTTPS for the Pi and add credentials / disable registrations and anonymous access to Grafana then just forward the single port to your reverse proxy. However, I don't want to sound like an ass but if installing the container was beyond your skills that may be as well, here's a good guide on how to do it.

How To Install and Secure Grafana on Ubuntu 18.04 | DigitalOcean

A better option would be to not forward anything and just VPN into your home network. Most new routers have an option to enable a VPN server then just add DDNS (free hostname so you don't have to remember your ever changing IP). All phones/tables/PCs nowadays support VPN connections as well.
Understood, turned off the port forwarding. I'll keep it local & learn about the rest. Very informative.
 
Just jumping in here.. I found the VPNs built into different routers to be problematic... then I found this product called Firewalla (it was a kickstarter project) -- it's a tiny device that goes on your router and acts as a firewall and VPN server, device monitoring,ad blocking, parental controls, and lots of other features (see link below). It's about $100 and no monthly fees. It's the best $100 I spent! I can access the VPN via Tunnelblick on my MacbookPro or OpenVPN on my iPhone and it "just works" and is very stable. I use it constantly while traveling to access my home network devices without exposing anything to the outside.

https://www.amazon.com/Firewalla-Security-Firewall-Business-Parental/dp/B079TNMKKY
Cute little device but everything it offers can easily been done with cheaper hardware. A raspberry pi running pihole and an openvpn server can accomplish the same thing.

If you want to get really fancy, download the best firewall I have used and run it on any old computer you may have. Its call pFsense. Has a free adblocker addon called pfblockerng
 
  • Like
Reactions: TMThree
Cute little device but everything it offers can easily been done with cheaper hardware. A raspberry pi running pihole and an openvpn server can accomplish the same thing.

If you want to get really fancy, download the best firewall I have used and run it on any old computer you may have. Its call pFsense. Has a free adblocker addon called pfblockerng

Absolutely. But if people want dead-simple plug-and-play with zero configuration or software installation, it's a cheap and easy alternative for $100. It also has a robust and free mobile app to monitor your network activity and devices.

How much is your time worth to set up an R-Pi and install an OS and install, configure, and maintain all that software?
 
Last edited:
Does anyone use Android's Macrodroid for resuming higher frequency scanning when you connect to your Tesla by bluetooth? This is so that you don't miss the first so many minutes set when you start driving from a sleep state. I'm trying to figure out a proper action configuration in the macro setup but failing so far... Following the guide here, but the action sequence in the guide isn't complete. Thanks.
 
Does anyone use Android's Macrodroid for resuming higher frequency scanning when you connect to your Tesla by bluetooth? This is so that you don't miss the first so many minutes set when you start driving from a sleep state. I'm trying to figure out a proper action configuration in the macro setup but failing so far... Following the guide here, but the action sequence in the guide isn't complete. Thanks.

Not sure how exactly you configured your TeslaMate, but I updated my guide with how to use Tasker with Bluetooth to resume logging. Maybe you can find some tips here:

TeslaMate – DigitalOcean Docker (Step-by-step installation guide) | satheesh.net
 
  • Informative
Reactions: Morristhecat
Just jumping in here.. I found the VPNs built into different routers to be problematic... then I found this product called Firewalla (it was a kickstarter project) -- it's a tiny device that goes on your router and acts as a firewall and VPN server, device monitoring,ad blocking, parental controls, and lots of other features (see link below). It's about $100 and no monthly fees. It's the best $100 I spent! I can access the VPN via Tunnelblick on my MacbookPro or OpenVPN on my iPhone and it "just works" and is very stable. I use it constantly while traveling to access my home network devices without exposing anything to the outside.

https://www.amazon.com/Firewalla-Security-Firewall-Business-Parental/dp/B079TNMKKY

Not to go totally off topic here, but is Firewalla a replacement for your existing firewall (I use UniFi USG) or more of a internal lan security system?
 
Absolutely. But if people want dead-simple plug-and-play with zero configuration or software installation, it's a cheap and easy alternative for $100. It also has a robust and free mobile app to monitor your network activity and devices.

How much is your time worth to set up an R-Pi and install an OS and install, configure, and maintain all that software?


For me it was simple since teslamate is a docker image. Really don’t see how it’s complicated?
 
Setting this up on a Rpi but having trouble starting it.

(Created docker-compose.yml file)
Afterwards start everything with docker-compose up
(This gets "command not found")
0


I seem to be missing something here.

yes, you installed docker but did not install docker compose, a separate product.

from this guide on installing on a pi, Installing Docker and Docker Compose on the Raspberry Pi in 5 Simple Steps - DEV Community ‍‍ you need this to install docker-compose:


4. IMPORTANT! Install proper dependencies
sudo apt-get install libffi-dev libssl-dev

sudo apt-get install -y python python-pip

5. Install Docker Compose
sudo pip install docker-compose
 
trip.png

charging.png

trips.png

I recently released v1.0 of TeslaMate, a self-hosted data logger. It can be easily setup on a Raspberry Pi, Synology NAS or any cloud/home server.

LINK: https://github.com/adriankumpf/teslamate

I'm going to get this running on my Raspberry Pi next week! Thanks!
 
Not to go totally off topic here, but is Firewalla a replacement for your existing firewall (I use UniFi USG) or more of a internal lan security system?

The UniFi USG looks like a fairly medium-duty firewall and gateway that does most of what Firewalla does. Although I can't tell if it offers free VPN service. Firewalla RED is good for a home cable or FIOS connection, and I think is limited to 100Mbits per second. Firewalla BLUE goes up to 500Mbits per second, but is a lot more money.


See; Firewalla Speed Limitations Explained ...

But for my needs, Firewalla RED fit the bill perfectly providing a basic firewall and free VPN to my home network and took 5 minutes to install and get running.

My alternative option was to use one of the several Cisco ASA 5505 gateways I just decommissioned from my datacenter which would have done the job just as well. But when I realized for $99 I could get this little plug-and-play unit with a mobile app for monitoring/configuration (even remotely), it wasn't worth my time to hassle with the Cisco.