How to set-up 2 TeslaMate instances on a Raspberry Pi? #1339
Unanswered
fvanson
asked this question in
Getting started
Replies: 1 comment 3 replies
-
I am giving up on this option, so I will go for a 2nd Raspberry Pi 4 Model B with a Samsung T5 SSD as I do not believe that it is possible to have 2 instances via Docker running 1 Raspberry Pi. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
--- updated 2021.02.15 ---
I have currently TeslaMate running on a Raspberry Pi 4 Model B 4GB together with a Samsung T5 SSD with 500GB. I use TeslaMate simultaneously with TeslaFi for our family Tesla Model 3 (still 6 months of subscription to TeslaFi left so that I have time to see whether I like TeslaMate as its replacement or not). TeslaMate is running next to Domoticz and HomeBridge, so there is still a good portion of capacity available on the Raspberry Pi.
I have now ordered also a Tesla Model 3 to replace my current ICE company car, and would like to add it to TeslaMate on the same Raspberry Pi. So this Tesla Model 3 will have another Tesla account. From what I read this is possible, but it would require a second instance of TeslaMate and Grafana to run on the Pi. It is possible to use same Postgres instance but with a separate database, and use the same MQQT broker. I know that this project is not designed around multi-account tool, but it was in several discussions mentioned that it should be possible by running certain programs in parallel via Docker.
Via a Tesla Motors Club thread, I managed to get to the below docker.compose.yml file which works partially. It does keep the existing installation alive and running, and some of what is needed works but the needed additional database is not working. Anybody able to help out on what I need to do to get a second instance of TeslaMate running on the same Raspberry Pi?
Thank you in advance for your help!
My docker-compose.yml file is stored in my /home/pi folder, and the content is has evolved now to one as can be seen below:
With above, the 1st instance of TeslaMate runs without issues.
2nd instance of Grafana can be accessed via :4001
2nd instance of TeslaMate frontend is not available via :3001
When stopping and starting teslamate2 instance, I get following log:
So the issue appears to be the creation of the 2nd database next to the database used for the 1st instance of TeslaMate. From what I believe to understand - being new to the Raspberry Pi environment - the definition of the database is in an old format of Ecto, but I have no clue how to run the mentioned commands 'mix ecto.create' and 'mix ecto.drop'. I have tried even a second database definition in the docker-compose.yml, but also that did not work. So I start to get stuck.
Would love to get a 2nd instance of TeslaMate running on 1 Raspberry Pi as it keeps environmental footprint small; no additional Raspberry Pi + SSD, and not a 2nd Pi running 24/7.
Thank you in advance for your hints, answers, etc.
Beta Was this translation helpful? Give feedback.
All reactions