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.

TeslaMate Super Thread

Discussion in 'Model 3: User Interface' started by focher, Dec 16, 2019.

  1. focher

    focher Member

    Joined:
    Oct 15, 2013
    Messages:
    988
    Location:
    Bay Area
    Thank you to those who introduced the app and the developer. TeslaMate is a complete self-hosted way to collect car stats without giving over credentials to a third party.

    It’s available as a Docker container, the easiest way to run many apps on your computer, a NAS appliance, or a Raspberry Pi.

    Let’s use this thread to help each other set it up and configure it.
     
    • Helpful x 2
    • Informative x 1
  2. TydalForce

    TydalForce Member

    Joined:
    Nov 24, 2019
    Messages:
    221
    Location:
    West Chester, PA, USA
    Putting this on my to-do list, looks like fun.
    First I have to figure out which of my random machines to install it on.
     
  3. focher

    focher Member

    Joined:
    Oct 15, 2013
    Messages:
    988
    Location:
    Bay Area
    The beauty of Docker is the portability and ease of moving containers.

    Personally I have it on a NAS but considering putting it on the Pi I have in the car.
     
  4. HostileHarry

    HostileHarry Member

    Joined:
    Sep 4, 2018
    Messages:
    276
    Location:
    Chicago
    Just wondering if anyone was able to get it running on unRAID NAS? I can't seem to get it mapping correctly. I pulled it from the DockerHub...
    image.jpg
     
  5. andy92782

    andy92782 Member

    Joined:
    Oct 14, 2018
    Messages:
    249
    Location:
    Southern Calfornia
    This looks way cool so I installed it. Got the docker compose file up and running on my RPi4 but nothing happens when I log in. The console output constantly spits out errors from Grafana (it keeps erroring out and restarting).
     
  6. andy92782

    andy92782 Member

    Joined:
    Oct 14, 2018
    Messages:
    249
    Location:
    Southern Calfornia
    Nevermind, got it running!

    (Hint for those who are REALLY nerdy: If you run pihole in another Docker container on the same machine, you'll have to add a "dns" entry for each of the services called out in docker-compose.yml).
     
  7. focher

    focher Member

    Joined:
    Oct 15, 2013
    Messages:
    988
    Location:
    Bay Area
    Do you have access to an ssh terminal on that NAS? Without knows all the GUI settings for Docker containers on that NAS, it will be hard to help much. And a lot of NAS devices do not expose all the configuration parameters you might need. TeslaMate is also actually three containers. One is the TeslaMate web application, one is the Grafana server (for graphs etc), and the other is a database server to store the data.

    The best approach is to use the command line if it's available. Then it's as simple as copying and pasting the docker-compose.yml file into a file on the NAS, then issuing a "docker-compose up" command to start the container.
     
  8. paulk

    paulk Member

    Joined:
    Jan 26, 2019
    Messages:
    88
    Location:
    hartford, ct
    i did get it running well on unraid, but not via the normal docker templates. i used the same way most other
    systems use docker, docker-compose.

    first, install "nerd pack" from Apps, then use that to install docker-compose.

    just put the docker-compose.yml copied from the teslamate instructions somewhere like /mnt/user/appdata/teslamate, then from that directory:
    docker-compose up -d

    anytime you want to update it, cd to the directory, and:
    docker-compose down; docker-compose pull; docker-compose up -d

    then go to http://tower.local:4000 or http://tower.local:3000

    id love an unraid template, but im not savvy enough to convert it over. it shows up on the dashboard, but missing some clickables from the unraid gui.
     
    • Helpful x 1
  9. HostileHarry

    HostileHarry Member

    Joined:
    Sep 4, 2018
    Messages:
    276
    Location:
    Chicago
    Going to try this later today. It seems that there are a decent amount of Tesla owners who use unRIAD. I saw someone over on Reddit was going to try and create an unRAID TeslaMate template (maybe). I will report back later to see if I can get it to work.

    Thank you very much Paulk.
     
  10. HostileHarry

    HostileHarry Member

    Joined:
    Sep 4, 2018
    Messages:
    276
    Location:
    Chicago
    #10 HostileHarry, Dec 18, 2019
    Last edited: Dec 18, 2019
    @paulk I got Nerdpack installed and then went to Settings and installed docker-compose. Now I'm a bit stuck as to where I can find the CLI/Shell it complete the rest. Do you mind pointing me to the correct tab? Thank you.

    Edit: I figured it out. It's been a while since I've used command line linux :) Installing it all now.
     
  11. TaroNL

    TaroNL New Member

    Joined:
    Jan 6, 2020
    Messages:
    2
    Location:
    NL
    I'm using Teslamate for a while now and want to move it from a Windows server with Docker to a Raspberry Pi 4 with Docker. It's installed on both now, but I don't succeed in moving the old data to the RPI. Someone knows if this is possible and what to copy? I already found some manuals on how to move Docker containers or volumes, but I still see a fresh install and no old data.
     
  12. paulk

    paulk Member

    Joined:
    Jan 26, 2019
    Messages:
    88
    Location:
    hartford, ct
    #12 paulk, Feb 5, 2020
    Last edited: Feb 5, 2020
    I imagine you’d have to dump the Postgres database from your windows docker to the pi, as Postgres is where all the data is stored. enter a shell inside the source server's Postgress docker, go into a folder that's mapped to the host, and use the pg_dump command.

    $ pg_dump -U {user-name} {source_db} -f {dumpfilename.sql}

    on my install, the username and db are both named teslamate, so my command looked like this:

    $ pg_dump -U teslamate teslamate -f dataBackup.sql

    get out of the docker, and then on the host transfer that .sql file (mine was 46mb) to the raspberry into a folder that's mapped to the destination postgres docker. enter that Postgres docker's shell, go into the mapped directory so you can see the sql file, and overwrite its database:

    $ psql -U {user-name} -d {desintation_db}-f {dumpfilename.sql}

    for me, it would look like this:

    $ psql -U teslamate -d teslamate -f dataBackup.sql
     
    • Informative x 1
  13. TaroNL

    TaroNL New Member

    Joined:
    Jan 6, 2020
    Messages:
    2
    Location:
    NL
    @paulk Thanks, I also found this page, which in fact does almost the same: Backup and Restore. Going to try this tomorrow.
     
  14. ranova

    ranova Member

    Joined:
    Apr 16, 2018
    Messages:
    360
    Location:
    NorCal
    i have Hassio installed on my rasp pi 4, anyway to manually install TeslaMate on the rasp pi 4 to run concurrently? Im really new to the whole pi and linux thing
     
  15. TMThree

    TMThree Active Member

    Joined:
    Mar 28, 2019
    Messages:
    1,116
    Location:
    USA
    I'm running teslamate on an AWS Lightsale instance. Low cost and always online. Zero issues so far, but I still need the TeslaFi import option so I have 100% metrics on my car.
     
  16. paulk

    paulk Member

    Joined:
    Jan 26, 2019
    Messages:
    88
    Location:
    hartford, ct
    Hassio shouldn't get in the way of Teslamate. Just install Docker and follow the Teslamate instructions.
     
  17. hugh_jassol

    hugh_jassol Member

    Joined:
    Jan 26, 2019
    Messages:
    708
    Location:
    Los Angeles
    You won’t be able to do it if you install hassio from the hassio image.

    IF you install plain old raspbian on the pi, then install Docer-ce (community edition), then install hassio using these instruction (install for generic Linux host), THEN you can install the Teslamate docker container along side hassio. The issue is the “regular” hassio install completely takes over the whole pi for hass. This, is of course easy for beginners, but then your pi is dedicated to running hassio and its add-ones only.

    If you are new to Linux and docker, you might struggle with this a bit.
     
    • Like x 1
  18. ranova

    ranova Member

    Joined:
    Apr 16, 2018
    Messages:
    360
    Location:
    NorCal
    yep, been struggling with rasbian, docker, and docker-compose the past day and boy, you are right. Im probably going to still go this route since I only just recently started with home assistant so might as do it now since Rasp Pi 4 4gb is pretty overkill for just Home Assistant
     
  19. bizarro252

    bizarro252 Member

    Joined:
    Dec 21, 2019
    Messages:
    23
    Location:
    Idaho
    I could not get Python to cooperate on the docker-compose portion... I ended up just re-imaging my Rasberry Pi to the newest version os Rasbian - worked like a charm after that.
     
  20. ranova

    ranova Member

    Joined:
    Apr 16, 2018
    Messages:
    360
    Location:
    NorCal
    I ended up scrapping my Rasp Pi 4 and created a Ubuntu VM on my main desktop. Everything is working so far and its much, much faster than Rasp Pi 4 - which can be seen with the new TeslaFi import feature. It took my Pi4 overnight to import from April of last year and it only took a few hours on my desktop

    I hope that Teslamate adds a feature of estimated gas saved by week, month, year, all time, etc
     
    • Like x 1

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