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

Open Source Teslalogger on Raspberry / Docker with ScanMyTesla integration

This site may earn commission on affiliate links.
I am in 1.45.17.0 try to update but it doesn't, and now is not connected, no dashboards

But is strange I also use Home Assistant Tesla integration, and that is logged and works. It was not updated in the last week (perhaps because it did not log out? Not sure how it works)

It's the logging on to create or refresh tokens that keeps getting broken, once the valid tokens are generated then access is fine for the 45 days they last.
 
  • Like
Reactions: bassmaster
Chinese translation is now available. Thanks to Alvin!

upload_2021-3-3_13-31-28.png
 
Hi bassmaster,

I have Teslamate running in a Google Cloud VM (micro F1 server with Debian 9 and docker).
Do you know if it would be possible, like Teslamate, to run in also in the Google Cloud ?

There's no reason this wouldn't run in a similar setup as what you did with Teslamate. The only issue would be the cost. Keep in mind that a Raspberry Pi costs about $60 for a full hardware kit and the electricity to run one for a year costs about $9.65/year (.010 kW * 24 hrs/day * 365 days/year * 0.11 $/kWh). If you're using anything other than your free instance on GCP or AWS, you're going to be over that yearly budget of just shy of $10 USD per year.
 
There's no reason this wouldn't run in a similar setup as what you did with Teslamate. The only issue would be the cost. Keep in mind that a Raspberry Pi costs about $60 for a full hardware kit and the electricity to run one for a year costs about $9.65/year (.010 kW * 24 hrs/day * 365 days/year * 0.11 $/kWh). If you're using anything other than your free instance on GCP or AWS, you're going to be over that yearly budget of just shy of $10 USD per year.

I'm using the free instance of GCP indeed and for TeslaMate it runs well.
I even have a free domain name registered to use.

Have someone installed TeslaLogger in the cloud and want to share their instructions with me ?
 
Hi bassmaster,

I have Teslamate running in a Google Cloud VM (micro F1 server with Debian 9 and docker).
Do you know if it would be possible, like Teslamate, to run in also in the Google Cloud ?

Hi,
I tried to create a free micro F1 Server, but that is not available anymore or not in my area.

So basically, if you have docker on theiry vm, it should run on it. Please check Docker installation of Teslalogger: bassmaster187/TeslaLogger
 
Do you know if it would be possible, like Teslamate, to run in also in the Google Cloud ?

I tied the micro F1 Server of Google Cloud Platform and it works well.
I used Debian 10 as a boot disk.
installed docker and docker-compose
open port 3000 and 8888 in google cloud platform firewall

and follow the Teslalogger Docker Setup: bassmaster187/TeslaLogger

I did not make any performance tests, so it's up to you.
 
I tied the micro F1 Server of Google Cloud Platform and it works well.
I used Debian 10 as a boot disk.
installed docker and docker-compose
open port 3000 and 8888 in google cloud platform firewall

and follow the Teslalogger Docker Setup: bassmaster187/TeslaLogger

I did not make any performance tests, so it's up to you.

Well, I have the micro-f1 server up and running on GCP.
DNS is configured and working.
Firewall ports 3000 and 8888 are opened.
Installed docker and docker-compose latest versions
I can connect to my server via web browser (over the internet, no VPN) to http://my domain:8888/admin
But when I go to settings, to enter my credentials and set the correct settings/language, I get this error :

errortext = 'Error: Connection refused - URL:

Anybody know what's going on here ?

(moderator note: url removed as I dont know where it is going and this is a new poster.
url was http slash slash teslalogger colon five thousand slash get all cars)

 
Last edited by a moderator:
EDIT : Ok, that error appeared apparently because I was too quick connecting, before TeslaLogger was finished creating the database. When I waited a couple of minutes that error was gone.

However, my car is not seen even if I entered the information correctly in the TeslaLogger.exe.config file.
Also in the admin console - settings I am not able to enter my credentials, then the error "JSON parse error" appears.

(P.S. thank you moderator for changing the URL, I have good intentions though :) )
 
  • Like
Reactions: jjrandorin
Nearly there, just need to overcome some issues.

In the log an error appears :

05.03.2021 14:44:01 : Exec_mono: rm -rf /etc/teslalogger/tmp/*
05.03.2021 14:44:01 : Exec_mono: rm -rf /etc/teslalogger/tmp
05.03.2021 14:44:02 : Exec_mono: mkdir /etc/teslalogger/tmp
05.03.2021 14:44:03 : Exec_mono: mkdir /etc/teslalogger/tmp/Grafana
05.03.2021 14:44:04 : update view: trip
05.03.2021 14:44:04 : CopyFilesRecursively Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path '/etc/teslalogger/git/TeslaLogger/Grafana'.
at System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) [0x000f7] in <254335e8c4aa42e3923a8ba0d5ce8650>:0

at System.IO.FileSystemEnumerableIterator`1[TSource].HandleError (System.Int32 hr, System.String path) [0x00006] in <254335e8c4aa42e3923a8ba0d5ce8650>:0
at System.IO.FileSystemEnumerableIterator`1[TSource].CommonInit () [0x00054] in <254335e8c4aa42e3923a8ba0d5ce8650>:0
at System.IO.FileSystemEnumerableIterator`1[TSource]..ctor (System.String path, System.String originalUserPath, System.String searchPattern, System.IO.SearchOption searchOption, System.IO.SearchResultHandler`1[TSource] resultHandler, System.Boolean checkHost) [0x000d6] in <254335e8c4aa42e3923a8ba0d5ce8650>:0
at System.IO.FileSystemEnumerableFactory.CreateFileNameIterator (System.String path, System.String originalUserPath, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) [0x00009] in <254335e8c4aa42e3923a8ba0d5ce8650>:0
at System.IO.Directory.InternalGetFileDirectoryNames (System.String path, System.String userPathOriginal, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) [0x00000] in <254335e8c4aa42e3923a8ba0d5ce8650>:0
at System.IO.Directory.InternalGetDirectories (System.String path, System.String searchPattern, System.IO.SearchOption searchOption) [0x00000] in <254335e8c4aa42e3923a8ba0d5ce8650>:0
at System.IO.Directory.GetDirectories (System.String path, System.String searchPattern) [0x0001c] in <254335e8c4aa42e3923a8ba0d5ce8650>:0
at System.IO.DirectoryInfo.GetDirectories (System.String searchPattern) [0x0000e] in <254335e8c4aa42e3923a8ba0d5ce8650>:0
at System.IO.DirectoryInfo.GetDirectories () [0x00000] in <254335e8c4aa42e3923a8ba0d5ce8650>:0
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo.GetDirectories()
at TeslaLogger.Tools.CopyFilesRecursively (System.IO.DirectoryInfo source, System.IO.DirectoryInfo target, System.String excludeFile) [0x00003] in <2dd46289e1b34584b42cff1410735b47>:0
05.03.2021 14:44:04 : End Grafana update


And a little later this error :

shm 65536 4 65532 1% /dev/shm
tmpfs 303336 0 303336 0% /proc/acpi
tmpfs 303336 0 303336 0% /sys/firmware
05.03.2021 14:44:35 : Exec_mono: /usr/bin/du -sk /etc/teslalogger/backup
05.03.2021 14:44:36 : #1: Error in GetTokenAsync: One or more errors occurred. (A task was canceled.)

05.03.2021 14:44:36 : #1: Abort: Tesla_token == NULL

05.03.2021 14:44:36 : #1: *** Exit Loop !!!
05.03.2021 14:44:36 : 4 /etc/teslalogger/backup
05.03.2021 14:44:36 : Exec_mono: /usr/bin/du -sk /etc/teslalogger/Exception

05.03.2021 14:44:37 : 36 /etc/teslalogger/Exception
05.03.2021 14:44:37 : Exec_mono: /usr/bin/du -sk /etc/teslalogger/nohup.out
05.03.2021 14:44:38 : 112 /etc/teslalogger/nohup.out
05.03.2021 14:44:38 : Housekeeping: database usage (teslalogger)


Are these errors related ? Does someone know the solution ?
 
I still face 3 problems :

1. My car isn't recognized. I do not have 2FA/MFA enabled on my account.
Credentials are correct in TeslaLogger.exe.config (checked by logging in my account manually).

I still get this error :

shm 65536 4 65532 1% /dev/shm
tmpfs 303336 0 303336 0% /proc/acpi
tmpfs 303336 0 303336 0% /sys/firmware
05.03.2021 14:44:35 : Exec_mono: /usr/bin/du -sk /etc/teslalogger/backup
05.03.2021 14:44:36 : #1: Error in GetTokenAsync: One or more errors occurred. (A task was canceled.)

05.03.2021 14:44:36 : #1: Abort: Tesla_token == NULL

05.03.2021 14:44:36 : #1: *** Exit Loop !!!
05.03.2021 14:44:36 : 4 /etc/teslalogger/backup
05.03.2021 14:44:36 : Exec_mono: /usr/bin/du -sk /etc/teslalogger/Exception

05.03.2021 14:44:37 : 36 /etc/teslalogger/Exception
05.03.2021 14:44:37 : Exec_mono: /usr/bin/du -sk /etc/teslalogger/nohup.out
05.03.2021 14:44:38 : 112 /etc/teslalogger/nohup.out
05.03.2021 14:44:38 : Housekeeping: database usage (teslalogger)


2. The Teslalogger homescreen doesn't show anything.
Probably related to nr. 1 that my car isn't recognized. I noticed that it says TeslaLogger version 1.47.0.0 where latest version on Github is 1.46.5. Is there a wrong version in the docker image ?

3. Grafana doesn't show anything. I get constant errors saying :

Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'and TIMESTAMPDIFF(MINUTE, chargingstate.StartDate, chargingstate.EndDate' at line 16"

Any help is much appreciated.
 
I still face 3 problems :

1. My car isn't recognized. I do not have 2FA/MFA enabled on my account.
Credentials are correct in TeslaLogger.exe.config (checked by logging in my account manually).

I still get this error :

shm 65536 4 65532 1% /dev/shm
tmpfs 303336 0 303336 0% /proc/acpi
tmpfs 303336 0 303336 0% /sys/firmware
05.03.2021 14:44:35 : Exec_mono: /usr/bin/du -sk /etc/teslalogger/backup
05.03.2021 14:44:36 : #1: Error in GetTokenAsync: One or more errors occurred. (A task was canceled.)
I think you didn't wait to build / update the whole database long enougt. Please go to admin panel / settings / credentials.
Is there your car listet? if not, please add a new car. Otherwise please send me your whole logfile.