-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
General Question - Real-Time Logging #80
Comments
Yes, data is logged in real time. It polls vehicle data from the Tesla API. Therefore the car needs to be online but it does not necessarily need to be on WiFi.
That only happens after the car has been idling for 15 minutes (e.g. after charging / driving). If you then start driving again, data may not be logged until those 21 minutes have elapsed. It depends on your usage pattern whether that happens regularly. If so, you could try out the solution described in the FAQ :) |
Hm Ok. I purposely woke the car up at home a few times before my wife drove it on an errand. It didn't log the trip to there, but it logged the trip back. She was there for over 40 minutes (sentry mode on) We don't leave sentry mode on at home in the garage so it sleeps regularly. |
@natrlhy You could create a script on your computer that will resume logging and run it before you leave if the options in the FAQ don't work for you (not quite as convenient as from your phone though). https://gist.github.com/Rfvgyhn/55c146dcc2615261e004c28cc987a425 |
Since I don't have teslamate public facing I may try a local script. What I'm wondering is would it be a curl command with In both examples, there is no port specified so I'm just trying to understand what API call to which docker container it's going to be referencing (if this makes sense) |
curl should have no problem parsing the port. Assuming |
@natrlhy The 15-minutes period could also be made configurable. Would it help to increase it to 30 or even 60 minutes? |
@adriankumpf making the timeout / callback / check if car is awake period configurable would be great also if it can be changed by api. Then one could do interesting home automation tweaks. ie: when car is "home" then configure a longer check time vs when the car isn't "home" etc ... |
Making it configurable to an increase in time would make it so less data would be captured, no? Is there a way to set the API to see if the car is online and resume logging based on that state? Since it has a persistent connection, why not just poll for the Status. If the status changes from asleep to online, then send an instant resume for logging. I love data, even though I may not understand it all at times, so the more data that can be captured, the better! :) |
Okay, so you mean the default interval of 60 seconds if the car is asleep, right? Theoretically we could just reduce it a bit e.g. to 30 seconds for everyone. It only increases the load on the Tesla servers but besides that there is no negative impact on the power consumption of the car. |
No, it would cause the car to stay online/awake longer i.e. if you're on short errands where the car is parked only for a short period of time, it would become less likely that no data is logged.
This is the way it works :) When the car is asleep teslmate checks its status every 60 seconds. |
Oh I meant the 21 minute period but I think either one being configurable ... Maybe I'm getting confused by how you have polling setup during different states ... |
So the logger API call is different than me opening up my Tesla app and "waking" the car up a bit before I might be leaving seems to be different. Is that act just sending a wake API call and not triggering any logging/scraping? I was able to manually run I guess I'm not understanding why, if teslamate checks every 60 seconds if the car is online/offline, why it won't just start logging data right away if the state changes from offline to offline at any given point. If changing this status check from 60s to 30s only loads Tesla's API servers and won't consume any more power for the car, that would be great! I guess in the end my thinking is, if any data gaps can be eliminated that's the ideal goal. |
In general the By explicitly informing the logger when its safe to start "falling asleep" ( It's a bit confusing, I guess. Just give it a try and see if it's worth the effort to perform these API calls :) |
I'm a new Tesla owner so maybe I'm opening up the Tesla App too much :). It wakes it up, then I'm not sure how long it takes to fall back asleep (maybe that 15 minutes that you are referring to?). Also I ended up setting up VPN on my home router and the iOS tasks I've created do work so I'm good with not exposing my instances to the outside world since I can leverage home VPN (thanks again to Synology and their cool routers/NAS solutions). If in doubt about logging, maybe I can just tell it to |
Almost. Teslamate assumes it takes 21 minutes and tries again if it takes longer than that.
👍
Yes, that's the way to go if you really want to make sure everything is logged from the start. Closing this for now. Feel free to open another issue if there are any more questions. |
@adriankumpf thanks for being very responsive to all these threads and questions :) |
You're welcome! :) |
Just a general question as my wife went out on an errand.
Is the data logged real time?
Does the car have to be on WiFi (same network as teslamate) in order for data to get pulled, etc?
I saw that the 1st 21 minutes of a trip won't be logged. If we run short errands, etc none of this will be tracked/logged?
The text was updated successfully, but these errors were encountered: