Open markusdd opened 1 year ago
cool. you can share whatever you have in your fork I am happy to apply it quickly and check as well.
I have commited something. Maybe you've already seen it if you have a watch on the fork :)
The commit message explains the changed, i hope:
Fixed fetch_result handler to only go to state start when current state is offline or asleep. Before it caused a vehicle_data request in suspended even though not intended (since it actually went to state start where vehicle_data is allowed when false_online=false, which it is in online and suspended)
Added a clause in suspended if power > 0 to go back to online (e.g. if climate is turned on remotely with app. That works, not sure if opening door without climate on is enough to trigger this (power seems to be integers, but hopefuly rounded up)
I'll pull and try! thanks so much.
What is the best way to update the changed files in my docker image to try? Sorry that's a pretty basic question..
imho there is no way as the container does not have the build environment (but I might be mistaken)
I do run the manual setup and can simply pull in the changes and recompile/restart
I agree, don't think it's possible. At least it must be built first, but it still might not be so easy to get the files into docker.
The correct and best way is to build a docker image in the build environment. (@markusdd what happens if you run the command 'make teslamate' in the teslamate top folder?) I'm running build and test environment in WSL2 on Windows. Haven't gotten docker build to work (yet) I'm also considering to go the manual way instead :)
No idea, I always use a mix deps something command I saved a long time ago when I first installed it.
I always just go back to my notes for updating etc.
Cannot look at it right now as I am at work.
Thanks - so the easiest method to try at this point is to do a manual install, using your fork as a replacement for the normal repo (or just replacing changed files)?
Thanks - so the easiest method to try at this point is to do a manual install, using your fork as a replacement for the normal repo (or just replacing changed files)?
yes that is the case. and either will work. just use the fork of @micves or replace the 3 files manually in your workspace.
Not quite sure what happened but in the last 2 days I had a phase where the car was really sleeping well:
Now we seem to be back too the known (improved, but not yet perfect) pattern.
I also still have a few short wakeups for 15 minutes. I also have had a few long wakeups: The day before yesterday it was awake for now real reason for 4 hours. The same this morning. Today I tried opening the app while it was online. It couldn't really connect. I went to the car and opened the door. It seemed slow to react on pressing the door handles, but the was no click as there usually is when its offline and I wake it by app/door/chargeport.
It seems that the suspending of getting vehicle_data is working fine, so its not that keeping it awake. It might just be the car or tesla api doing it. I read somewhere that the cars can wake up to charge the low voltage system (12V battery)
Anyways. At the moment it goes to real online when stream data reports power as a number and not nil. To improve I wonder if it would make sense to only go to real online if power is a number and not 0 (charging or usage). When I opened the door today it triggered the 'Usage detected' even though climate was not on. Furthermore it should go online if non-vehicle_data reports online for more than like 4 minutes. Otherwise we would miss the true online that comes whenever the app does something, or the car wants to do something.
I also still have a few short wakeups for 15 minutes. I also have had a few long wakeups: The day before yesterday it was awake for now real reason for 4 hours. The same this morning. Today I tried opening the app while it was online. It couldn't really connect. I went to the car and opened the door. It seemed slow to react on pressing the door handles, but the was no click as there usually is when its offline and I wake it by app/door/chargeport.
It seems that the suspending of getting vehicle_data is working fine, so its not that keeping it awake. It might just be the car or tesla api doing it. I read somewhere that the cars can wake up to charge the low voltage system (12V battery)
Anyways. At the moment it goes to real online when stream data reports power as a number and not nil. To improve I wonder if it would make sense to only go to real online if power is a number and not 0 (charging or usage). When I opened the door today it triggered the 'Usage detected' even though climate was not on. Furthermore it should go online if non-vehicle_data reports online for more than like 4 minutes. Otherwise we would miss the true online that comes whenever the app does something, or the car wants to do something.
Your observations pretty much match mine. I also have the feeling the wakeup phases are now actual sleep phases where only parts of the system are online. I also suspect the charging of the 12V battery to be responsible for some of it. Suspending vehicle_data-endpoint definetly seems to have helped. I have to compare vampire drain numbers but my impression alsready is that it is less.
When it comes to the power=0-strategy, I do not know how cars e.g. in sentry-mode would behave.
I think sentry is okay. I use it myself when I park at public shopping and so on. When you park it will go from drive state to online state. And it stays online as long as sentry is on (its a car thing) Even when teslamate suspends.
That is also why power != 0 is not enough. Thats why I would make a extra check if fake-online for 4 minutes then go real online. If you start the sentry mode from app it would then take 4 mintues before teslamate figures it out.
I haven't measured it so precisely. But in my above cases this woould re-introduce the polling of vehicle_data during the long online phases where the acr does not seem to be fully online.
My thought was to still have the test in stream data for power being a number, but also give it 4 minutes, in case stream is reporting wrong. My earlier tests showed that with only non-vehicle_data (using TeslaPy) it would only be subsystem online for 2-3 minutes. I think the long online phases are real onlines. Otherwise we have even more states of online. Even when we suspend it stays online when polling the non-vehicle_data. I've been out driving today, with both pauses with sentry (online all the time) but also offline, where everything seemed correct. (And a quick view in the logs seems to show that power != 0 would not have been correct...
Maybe the long onlines come when the car havent been driven in some time.
This is all very odd.
I still am not quite sure how this happens but if you look at the end of the last 30 days I had phases where the car slept like a baby for moore than a day no problem, so from left to right the situation improved.
Also saw no issues with waking up for charging or climate use (did some roatripping beginning of the week and all was well).
I somehow feel your initial fix you provided is actually very close to what is needed, it works very well for me at least.
Yes, this looks very promising. I'd like to test it, but I'm running the docker container and am not able to do a manual installation as it fails to me. Hopefully there's a way to dockerize it so I can make use of this build.
I too was unable to get it working with a manual install. Any plans to do a PR so it can get merged in?
This would require a review and discussion with @adriankumpf who has unfortunately been unrepsonsive on this for months now.
I also would love too see this on mainline because it essentially shoudl also benefit non-upgrade-MCU2 cars with the new logic that pools vehicle_data more rarely.
I cannot comment why you cannot get it to work on the manual install, this actually wokred pretty well for me.
This would require a review and discussion with @adriankumpf who has unfortunately been unrepsonsive on this for months now.
I also would love too see this on mainline because it essentially shoudl also benefit non-upgrade-MCU2 cars with the new logic that pools vehicle_data more rarely.
I cannot comment why you cannot get it to work on the manual install, this actually wokred pretty well for me.
What setup do you use for the manual install? I use a Proxmox setup with a LXC container. If you have the same, maybe you can share a bit about the installation steps? My installation hangs on not willing to start the service after compiling.
It stays in some start/stop loop and doesn’t show the exact error.
mmh that is odd, if you get through compilation the most difficult part is over and I use exactly the same, I have an LXC debian container
Without an error message it woould be difficult, as I use a standard systemd unit as well
I tried it again because of your positive experience :)
I see I didn't add the MQTT Port, User/Pass in the systemd file. The other issue was that my existing database didn't had the port exposed to outside docker, so I added that port and it starts up! Also I deleted a token from the database to create a fresh connection with the manual build.
I'll come back with my test experience.
So far my results are positive aswell! The car has much longer sleepcycles (around 8hrs) with sometimes a short wake. When I start driving my car, the drives are correctly registered.
I'm following the manual install steps (https://docs.teslamate.org/docs/installation/debian/), just pointing to micves/teslamate for the repo instead.
With the guide step:
MIX_ENV=prod mix do phx.digest, release --overwrite
I'm getting the following error:
could not compile dependency :floki, "mix compile" failed. You can recompile this dependency with "mix deps.compile floki", update it with "mix deps.update floki" or clean it with "mix deps.clean floki"
Results in the service start with an error of:
teslamate.service - TeslaMate Loaded: loaded (/etc/systemd/system/teslamate.service; disabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Wed 2023-06-21 13:50:46 EDT; 325ms ago Process: 139445 ExecStartPre=/usr/src/teslamate/_build/prod/rel/teslamate/bin/teslamate eval TeslaMate.Release.migrate (code=exited, status=203/EXEC) CPU: 635us
I do not have a prod/rel/ directory (only lib), making an assumption due to the build error.
Any advice for me? Thanks!
did you try the suggestions that the error gives?
I remember that I had that with other packages in the past and usually a rebuild oor clean helped.
Yeah sorry I should have mentioned I did try the suggestions with the same resulting error after reperforming that step. Otherwise, we did get a new release last week, so maybe there is hope of this fix being merged?
It is not even an offcial merge request yet and @adriankumpf has yet to react on anythign that has been going on in this thread. This issue has been going on for literally years with no visible reaction/interaction. I do not blame anyone for this for projects in their free time, but if this ignoring of this issue continues we might need to fork in the worst case or hand-maintain our installs, which sucks, because I believe we also have a general fix here for polling during suspend state.
I think @micves needs to do a PR himself so Adrian can merge it in the code?
For the manual installation, I did it this way:
sudo su
wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && sudo dpkg -i erlang-solutions_2.0_all.deb
sudo apt-get update
sudo apt-get install -y elixir esl-erlang
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt install git
cd /usr/src
git clone https://github.com/micves/teslamate.git
cd teslamate
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales #and followed the steps to install the UTF-8
mix local.hex --force; mix local.rebar --force
mix deps.get --only prod
npm install --prefix ./assets && npm run deploy --prefix ./assets
MIX_ENV=prod mix do phx.digest, release --overwrite
sudo nano /etc/systemd/system/teslamate.service
CONTENTS of the file:
[Unit]
Description=TeslaMate
After=network.target
After=postgresql.service
[Service]
Type=simple
Restart=on-failure
RestartSec=5
Environment="HOME=/usr/src/teslamate"
Environment="LANG=en_US.UTF-8"
Environment="LC_CTYPE=en_US.UTF-8"
Environment="TZ=Europe/Brussels"
Environment="PORT=4000"
Environment="ENCRYPTION_KEY=#ENTER YOUR ENCRYPTION KEY"
Environment="DATABASE_USER=#USERNAME FROM EXISTING DB"
Environment="DATABASE_PASS=#PASSWORD FROM EXISTING DB"
Environment="DATABASE_NAME=#DBNAME FROM EXISTING DB"
Environment="DATABASE_HOST=127.0.0.1"
Environment="MQTT_HOST=#YOUR MQTT HOST"
Environment="MQTT_PORT=1883"
Environment="MQTT_USERNAME=#YOUR MQTT USERNAME"
Environment="MQTT_PASSWORD=#YOUR MQTT PASSWORD"
WorkingDirectory=/usr/src/teslamate
ExecStartPre=/usr/src/teslamate/_build/prod/rel/teslamate/bin/teslamate eval "TeslaMate.Release.migrate"
ExecStart=/usr/src/teslamate/_build/prod/rel/teslamate/bin/teslamate start
ExecStop=/usr/src/teslamate/_build/prod/rel/teslamate/bin/teslamate stop
[Install]
WantedBy=multi-user.target
Hopefully it helps.
I hope to soon have some time to make a PR. Just need to make some small tweaks and clean up my TODO's :) And I might start by merging in the new changes from the main repo so we don't get left behind.
So I finally got around to fix some more and make a PR: https://github.com/adriankumpf/teslamate/pull/3262
For now you can pull the latest stuff from my fork. I have merged in all the new thing from upstream as well.
I upgraded my postgresql from 14 to 15 using this guide: https://www.kostolansky.sk/posts/upgrading-to-postgresql-15/
And of course also this: https://docs.teslamate.org/docs/upgrading under tab Manual
Thanks for all the hard work here! I managed to compile and create a new Docker container with your branch. So far, it's very promising on my 2017 Model S (you can see exactly when I updated Teslamate!).
For anyone else who wants to try this in a Docker installation, I created an image you can pull from Docker Hub. To use this in your existing Docker container, all you need to do is replace teslamate/teslamate:latest
with leandereberhard/teslamate_mcu2_fix_micves:20230626
in the docker_compose.yml
file. Then, run the following commands to update the container:
sudo docker compose pull
sudo docker compose up -d
Thank you for building the container! I will try it out next week. Edit - so far working perfectly after about 24 hours of idle. Thank you all for the work on this.
Thanks for all the hard work here! I managed to compile and create a new Docker container with your branch. So far, it's very promising on my 2017 Model S (you can see exactly when I updated Teslamate!).
For anyone else who wants to try this in a Docker installation, I created an image you can pull from Docker Hub. To use this in your existing Docker container, all you need to do is replace
teslamate/teslamate:latest
withleandereberhard/teslamate_mcu2_fix_micves:20230626
in thedocker_compose.yml
file. Then, run the following commands to update the container:sudo docker compose pull sudo docker compose up -d
Micves did an update to his PR. Does this automatically updates into your docker image or can you update it? Thanks!
Micves did an update to his PR. Does this automatically updates into your docker image or can you update it?
It's not automatic and I'd have to recompile the project to include any changes. The last commit I see though is Update last_used in suspended when charging or usage is detected., which is included in the image from last week.
Oh perfect, thanks for the confirmation :)
Thanks everyone for the great work on this!
I tried @leandreeberhard 's image but it didn't run too well on my Raspberry Pi. If anyone else needs an aarch64 Docker image I've built it and published it at splidge0r/teslamate:latest.
It seems to be working so far - seen the messages about fake online in the logs.
hey all!! amazing work trying to figure out the issue here!! is there any plan to also update the official release? or has this been fixed in any version? thanks 🙏
unfortunately there has not been any response from @adriankumpf on this despite tagging him multiple times and I am beginning to wonder if the project is actually dead. We somehow managed to get behind what is happening but we would need a maintainer to actually get this onto the mainline, as in my book it should improve things for all cars, not just MCU2 retrofits.
This has been stable for me for weeks. I had one small issue once where a longer drive was not started correctly and hence the data is missing, but the logged data also looks odd so maybe the API was actually acting up at that point. Other than that absolutely no issues.
@DrMichael – you have the most commits other than @adriankumpf in the Teslamate repo. Do you have any advice on how to get this merged into the main branch?
@DrMichael – you have the most commits other than @adriankumpf in the Teslamate repo. Do you have any advice on how to get this merged into the main branch?
Not really. Regarding Elixir code, I have no clue. So I could not confirm the PR's.
@adriankumpf Any chance, that you give someone the authority to accept PR's?
i also found this in the FAQ: https://docs.teslamate.org/docs/faq/#help-my-car-does-not-fall-asleep is it possible that is it true also for newer MCUs?
@adriankumpf @markusdd @DrMichael any idea if the project is dead? last PR merged mid June and seems that there are plenty that are waiting for merger. Thanks.
I have no idea. I have pinged Adrian like a hudnred times on this issue and no response at all.
I am wondering the same.
Thanks everyone for the great work on this!
I tried @leandreeberhard 's image but it didn't run too well on my Raspberry Pi. If anyone else needs an aarch64 Docker image I've built it and published it at splidge0r/teslamate:latest.
It seems to be working so far - seen the messages about fake online in the logs.
Hi, I can not get either of the containers to work on my raspberry pi 4? - do you know why. I just get restarting (159) with you're container and restarting(1) leandreeberhard container.
@VKrapalis You will need to build the Docker image on your local machine if your architecture doesn't match the posted docker images. This will rebuild it from the local cloned directory vs pulling the pre-compiled docker image.
git clone https://github.com/micves/teslamate.git
. You may want to clone it into a different directory than the original git clone https://github.com/micves/teslamate.git /home/pi/teslamate-micves
docker-compose.yml
as follows by commenting out image
and adding the build:
information
teslamate:
# image: teslamate/teslamate:latest
build:
context: /home/pi/teslamate #path to cloned files
dockerfile: Dockerfile
docker-compose build
docker-compose up
or docker-compose up -d
hey, maybe not same problem but i know that some people was able to solve the issue by removing the pendrive used to store sentry mode recordings. if removing it the problem is solved, you have to format the drive from your tesla car. hope it is useful 🙏
I cherry-picked from https://github.com/adriankumpf/teslamate/pull/3373 for everyone struggling with update 2023.38.x from Tesla. The PR https://github.com/adriankumpf/teslamate/pull/3262 is also updated.
I'm still on 2023.26.12 and have just been out driving after the change. It seems to be backward compatible as well
I also have a 2015 pre facelift Model S upgraded to MCU2.
I used this patch in my local fork (on top of #3373) and I see no difference:
here is the log (long online timemarked)
$ docker-compose logs -f teslamate
Attaching to teslamate_teslamate_1
teslamate_1 | waiting for postgres at database:5432
teslamate_1 | 2023-11-11 22:20:20.846 [info] Migrations already up
teslamate_1 | 2023-11-11 22:20:24.574 [info] System Info: Erlang/OTP 26 (emu)
teslamate_1 | 2023-11-11 22:20:24.574 [info] Version: 1.28.0-dev
teslamate_1 | 2023-11-11 22:20:26.424 [info] POST https://auth.tesla.com/oauth2/v3/token -> 200 (1782.252 ms)
teslamate_1 | 2023-11-11 22:20:26.425 [info] Refreshed api tokens
teslamate_1 | 2023-11-11 22:20:26.445 [info] Scheduling token refresh in 6 h
teslamate_1 | 2023-11-11 22:20:26.460 [info] Running TeslaMateWeb.Endpoint with cowboy 2.10.0 at :::4000 (http)
teslamate_1 | 2023-11-11 22:20:26.464 [info] Access TeslaMateWeb.Endpoint at http://localhost
teslamate_1 | 2023-11-11 22:20:26.649 [info] Starting logger for 'Nikola'
teslamate_1 | 2023-11-11 22:20:26.688 [info] MQTT connection has been established
teslamate_1 | 2023-11-11 22:20:26.798 car_id=1 [info] Start / :offline
teslamate_1 | 2023-11-11 22:20:28.828 [info] tzdata release in place is from a file last modified Fri, 22 Oct 2021 02:20:47 GMT. Release file on server was last modified Tue, 28 Mar 2023 20:25:39 GMT.
teslamate_1 | 2023-11-11 22:20:33.336 [info] Tzdata has updated the release from 2021e to 2023c
teslamate_1 | 2023-11-11 22:36:39.714 car_id=1 [info] Vehicle is online, connect stream to check for real online (power is a number and not nil)
teslamate_1 | 2023-11-11 22:36:39.714 car_id=1 [info] Connecting ...
teslamate_1 | 2023-11-11 22:36:39.715 car_id=1 [info] State was :offline, go to :start
teslamate_1 | 2023-11-11 22:36:40.623 car_id=1 [info] Real online detected: power is a number
teslamate_1 | 2023-11-11 22:36:40.765 car_id=1 [info] Start / :online
teslamate_1 | 2023-11-11 22:39:43.616 car_id=1 [info] Suspending logging
teslamate_1 | 2023-11-11 22:51:01.308 [info] Streaming API: Vehicle offline
teslamate_1 | 2023-11-11 22:51:01.308 car_id=1 [info] Stream reports vehicle as offline …
teslamate_1 | 2023-11-11 22:51:01.309 car_id=1 [info] Start / :offline
teslamate_1 | 2023-11-11 22:51:01.356 car_id=1 [info] Disconnecting ...
teslamate_1 | 2023-11-11 23:01:42.902 car_id=1 [info] Vehicle is online, connect stream to check for real online (power is a number and not nil)
teslamate_1 | 2023-11-11 23:01:42.902 car_id=1 [info] Connecting ...
teslamate_1 | 2023-11-11 23:01:42.903 car_id=1 [info] State was :offline, go to :start
teslamate_1 | 2023-11-11 23:01:43.893 car_id=1 [info] Real online detected: power is a number
teslamate_1 | 2023-11-11 23:01:44.024 car_id=1 [info] Start / :online
teslamate_1 | 2023-11-11 23:04:46.564 car_id=1 [info] Suspending logging
teslamate_1 | 2023-11-11 23:13:47.761 car_id=1 [info] Start / :offline
teslamate_1 | 2023-11-11 23:13:47.796 car_id=1 [info] Disconnecting ...
teslamate_1 | 2023-11-11 23:41:31.795 car_id=1 [info] Vehicle is online, connect stream to check for real online (power is a number and not nil)
teslamate_1 | 2023-11-11 23:41:31.795 car_id=1 [info] Connecting ...
teslamate_1 | 2023-11-11 23:41:31.796 car_id=1 [info] State was :offline, go to :start
teslamate_1 | 2023-11-11 23:41:32.978 car_id=1 [info] Real online detected: power is a number
teslamate_1 | 2023-11-11 23:41:33.116 car_id=1 [info] Start / :online
teslamate_1 | 2023-11-11 23:44:35.856 car_id=1 [info] Suspending logging
teslamate_1 | 2023-11-11 23:53:37.227 car_id=1 [info] Start / :offline
teslamate_1 | 2023-11-11 23:53:37.256 car_id=1 [info] Disconnecting ...
teslamate_1 | 2023-11-12 00:46:24.902 car_id=1 [info] Vehicle is online, connect stream to check for real online (power is a number and not nil)
teslamate_1 | 2023-11-12 00:46:24.902 car_id=1 [info] Connecting ...
teslamate_1 | 2023-11-12 00:46:24.903 car_id=1 [info] State was :offline, go to :start
teslamate_1 | 2023-11-12 00:46:25.869 car_id=1 [info] Real online detected: power is a number
-> start online
teslamate_1 | 2023-11-12 00:46:26.053 car_id=1 [info] Start / :online
teslamate_1 | 2023-11-12 00:49:28.842 car_id=1 [info] Suspending logging
-> end online
teslamate_1 | 2023-11-12 04:20:26.447 [info] Refreshing access token ...
teslamate_1 | 2023-11-12 04:20:27.041 [info] POST https://auth.tesla.com/oauth2/v3/token -> 200 (594.053 ms)
teslamate_1 | 2023-11-12 04:20:27.056 [info] Scheduling token refresh in 6 h
teslamate_1 | 2023-11-12 04:47:35.221 car_id=1 [info] Start / :offline
teslamate_1 | 2023-11-12 04:47:35.234 car_id=1 [info] Disconnecting ...
teslamate_1 | 2023-11-12 04:50:45.687 car_id=1 [info] Vehicle is online, connect stream to check for real online (power is a number and not nil)
teslamate_1 | 2023-11-12 04:50:45.687 car_id=1 [info] Connecting ...
teslamate_1 | 2023-11-12 04:50:45.688 car_id=1 [info] State was :offline, go to :start
teslamate_1 | 2023-11-12 04:50:46.910 car_id=1 [info] Real online detected: power is a number
teslamate_1 | 2023-11-12 04:50:47.040 car_id=1 [info] Start / :online
teslamate_1 | 2023-11-12 04:53:49.477 car_id=1 [info] Suspending logging
teslamate_1 | 2023-11-12 05:02:20.275 [info] Streaming API: Vehicle offline
teslamate_1 | 2023-11-12 05:02:20.276 car_id=1 [info] Stream reports vehicle as offline …
teslamate_1 | 2023-11-12 05:02:20.277 car_id=1 [info] Start / :offline
teslamate_1 | 2023-11-12 05:02:20.303 car_id=1 [info] Disconnecting ...
teslamate_1 | 2023-11-12 05:51:07.593 car_id=1 [info] Vehicle is online, connect stream to check for real online (power is a number and not nil)
teslamate_1 | 2023-11-12 05:51:07.593 car_id=1 [info] Connecting ...
teslamate_1 | 2023-11-12 05:51:07.594 car_id=1 [info] State was :offline, go to :start
teslamate_1 | 2023-11-12 05:51:08.595 car_id=1 [info] Real online detected: power is a number
teslamate_1 | 2023-11-12 05:51:08.730 car_id=1 [info] Start / :online
teslamate_1 | 2023-11-12 05:54:12.195 car_id=1 [info] Suspending logging
teslamate_1 | 2023-11-12 06:03:13.257 [info] Streaming API: Vehicle offline
teslamate_1 | 2023-11-12 06:03:13.257 car_id=1 [info] Stream reports vehicle as offline …
teslamate_1 | 2023-11-12 06:03:13.258 car_id=1 [info] Start / :offline
teslamate_1 | 2023-11-12 06:03:13.276 car_id=1 [info] Disconnecting ...
teslamate_1 | 2023-11-12 06:51:50.689 car_id=1 [info] Vehicle is online, connect stream to check for real online (power is a number and not nil)
teslamate_1 | 2023-11-12 06:51:50.689 car_id=1 [info] Connecting ...
teslamate_1 | 2023-11-12 06:51:50.691 car_id=1 [info] State was :offline, go to :start
teslamate_1 | 2023-11-12 06:51:51.620 car_id=1 [info] Real online detected: power is a number
teslamate_1 | 2023-11-12 06:51:51.747 car_id=1 [info] Start / :online
teslamate_1 | 2023-11-12 06:54:55.607 car_id=1 [info] Suspending logging
teslamate_1 | 2023-11-12 07:03:56.952 car_id=1 [info] Start / :offline
teslamate_1 | 2023-11-12 07:03:56.970 car_id=1 [info] Disconnecting ...
teslamate_1 | 2023-11-12 07:52:44.122 car_id=1 [info] Vehicle is online, connect stream to check for real online (power is a number and not nil)
teslamate_1 | 2023-11-12 07:52:44.122 car_id=1 [info] Connecting ...
teslamate_1 | 2023-11-12 07:52:44.123 car_id=1 [info] State was :offline, go to :start
teslamate_1 | 2023-11-12 07:52:45.056 car_id=1 [info] Real online detected: power is a number
teslamate_1 | 2023-11-12 07:52:45.189 car_id=1 [info] Start / :online
teslamate_1 | 2023-11-12 07:55:47.833 car_id=1 [info] Suspending logging
teslamate_1 | 2023-11-12 08:04:37.253 [info] Streaming API: Vehicle offline
teslamate_1 | 2023-11-12 08:04:37.254 car_id=1 [info] Stream reports vehicle as offline …
teslamate_1 | 2023-11-12 08:04:37.254 car_id=1 [info] Start / :offline
teslamate_1 | 2023-11-12 08:04:37.267 car_id=1 [info] Disconnecting ...
hey, maybe not same problem but i know that some people was able to solve the issue by removing the pendrive used to store sentry mode recordings. if removing it the problem is solved, you have to format the drive from your tesla car. hope it is useful 🙏
Sentry Mode prevents the car from sleeping anyway, so of cause this will "solve" the problem... ;o)
please guys do not conflate the 2023.x issue and sentry mode with what was described here. It is unrelated.
Is there an existing issue for this?
What happened?
The car only switches between online and offline state, sleep does never occur. Also, the log is littered with weird API errors and the wakeup times of the car are far too frequent and long, leading to bad phantom drain. Also raised this in the discussion area: https://github.com/adriankumpf/teslamate/discussions/3083
Expected Behavior
the car goes to sleep (not offline), there are no API query errors in the log and the car actually sleeps when it is not being used or charged
Steps To Reproduce
if only I knew, but I can give my config:
In the current example the below log output belongs to the last offline/online phase, error prints start happeneing at around the red arrow marker:
Relevant log output
Screenshots
ok....and now after a long wake period we are suddenly offline....that is weird.
Additional data
No response
Type of installation
Manual
Version
v1.27.2