Comments (17)
Is the data logged real time?
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.
I saw that the 1st 21 minutes of a trip won't be logged.
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 :)
from teslamate.
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.
from teslamate.
@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
from teslamate.
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 http://localiphere:4000/api/car/1/logging/resume
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)
from teslamate.
curl should have no problem parsing the port. Assuming http://localiphere:4000
is the address you use in your browser to access the web interface and assuming anonymous auth, it should look like curl -X PUT http://localiphere:4000/api/car/1/logging/resume
from teslamate.
@natrlhy The 15-minutes period could also be made configurable. Would it help to increase it to 30 or even 60 minutes?
from teslamate.
@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 ...
from teslamate.
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! :)
from teslamate.
@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 ...
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.
from teslamate.
Making it configurable to an increase in time would make it so less data would be captured, no?
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.
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.
This is the way it works :) When the car is asleep teslmate checks its status every 60 seconds.
from teslamate.
@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 ...
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.
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 ...
from teslamate.
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 curl -X PUT http://myiphere:4000/api/car/1/logging/resume
and right away TeslaMate changed from "offline" to "online". Sending the curl command to suspend put it into a "falling asleep" status.
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.
from teslamate.
In general the suspend
and resume
calls are not required for the logger to work. It may just happen that in some situations the first few minutes (up to 21 in the worst case) of a trip are not logged. But really most of the time you should not notice any data gaps.
By explicitly informing the logger when its safe to start "falling asleep" (suspend
) and when the process of falling asleep i.e. the 21-minute period should be aborted (resume
), any data gaps can be eliminated.
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 :)
from teslamate.
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?).
So part of me is thinking this helps the teslamate logging be ready. But if I don't end up driving the car anywhere after I wake up, it's going back to sleep, etc.
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 resume
right when I'm about to jump in the . car and see how that goes. I try not to overthink this stuff but I can't help myself with all the cool things that one can do with a Tesla!
from teslamate.
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?).
Almost. Teslamate assumes it takes 21 minutes and tries again if it takes longer than that.
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 resume right when I'm about to jump in the car.
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.
from teslamate.
@adriankumpf thanks for being very responsive to all these threads and questions :)
from teslamate.
You're welcome! :)
from teslamate.
Related Issues (20)
- Missing v1.28.2 ghcr.io build? HOT 2
- Grafana "This site can't be reached" HOT 7
- Intermittent charges incorrectly recorded HOT 9
- Impossible GPS coordinates HOT 1
- Suspend logging is not needed anymore as car falls asleep even while polling HOT 47
- Can't get the carId . already logging by the tesla token! HOT 2
- Release 1.28.3 seemingly not correctly pushed as arm64 image HOT 1
- WebView crashes while charging, if time_zone_not_found HOT 7
- Drive records are not saved HOT 4
- No connection to Tesla API / non-existing domain *done* HOT 3
- Trips with negative gradient do not record correctly HOT 8
- feat: bundle MQTT data in one json blob HOT 8
- Wrong time zone for estimated charge end, TZ environment variable set correctly HOT 9
- New Model Y does not get discovered in version 1.28.3 HOT 1
- Model S MCU1 sleep issues HOT 16
- Battery Health - LFP - Status: 500. Message: convert frame from rows error: pq: division by zero HOT 4
- Has edge been updated? HOT 3
- TZ environment variable name confusion HOT 22
- Error on QNAP TS-231P3 HOT 1
- Extend version with more build info HOT 5
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.