Replies: 16 comments 28 replies
-
If I continue having problems here, will downgrade to 1.21.0 and see if that helps. |
Beta Was this translation helpful? Give feedback.
-
I experience this occasionally as well. I’ve mostly gotten into the habit of checking if I recently got home or something (within the time frame that it might be trying to fall asleep). What I don’t fully understand is why this functionality is still needed in Teslamate after moving to the Streaming API. Why does Teslamate ever stop listening to the car? Will the car not sleep if Teslamate doesn’t perform this “disconnect”? |
Beta Was this translation helpful? Give feedback.
-
It seems to be constantly happening every time now for me that I upgraded to 1.21.1 I tried the "cancel sleep attempt" before the last trip, but it had already entered "falling asleep" before I left. I am going to downgrade to 1.21.0, at least this will give confirmation if 1.21.1 actually made things worse or not. |
Beta Was this translation helpful? Give feedback.
-
I believe the theory is that the car cannot go to sleep while teslamate is connected to the streaming API. But I am not entirely sure of my facts here. |
Beta Was this translation helpful? Give feedback.
-
Last trip worked fine. Maybe just a string of bad luck? I would like to think that the code could be improved somehow to solve this, but not really sure I know enough about the "falling asleep" mode to come up with a solution with won't prevent sleep from occuring. |
Beta Was this translation helpful? Give feedback.
-
My attempt to downgrade to 1.21.0 was a failure, due to it constantly the token after unsuccessful renewal (approxish once an hour). Logs: https://gist.github.com/brianmay/4351597a43561253544f530b5d23a5a5. Which unfortunately means I can't easily test this bug with 1.21.0. I have not seen it ever miss any trips before I upgraded to 1.21.1 however. I have now upgraded to 1.21.2 |
Beta Was this translation helpful? Give feedback.
-
If this is still a problem with 1.21.2 - and I have seen reports it is (#1280 (comment)) - I would like to be able to disable the sleep mode entirely. If I get the time I might see if I can understand the code enough to to create an option to do this. |
Beta Was this translation helpful? Give feedback.
-
The car can only fall asleep if no queries are made via the API. Therefore events CANNOT be detected during this time. However, using the streaming API, TeslaMate is permanently connected until the car goes to sleep. This way we can detect when you start driving or charging during this period (no other logger I know of does this). However, only very limited information can be received via this method. The crucial thing here is that TeslaMate is able to connect to the streaming API. If this is not the case, short trips can be missed. Keep in mind that TeslaMate is only the "last link in the chain", so if the other systems are not working correctly or are not available, data will be missed. |
Beta Was this translation helpful? Give feedback.
-
If there is no other solution, I would still like to see a way of disabling the sleep mode, e.g. during daylight hours when the car doesn't seem to want to go to sleep anyway. |
Beta Was this translation helpful? Give feedback.
-
Just some random thoughts:
Also note that Tesla app seems to be fine during these periods, but will try do some more testing to try to confirm this. Not entirely convinced here. |
Beta Was this translation helpful? Give feedback.
-
I've got a car ('16 Model S facelift) which is suffering from slow instrument cluster startup if I enable the Display -> Energy saving option. If I have 'energy saving' off and 'always connected' on, the IC always wakes up instantly. The side-effect is that the car does not sleep. I have the same issue with streaming, lots of disconnects and often missing the beginning of a drive. Last week I registered to TeslaFi trial, and it seems to work perfectly. I believe it's just polling, and not streaming. I tried to switch using the non-streaming setting in Teslamate, but the problem is even bigger. The default setting is to try to poll the car every 21 minutes when attempting to go asleep. Since my car never goes to sleep, the Teslamate polling only polls every 21 minutes, which leads to even worse data loss. I am now experimenting with these settings (set via SQL + restart the teslamate container). Let's see... |
Beta Was this translation helpful? Give feedback.
-
Will summarise my observations so far. I believe what is suppose to happen:
What is actually happening:
Theory - need to prove or disprove:
Need to check:
Possible solution:
|
Beta Was this translation helpful? Give feedback.
-
I think I just confirmed that "When teslamate is in "falling asleep" it only sometimes ignores events". |
Beta Was this translation helpful? Give feedback.
-
There are two methods for retrieving data from the car, polling (https://owner-api.teslamotors.com/api/1/vehicles/...) and streaming (wss://streaming.vn.teslamotors.com/streaming/) Polling can return all available details about the status of the car. However, Polling will prevent the car from falling asleep. Attempting to Poll the car while it is asleep will return a 408 (Request Timeout) Streaming data from the car will return a smaller subset of details. Streaming does not prevent the car from falling asleep. TeslaMate attempts to keep a stream open to the car at all times.
Because the streaming API does not return information like... window, door, trunk/funk, or charge port door status, these state changes are not noticed/recorded while the TeslaMate is However, because a streaming connection is aggressively maintained, state changes from |
Beta Was this translation helpful? Give feedback.
-
OK, so only have skimmed through the updates from yesterday, but to me it sounds like if the Tesla is in "Waiting to sleep" mode for a large period of time (e.g. car doesn't want to go to sleep for any reason), then there is a large chance events will get missed. Because we don't poll the car, and the streaming API is limited in what events it will report. It sounds like we could poll the car every 15 minutes in this mode - on the assumption that if we have been waiting for sleep this long, the car isn't going to sleep anyway. Which isn't great. But better then not getting any updates. |
Beta Was this translation helpful? Give feedback.
-
I switched to scheduled charging, starting at midnight in February. Before I got my car sleeping, I was missing data from the beginning of each charge. There was also a similar problem with drives. Now my car is sleeping, and the reporting is just perfect. So there definitely is a problem with streaming API mode and cars which refuse to sleep.
|
Beta Was this translation helpful? Give feedback.
-
Describe the bug
I just noticed that when Teslamate it in "falling sleep" mode, which often seems to be the case with my car, it doesn't notice any events that occur with the car. Including driving the car a short distance. Even though the car is awake. As in the Tesla now makes complete trips which are unobserved by teslamate. But as soon as a "cancel sleep attempt" it works out immediately what is happening.
e.g. on several occasions I have "cancel sleep attempt" and it immediately updated the plugged in status, the position of the vehicle, the charge status, etc.
Not sure if coincidence or not, but Teslamate ignoring events in "falling sleep" mode seems to have got a lot worse since I upgraded from 1.21.0 to 1.21.1.
I have copied this from #1221 is this is likely an unrelated bug.
Expected behavior
teslamate should notice when state of car has changed, or if somebody starts trip. Otherwise it is kind of pointless :-)
How to reproduce it (as minimally and precisely as possible):
Relevant entries from the logs
Don't think this really helps. But log entries at time I canceled the sleep attempt:
Environment
Beta Was this translation helpful? Give feedback.
All reactions