Giter Club home page Giter Club logo

Comments (32)

adriankumpf avatar adriankumpf commented on May 10, 2024 1

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.

normalfaults avatar normalfaults commented on May 10, 2024 1

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.

adriankumpf avatar adriankumpf commented on May 10, 2024

What do you see in the logs of the teslamate container?

from teslamate.

speedxibit avatar speedxibit commented on May 10, 2024

"waiting for postgres at 127.0.0.1:5432"

from teslamate.

adriankumpf avatar adriankumpf commented on May 10, 2024

Do you use the docker-compose.yml to run everything? If so, make sure the DATABASE_HOST variable is set to db.

from teslamate.

speedxibit avatar speedxibit commented on May 10, 2024

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.

Screen Shot 2019-08-21 at 1 50 29 PM

from teslamate.

adriankumpf avatar adriankumpf commented on May 10, 2024

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.

speedxibit avatar speedxibit commented on May 10, 2024

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:
Screen Shot 2019-08-21 at 3 11 53 PM

from teslamate.

adriankumpf avatar adriankumpf commented on May 10, 2024

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.

adriankumpf avatar adriankumpf commented on May 10, 2024

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.

speedxibit avatar speedxibit commented on May 10, 2024

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?

Screen Shot 2019-08-26 at 4 14 12 PM

from teslamate.

adriankumpf avatar adriankumpf commented on May 10, 2024

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.

bahree avatar bahree commented on May 10, 2024

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.

bahree avatar bahree commented on May 10, 2024

And I tried with the beta too as suggested for another issue and it is broken. Any suggestions?

from teslamate.

drklain avatar drklain commented on May 10, 2024

Pulled the docker logs for the db as well. Here's what I see:
teslamate

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.

adriankumpf avatar adriankumpf commented on May 10, 2024

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.

drklain avatar drklain commented on May 10, 2024

Would you recommend running docker-compose up -d again? Or something else?

from teslamate.

adriankumpf avatar adriankumpf commented on May 10, 2024

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.

drklain avatar drklain commented on May 10, 2024

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.

adriankumpf avatar adriankumpf commented on May 10, 2024

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.

drklain avatar drklain commented on May 10, 2024

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.

bahree avatar bahree commented on May 10, 2024

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.

speedxibit avatar speedxibit commented on May 10, 2024

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.

drklain avatar drklain commented on May 10, 2024

from teslamate.

adriankumpf avatar adriankumpf commented on May 10, 2024

Currently, that can be only done by checking the database. The final v1.7 will display that on the web interface.

from teslamate.

bahree avatar bahree commented on May 10, 2024

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.

drklain avatar drklain commented on May 10, 2024

from teslamate.

adriankumpf avatar adriankumpf commented on May 10, 2024

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.

drklain avatar drklain commented on May 10, 2024

from teslamate.

drklain avatar drklain commented on May 10, 2024

from teslamate.

adriankumpf avatar adriankumpf commented on May 10, 2024

Perfect. Thanks!

from teslamate.

IMgoRt avatar IMgoRt commented on May 10, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.