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. bassmaster

    bassmaster Member

    Joined:
    Oct 23, 2017
    Messages:
    80
    Location:
    Germany
    You must setup port forwarding in your router, so you can access it trough the browser in your Tesla.

    20191113_084544_admin (Large).jpg
     
  2. bassmaster

    bassmaster Member

    Joined:
    Oct 23, 2017
    Messages:
    80
    Location:
    Germany
    We have now Netherland translation.
    If you want to contribute a translation in your language feel free to contact me.

    upload_2020-5-11_1-18-39.png
     
  3. bedoig

    bedoig Member

    Joined:
    Nov 29, 2016
    Messages:
    477
    Location:
    The Woodlands, TX
    Any update on the Pi 4 image? I'm a TeslaFi user but have been interested in these self-hosted options. The fact that yours can integrate with ScanMyTesla is really appealing.
     
  4. bassmaster

    bassmaster Member

    Joined:
    Oct 23, 2017
    Messages:
    80
    Location:
    Germany
    We have actually more than 10 test users without any problems. I'll send you a link to the beta image. You can import your TeslaFi data.
     
    • Like x 1
  5. baronlf

    baronlf Member

    Joined:
    Jan 27, 2020
    Messages:
    19
    Location:
    Pinecrest, FL
    I currently run TeslaMate on a Pi3, but I am very interested in giving Teslalogger a try. A couple of questions:

    - will this work on a Pi Zero W?
    - can you import data from TeslaMate?
     
  6. bedoig

    bedoig Member

    Joined:
    Nov 29, 2016
    Messages:
    477
    Location:
    The Woodlands, TX
    Got it up and running yesterday, pulled in 19 months of TeslaFi data (only took ~1 hour), and got ScanMyTesla data pulling in too. Pretty cool! How big does the database get over time? I've only got it running on a 32GB card so I'm curious if I'm going to need something bigger or if external storage is an option.
     
  7. bassmaster

    bassmaster Member

    Joined:
    Oct 23, 2017
    Messages:
    80
    Location:
    Germany
    Im still using the old RasperryPi 3B with a 16GB Card since 1,5 Years / 35000mls + 6 Months of ScanMyTesla Data. That all is 75MB of Database an my SD Card has still 10GB of free Blocks. So it will pretty much last longer than my car :)

    upload_2020-5-14_18-54-35.png

    upload_2020-5-14_18-55-36.png
     
    • Like x 1
  8. bassmaster

    bassmaster Member

    Joined:
    Oct 23, 2017
    Messages:
    80
    Location:
    Germany
    I didn't test it on a Pi Zero W, but I think it is very slow. I woldn't recomand it.
    Actually we don't have an import tool from TeslaMate - just for TeslaFi. But we get more and more requests about an import tool.
     
  9. bassmaster

    bassmaster Member

    Joined:
    Oct 23, 2017
    Messages:
    80
    Location:
    Germany
    We have released a new Feature. You can compare your car with the fleet, if you share your data anonymously.
    Please make an update and go to settings page in admin panel. There are a lot of other compare funktions.

    [​IMG]
     
    • Like x 1
  10. bassmaster

    bassmaster Member

    Joined:
    Oct 23, 2017
    Messages:
    80
    Location:
    Germany
  11. bahree

    bahree Member

    Joined:
    Jul 9, 2018
    Messages:
    86
    Location:
    Seattle
    Any benefits on this over TeslaMate? I don't use ScanMyTesla - and seems both forked from the same base, looking at the repo, I can't see anything that stands out (outside of ScanMyTesla).
     
  12. bassmaster

    bassmaster Member

    Joined:
    Oct 23, 2017
    Messages:
    80
    Location:
    Germany
    You can compare your projected range and charging curve with all other teslalogger users. If you want to sell your car, you can make much more money, if you can prove your car is much better then other cars. Or if your car is worse than other cars, you may have better arguments against tesla motors.

    We are working on identifying bad batteries, but you need ScanMyTesla for that. We need signals for that which are not comming from tesla API.
     
  13. awaghorn

    awaghorn Member

    Joined:
    Feb 14, 2020
    Messages:
    34
    Location:
    UK
    Can you install this on an existing Debian 9 install? I have an existing home server that due to some other services I can’t run docker on. Can I run it natively connecting to an existing mariaDB instance?
     
  14. bassmaster

    bassmaster Member

    Joined:
    Oct 23, 2017
    Messages:
    80
    Location:
    Germany
    yes, it is possible. You can find everything you need in the dockerfile:
    bassmaster187/TeslaLogger
    bassmaster187/TeslaLogger
    bassmaster187/TeslaLogger

    So basically what you need is:
    - All the files from my github repository.
    - Mono Version 5.20.1.34 or any 5.x Mono version. Make sure you won't use Mono 6.x as it has a CPU leak problem! see: CPU usage increasing after a few hours · Issue #158 · bassmaster187/TeslaLogger
    - Grafana 6.3.5 is tested. May work with other versions.
    - Mariadb - i think any version should go.

    create database from /docker-entrypoint-initdb.d/sqlschema.sql
    copy all files from docker to given folder.
    so copy files from /TeslaLogger/bin to /etc/teslalogger
    and so on. You can see the paths in dockerfile:
    volumes:
    - ./TeslaLogger/www:/var/www/html
    - ./TeslaLogger/bin:/etc/teslalogger
    - ./TeslaLogger/GrafanaDashboards/:/var/lib/grafana/dashboards/
    - ./TeslaLogger/GrafanaPlugins/:/var/lib/grafana/plugins
    - teslalogger-grafana-usr:/usr/share/grafana/
    - ./docker/teslalogger/Dockerfile:/tmp/teslalogger-DOCKER
    - teslalogger-tmp:/tmp/

    Set Connectionstring as described in:
    bassmaster187/TeslaLogger

    make sure, "Server" points to your existing server. If it runs on the same machine, you have to use localhost.

    if you have any problems, PM me.
     
    • Like x 1
  15. awaghorn

    awaghorn Member

    Joined:
    Feb 14, 2020
    Messages:
    34
    Location:
    UK
    Thanks for coming back to me. There isn't an easy way (other than changing the source and recompiling) to change the paths is there? Some of these will clash with other stuff on the server (or are in places that I don't think are correct and hence mess up backups - e.g. etc is for config not executables)?
     
  16. bassmaster

    bassmaster Member

    Joined:
    Oct 23, 2017
    Messages:
    80
    Location:
    Germany
    Which paths are the Problem? /etc/teslalogger is pretty much everywhere, but I don't think this would be a show stopper.
    For all other paths we could find a fast solution.
     
  17. camalaio

    camalaio Active Member

    Joined:
    May 28, 2019
    Messages:
    1,483
    Location:
    Vernon, BC, Canada
    #37 camalaio, Jun 2, 2020
    Last edited: Jun 2, 2020
    Not one of the devs but I've played with this stuff a bit. Speaking from experience, you're likely to run into far more issues outside of Docker than you are within it, including but not limited to what you've already mentioned. It's really designed for operation via Docker as they have it. It's nice of them to point out that you can do it without, but I feel it is my duty as a developer to point out that they're being too nice about things they probably don't intend to support :p

    If there's any way you can get Docker working that'll be way better for the future (esp. if you need to take an update, they add/remove something, etc.). You can customise the compose file if you want to do something like re-use a MariaDB instance that's already running on the host, but still use dockerized components for the rest.

    Source: I have a very messed up Linux partition due to trying to skip Docker for too many things while keeping each thing happy.
     
    • Like x 1
  18. bassmaster

    bassmaster Member

    Joined:
    Oct 23, 2017
    Messages:
    80
    Location:
    Germany
    We can now compare maximum charging speed depending on firmware of the whole fleet.

    You can see the statistics even if you actually don't have Teslalogger running. But you can't compare your car against the fleet.
    Fleet Charging MAX (Firmware)


    upload_2020-6-10_19-48-15.png
     
    • Like x 1
  19. T.R.T.e.s.l.a.

    Joined:
    Nov 8, 2018
    Messages:
    460
    Location:
    LX
    And how can one do that?
    I got a raspberry and Teslalogger from you,but i'm not very good with computers, browsers and etc..., so i can only access Teslalogger when i'm at home and even when i do i can't get much info from it....
    I still get all my info from TeslaFi and ScanMyTesta
     
  20. bassmaster

    bassmaster Member

    Joined:
    Oct 23, 2017
    Messages:
    80
    Location:
    Germany
    Try to find someone who can set it up in your router. There are many routers out there, so I can't give you a step by step instuction. You basically need a port forwarding to Port 80 and 3000 to your raspberry and a dyndns address or similar.
     

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