Comments (32)
OK let me try this - but the question I have - is there a way to save/keep the data so I don't loose that? Any way to backup the db and then restore it or even script it out in terms of a data dump?
Thanks.
@bahree, having a backup is never a bad idea ;) Not sure if there are incompatibilities between both Docker versions or if uninstalling the package also deletes the volumes but in theory downgrading and restarting is all that is necessary. Purging the db volume is not required.
@drklain, awesome! Glad it works. Like I said earlier, the vehicle detection has nothing to do with the range. What's more important to me right now is, that it actually detects you have a S 90D.
Regarding range: it's rated range vs ideal range. Is that maybe a difference between EU and US cars? Here, I always want to see the ideal range. It matches what the app displays. So feel free to update the dashboards where necessary. Maybe someone will send in a PR that makes the range configurable ...
@speedxibit Great! Yeah, that's probably because the logging was suspended when you started driving. Check the logs for more information.
from teslamate.
in order to update go to the directory where docker-compose.yml file is located, assuming you didn't hardcode versions in docker-compose.yml file you can run the following ...
docker-compose pull
docker-compose up -d
from teslamate.
What do you see in the logs of the teslamate
container?
from teslamate.
"waiting for postgres at 127.0.0.1:5432"
from teslamate.
Do you use the docker-compose.yml to run everything? If so, make sure the DATABASE_HOST
variable is set to db
.
from teslamate.
Yes, I used the docker-compose.yml to run everything. I only changed the IP address and timezone in an attempt to get it working thinking that I'll change more settings and redeploy later on.
from teslamate.
Look's good to me. Which steps did you take to get it all started? And is
"waiting for postgres at 127.0.0.1:5432"
really the only thing showing up if you run
docker-compose logs teslamate
from teslamate.
To get started, I created the docker-compose.yml file and copied over to my docker folder. Then I used the docker-compose up -d command to pull all the containers to run them.
If I issue the docker-compose logs teslamate command in the ssh terminal, the response is:
Attaching to docker_teslamate_1
teslamate_1 | WARNING: no logs are available with the 'db' log driver
This is the log in the Synology Docker Packgage:
from teslamate.
Hmm. You've probably already tried to restart with docker-compose restart
?
I'm not familiar with the Synology Docker Package ... @natrlhy can you help out here?
from teslamate.
Actually, it should print waiting for postgres at db:5432 (2sec)
. Some environment variables seem to be missing.
What do you see if you issue the command: docker-compose config
? Does it help to restart? If the above mentioned command did not work try docker-compose down && docker-compose up
.
from teslamate.
Restarting and reinstalling didn't help. However, uninstalling and rolling back to an earlier version of Docker seemed to have made an impact.
The log now does show "waiting for postgres at db:5432 (2sec)"
Any insight on these new errors that I'm seeing?
from teslamate.
There seems to be an issue with the database user / role. You could try do to start completely fresh by removing all volumes (this will delete all data, e.g. logged drives if there are any!):
# stop everything and delete volumes:
docker-compose down -v
docker-compose up -d
from teslamate.
OK, I suddenly started having the same issue. I tried the docker-compose down -v and got the following results, and now when I want to navigate to port 4000 don't get anything.
Below is what I got:
# docker-compose down -v Stopping docker_db_1 ... done Stopping docker_mosquitto_1 ... done Stopping docker_grafana_1 ... done Stopping docker_teslamate_1 ... done Removing docker_db_1 ... done Removing docker_mosquitto_1 ... done Removing docker_grafana_1 ... done Removing docker_teslamate_1 ... done Removing network docker_default Removing volume docker_teslamate-db ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information. If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60). root@whs:/volume1/docker# docker-compose down -v Removing network docker_default WARNING: Network docker_default not found. Removing volume docker_teslamate-db WARNING: Volume docker_teslamate-db not found. Removing volume docker_teslamate-grafana-data Removing volume docker_mosquitto-conf Removing volume docker_mosquitto-data root@whs:/volume1/docker# docker-compose up -d Creating network "docker_default" with the default driver Creating volume "docker_teslamate-db" with default driver Creating volume "docker_teslamate-grafana-data" with default driver Creating volume "docker_mosquitto-conf" with default driver Creating volume "docker_mosquitto-data" with default driver Creating docker_teslamate_1 ... done Creating docker_mosquitto_1 ... done Creating docker_grafana_1 ... done Creating docker_db_1 ... done root@whs:/volume1/docker#
And whilst the Grafana dashboard on port 3000 loads, it cannot see anything. I am on Synology too where everything was running fine.
Any suggestions?
from teslamate.
And I tried with the beta too as suggested for another issue and it is broken. Any suggestions?
from teslamate.
Pulled the docker logs for the db as well. Here's what I see:
I agree with you that there is something funky between your 1.6.2 software and the 1.7.0 beta software but it is odd since we are just talking interpreting what kind of car it is using a different variable. Kind of sucks because now I can either live with the wrong range data (because 1.6.2 thinks my Model S 90D is a Model 3 or nothing since 1.7.0 doesn't seem to work...
I'm happy to try to assist you in troubleshooting but not sure what else I can give you to help.
from teslamate.
I'm actually pretty sure that this is not related to v1.7. Your previously posted screenshot (#123 (comment)) shows that is tries to connect to 127.0.0.1:5432
. However, it should read the DATABASE_HOST=db
variable from your docker-compose. This was probably triggered by restarting Teslamate and it would've happend with 1.6.2 too.
from teslamate.
Would you recommend running docker-compose up -d again? Or something else?
from teslamate.
Well, I'm running out of ideas to be honest ... It all looks like Teslamate is not the issue here so I cannot help really. Can you rollback to the previous Docker version like @speedxibit did? Or do you have a spare Raspberry Pi lying around that could run Teslamate instead?
from teslamate.
Well I tried a complete wipe out. Deleted everything including docker. Reinstalled docker and then installed teslamate using the docker-compose.yml file. grafana runs but teslamate does not so no way to put in information about my car. teslamate log shows it is looking for postgres at 127.0.0.1 vice looking at db (same issue reported by @speedxibit above). Kind of a bummer because at this point I have no way to use Teslamate (even with the wrong range on 1.6.2) and I have no idea how to get it working again.
I saw a reference to rolling back to an earlier version of docker (as opposed to Teslamate) but have no idea how to do that. I just uninstalled it on the synology then reinstalled the package via the package manager...
from teslamate.
Just did a quick google search and found this: https://www.synoforum.com/threads/updated-docker-package-18-09-0-0505-available.1354/ It confirms the bug all of you are seeing.
@telos: you might revert to the latest 17.05 release. When the container is created with docker-compose or docker stack deploy, the environment variables are missing in the resulting container.
Oddly, containers created before the update, still keep their environment variables.
Container started with
docker run -e
or from the Syno-Docker-UI are not affected.
from teslamate.
Adrian - you are a stud! Was able to get things working again (although a bit painful and I lost all my old data). There may be a way to do this without losing all the data, but here's what I did (for a synology install).
- Download the old (working) Docker version 17.05.0. Download it from https://usdl.synology.com/download/Package/spk/Docker/17.05.0-0401/ and save the .spk file to your computer.
- Go to the Package Center and click the installed tab. Click on the docker package (not the open button but around there). It will open up the package and you have a button with a drop down arrow...click the arrow and select "uninstall". This deletes everything.
- In the package center at upper right is a button for "Manual Install". Click that. In the file folder, point it to the .spk file you saved in step 1. It will now install the older version of Docker.
WARNING -- ONCE INSTALLED, SYNOLOGY WILL TELL YOU THERE IS A NEWER VERSION AND GIVE YOU AN "UPDATE" BUTTON. DO NOT DO THIS AS IT TAKES YOU TO THE NEW (BROKEN) VERSION OF DOCKER. - Once Docker is installed, install Teslamate per the instructions at #113.
You should be up and running in a few minutes!
@adriankumpf - thank you so much for your assistance in getting this running. Finding that link that the issue was a newer version of docker on synology was the key and it never occurred to me since Teslamate was working fine on the new version of docker since I had installed it on the OLD version of docker... One question -- I installed the 1.7.0 beta. Right now the degradation tab is still showing a range of 351 miles but presumably the system should be recognizing I'm a Model S 90D and have a lower range. I'm not sure if that will change if I drive the car for a bit, but wanted to let you know that range still appears to be wrong.
from teslamate.
OK let me try this - but the question I have - is there a way to save/keep the data so I don't loose that? Any way to backup the db and then restore it or even script it out in terms of a data dump?
Thanks.
from teslamate.
Adrian, thanks for putting together this wonderful package and for the the support! It's an amazing asset especially given Tesla's shenanigans with all the recent updates.
Just to confirm what @drklain has stated, mine is also working on 17.05.0-401 of Docker. All my issues seemed to revolve around the fact that I was using a newer version. Once I rolled back, and deleted the volumes per Adrian with docker-compose down - v, everything started working. Deleting the containers within Synology was not sufficient.
I've only had 1 hiccup since getting it going was that Teslamate lost connection to the car. The timing seems to link up with driving the car when it was attempting to go to sleep but I'm not sure if that was the cause. In any event, restarts wouldn't work but deleting the volumes and reinstalling has resolved it.
I'm also seeing inflated range values. I haven't checked what the car states but I wonder if that variable is tied to the "Ideal Range" rather than "Rated Range".
from teslamate.
from teslamate.
Currently, that can be only done by checking the database. The final v1.7 will display that on the web interface.
from teslamate.
For me to deprecate I had to uninstall the previous version and blow away all the data and then start all over again.
from teslamate.
from teslamate.
V1.7 was just released :) You can safely switch to that. The web interface now shows the model below the car‘s name.
from teslamate.
from teslamate.
from teslamate.
Perfect. Thanks!
from teslamate.
For those unaware, you can close the 4 docker containers and then enter the parameters that have been missed (about 10 in total across the 4)and restart, only takes a couple of minutes, no data lost.
Pending an actual fix from Synology.
from teslamate.
Related Issues (20)
- Tesla Tokens (Android) is no longer available. HOT 3
- Statistics and Trip display are inconsistent HOT 14
- feat request: velocity histogram in drive dashboard HOT 10
- Wrong Battery Capacity calculation after upgrade to 1.28.5 HOT 1
- After car updated to 2024.8.7 overview never shows state as "asleep" anymore. Shows "offline" instead HOT 2
- Timeline kWh is incorrect for miles HOT 1
- Dashboards missing units for miles
- Statistics efficiency color thresholds
- Statistics temperature color missing for Fahrenheit HOT 2
- doc: add testing with ci build docker images to contributing guide
- Statistics page "Starting at" data / column incorrect HOT 29
- Statistics dashboard link via other dashboards does not pass TZ into URL HOT 7
- Error when restoring Teslamate backup HOT 5
- charge is split and lots of it is missing HOT 2
- Grafana is unable to connect to the database HOT 2
- Upgrade the car infotainment version to: 2024.8.9 testamate which will display offline status every time the car goes to sleep HOT 2
- Docker update error while installing 1.28.5 (from 1.28.3), if using deprecated docker compose version HOT 2
- edge not updated? HOT 4
- Distance traveled on drive graph doesn't update is the time range is changed HOT 5
- Status Offline - should be Standby HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from teslamate.