TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker and becoming a Supporting Member. For more info: Support TMC
  1. TMC is currently READ ONLY.
    Click here for more info.

Open Source Teslalogger on Raspberry / Docker with ScanMyTesla integration

Discussion in 'Model 3' started by bassmaster, Apr 30, 2020.

  1. Klagio

    Klagio Member

    Joined:
    Oct 24, 2020
    Messages:
    55
    Location:
    Rome, Italy
    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)
     
  2. goRt

    goRt Member

    Joined:
    Nov 22, 2016
    Messages:
    277
    Location:
    Original Hampshire ;-)
    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 x 1
  3. rns-e

    rns-e Member

    Joined:
    May 5, 2013
    Messages:
    450
    Location:
    Denmark
  4. rns-e

    rns-e Member

    Joined:
    May 5, 2013
    Messages:
    450
    Location:
    Denmark
    #124 rns-e, Feb 28, 2021
    Last edited: Feb 28, 2021
    So it seems it is the length of my password that is the problem. My password is 63 characters

    Changed my password and now the car is connected
     
  5. Florian500

    Florian500 Member

    Joined:
    Jun 10, 2020
    Messages:
    56
    Location:
    Berlin (Germany)
    Looks like a lot of Tesla owners understand this Password Strength so we'll increase password length.
     
    • Like x 1
  6. bassmaster

    bassmaster Member

    Joined:
    Oct 23, 2017
    Messages:
    80
    Location:
    Germany
    Chinese translation is now available. Thanks to Alvin!

    upload_2021-3-3_13-31-28.png
     
  7. bassmaster

    bassmaster Member

    Joined:
    Oct 23, 2017
    Messages:
    80
    Location:
    Germany
    And danish translation by @rns-e

    [​IMG]

    [​IMG]
     
  8. sp33dm3

    sp33dm3 Member

    Joined:
    Wednesday
    Messages:
    7
    Location:
    The Netherlands
    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 ?
     
  9. swaltner

    swaltner Active Member

    Joined:
    Oct 13, 2012
    Messages:
    1,585
    Location:
    Kansas, USA
    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.
     
  10. sp33dm3

    sp33dm3 Member

    Joined:
    Wednesday
    Messages:
    7
    Location:
    The Netherlands
    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 ?
     
  11. bassmaster

    bassmaster Member

    Joined:
    Oct 23, 2017
    Messages:
    80
    Location:
    Germany
    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
     
  12. bassmaster

    bassmaster Member

    Joined:
    Oct 23, 2017
    Messages:
    80
    Location:
    Germany
    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.
     
  13. sp33dm3

    sp33dm3 Member

    Joined:
    Wednesday
    Messages:
    7
    Location:
    The Netherlands
    #133 sp33dm3, Mar 4, 2021 at 11:20 AM
    Last edited by a moderator: Mar 4, 2021 at 11:45 AM
    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)

     
  14. sp33dm3

    sp33dm3 Member

    Joined:
    Wednesday
    Messages:
    7
    Location:
    The Netherlands
    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 x 1
  15. sp33dm3

    sp33dm3 Member

    Joined:
    Wednesday
    Messages:
    7
    Location:
    The Netherlands
    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 ?
     
  16. rns-e

    rns-e Member

    Joined:
    May 5, 2013
    Messages:
    450
    Location:
    Denmark
    Are you running 64bit? If not, try that
     
  17. sp33dm3

    sp33dm3 Member

    Joined:
    Wednesday
    Messages:
    7
    Location:
    The Netherlands
    Yes, I'm running Debian 9 64bit on the GCP micro-f1 server
     
  18. sp33dm3

    sp33dm3 Member

    Joined:
    Wednesday
    Messages:
    7
    Location:
    The Netherlands
    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.
     

Share This Page

  • 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