Coder Social home page Coder Social logo

Comments (6)

PiotrRaszkowski avatar PiotrRaszkowski commented on June 2, 2024 1

Well, I work in IT so I am crazy about data and stats ;). I am testing Teslamate since yesterday.
I will "close" Tessie and monitor Teslamate for few days and check if it happens again.
Thank you for your help.

from teslamate.

cwanja avatar cwanja commented on June 2, 2024

Try and rebuild here:

Drive starts at 7:36PM

2024-01-05 07:36:35.088 [info] Start of drive initiated by: %TeslaApi.Stream.Data{time: ~U[2024-01-05 07:36:33.287Z], speed: 0, odometer: 21753.7, soc: 50, elevation: 85, est_heading: 332, est_lat: , est_lng: , power: 3, shift_state: "D", range: 141, est_range: 90, heading: 333}

Drive terminates (due to being put in park) at 7:57 (bolded P)

2024-01-05 07:57:55.016 [info] End of drive initiated by: %TeslaApi.Vehicle.State.Drive{gps_as_of:, heading: 227, latitude: , longitude: native_latitude:, native_location_supported: 1, native_longitude: native_type: "wgs", power: 2, shift_state: "P", speed: 0, timestamp: 1704441473719}

New drive when goes in reverse at 7:58 (bolded R)

2024-01-05 07:58:58.595 [info] Start of drive initiated by: %TeslaApi.Stream.Data{time: ~U[2024-01-05 07:58:57.711Z], speed: 1, odometer: 21758.9, soc: 48, elevation: 27, est_heading: 227, est_lat:, est_lng: , power: 1, shift_state: "R", range: 133, est_range: 93, heading: 224}

Put into park (bolded P) at 7:59 (reversing into a parking space is my assumption, hence short drive)

2024-01-05 07:59:38.680 [info] End of drive initiated by: %TeslaApi.Vehicle.State.Drive{gps_as_of:, heading: 309, latitude: , longitude: , native_latitude: native_location_supported: 1, native_longitude: native_type: "wgs", power: 2, shift_state: "P", speed: 0, timestamp: 1704441577684}

Then attempts to fall asleep, thus missing the drive home.

2024-01-05 08:38:33.292 car_id=1 [info] Vehicle is still online. Falling asleep for: 33 min
2024-01-05 09:08:34.229 car_id=1 [info] Vehicle is still online. Falling asleep for: 1 h 3 min

To your specific questions:

  1. TeslaMate has two drives (home to school and school to parking spot) due to shifting from drive to park and then park to reverse. Maybe TeslaFi has a design to merge these two drives if within a short amount of time. TeslaMate does not.
  2. It is missing the drive home due to falling asleep. What does your sleep settings look like?

from teslamate.

PiotrRaszkowski avatar PiotrRaszkowski commented on June 2, 2024

Hi @cwanja ,
Thank you for your response and clarification. You are right, it is ok that TeslaMate see 2 drives (with additional parking activities).
Regarding my sleep settings I can see only this:
image
Is there anything else?

from teslamate.

cwanja avatar cwanja commented on June 2, 2024

Based upon that, your car will attempt to sleep locked or unlocked in a parked state. Based upon your TeslaFi timeline and the logs (and some assumptions), the car was parked for roughly seven to eight minutes and TeslaMate suspended logging and attempted to begin falling asleep.

What seems odd is that between 8:11 and 8:37, the device was unable to fetch the vehicle state:

2024-01-05 08:11:41.463 car_id=1 [info] Fetching vehicle state ...
2024-01-05 08:23:06.212 car_id=1 [info] Fetching vehicle state ...
2024-01-05 08:29:28.628 car_id=1 [info] Fetching vehicle state ...
2024-01-05 08:37:44.658 car_id=1 [info] Fetching vehicle state ...

Thus missing drive. Did you experience network connectivity issues on the device hosting TeslaMate by chance? Typically a connectivity issue to Tesla servers / API would be logged as well, but by these logs it seems it was unable to retrieve the state. Notice the difference at 8:37:

2024-01-05 08:37:44.658 car_id=1 [info] Fetching vehicle state ...
2024-01-05 08:38:33.292 car_id=1 [info] Vehicle is still online. Falling asleep for: 33 min

Seems connectivity based from the logs. One way to prevent sleeping when the vehicle is unlocked (thus suspending logging) is to check that box.

from teslamate.

PiotrRaszkowski avatar PiotrRaszkowski commented on June 2, 2024

Hello,
I was at home that time and I don't remember any connectivity issues but I found that I posted wrong logs (due to bad timezone probably). I am sorry for that.

First drive, correct, 7:39 -> 7:04.

2024-01-05 05:09:18.354 [info] Refreshing access token ...
2024-01-05 05:09:18.952 [info] POST https://auth.tesla.com/oauth2/v3/token -> 200 (596.851 ms)
2024-01-05 05:09:18.962 [info] Scheduling token refresh in 6 h
2024-01-05 06:39:12.550 car_id=1 [info] Start / :online
2024-01-05 06:39:12.567 car_id=1 [info] Connecting ...
2024-01-05 06:39:25.806 [info] Start of drive initiated by: %TeslaApi.Stream.Data{time: ~U[2024-01-05 06:39:24.076Z], speed: 0, odometer: 21745.7, soc: 55, elevation: 76, est_heading: 334, est_lat: , est_lng: , power: 1, shift_state: "D", range: 155, est_range: 102, heading: 335}
2024-01-05 06:39:25.806 car_id=1 [info] Driving / Start
2024-01-05 07:04:40.539 [info] GET https://nominatim.openstreetmap.org/reverse -> 200 (246.930 ms)
2024-01-05 07:04:41.050 [info] GET https://nominatim.openstreetmap.org/reverse -> 200 (508.519 ms)
2024-01-05 07:04:41.162 [info] End of drive initiated by: %TeslaApi.Vehicle.State.Drive{gps_as_of:, heading: 56, latitude: , longitude:, native_latitude: , native_location_supported: 1, native_longitude: , native_type: "wgs", power: 2, shift_state: "P", speed: 0, timestamp: 1704438279912}
2024-01-05 07:04:41.163 car_id=1 [info] Driving / Ended / 7 km – 25 min

Idle, no second drive but: "Too many disconnects from streaming API", which is probably the issue.

Can it be because of having TeslaFi + Tessie + TeslaMate applications connected to my account?

2024-01-05 07:04:41.163 car_id=1 [info] Start / :online
2024-01-05 07:08:28.748 car_id=1 [info] Suspending logging
2024-01-05 07:15:51.829 [warning] Too many disconnects from streaming API
2024-01-05 07:15:51.829 car_id=1 [info] Creating new connection … 
2024-01-05 07:15:51.829 car_id=1 [info] Disconnecting ...
2024-01-05 07:15:51.836 car_id=1 [info] Connecting ...
2024-01-05 07:22:20.034 [warning] Too many disconnects from streaming API
2024-01-05 07:22:20.034 car_id=1 [info] Creating new connection … 
2024-01-05 07:22:20.034 car_id=1 [info] Disconnecting ...
2024-01-05 07:22:20.041 car_id=1 [info] Connecting ...
2024-01-05 07:28:20.800 [info] GET /
2024-01-05 07:28:20.804 [info] Sent 200 in 3ms
2024-01-05 07:28:22.537 [info] GET /
2024-01-05 07:28:22.542 [info] Sent 200 in 5ms
2024-01-05 07:28:23.458 [info] GET /
2024-01-05 07:28:23.463 [info] Sent 200 in 4ms
2024-01-05 07:28:24.278 [info] GET /
2024-01-05 07:28:24.284 [info] Sent 200 in 5ms
2024-01-05 07:28:25.506 [info] GET /
2024-01-05 07:28:25.512 [info] Sent 200 in 5ms
2024-01-05 07:28:47.605 [warning] Too many disconnects from streaming API
2024-01-05 07:28:47.605 car_id=1 [info] Creating new connection … 
2024-01-05 07:28:47.605 car_id=1 [info] Disconnecting ...
2024-01-05 07:28:47.612 car_id=1 [info] Connecting ...
2024-01-05 07:30:42.638 car_id=1 [info] Fetching vehicle state ...
2024-01-05 07:36:05.673 car_id=1 [info] Fetching vehicle state ...

Next drive 8:36 (which is also correct).
The "failing asleep" is also correct -> car wash with open doors and so on.

2024-01-05 07:36:35.088 [info] Start of drive initiated by: %TeslaApi.Stream.Data{time: ~U[2024-01-05 07:36:33.287Z], speed: 0, odometer: 21753.7, soc: 50, elevation: 85, est_heading: 332, est_lat:  est_lng: , power: 3, shift_state: "D", range: 141, est_range: 90, heading: 333}
2024-01-05 07:36:35.088 car_id=1 [info] Driving / Start
2024-01-05 07:57:54.402 [info] GET https://nominatim.openstreetmap.org/reverse -> 200 (411.744 ms)
2024-01-05 07:57:55.004 [info] GET https://nominatim.openstreetmap.org/reverse -> 200 (600.520 ms)
2024-01-05 07:57:55.016 [info] End of drive initiated by: %TeslaApi.Vehicle.State.Drive{gps_as_of: 1704441471, heading: 227, latitude: , longitude: , native_latitude: , native_location_supported: 1, native_longitude: , native_type: "wgs", power: 2, shift_state: "P", speed: 0, timestamp: 1704441473719}
2024-01-05 07:57:55.016 car_id=1 [info] Driving / Ended / 8 km – 21 min
2024-01-05 07:57:55.016 car_id=1 [info] Start / :online
2024-01-05 07:58:58.595 [info] Start of drive initiated by: %TeslaApi.Stream.Data{time: ~U[2024-01-05 07:58:57.711Z], speed: 1, odometer: 21758.9, soc: 48, elevation: 27, est_heading: 227, est_lat: , est_lng: , power: 1, shift_state: "R", range: 133, est_range: 93, heading: 224}
2024-01-05 07:58:58.595 car_id=1 [info] Driving / Start
2024-01-05 07:59:38.213 [info] GET https://nominatim.openstreetmap.org/reverse -> 200 (285.851 ms)
2024-01-05 07:59:38.662 [info] GET https://nominatim.openstreetmap.org/reverse -> 200 (447.174 ms)
2024-01-05 07:59:38.680 [info] End of drive initiated by: %TeslaApi.Vehicle.State.Drive{gps_as_of:, heading: 309, latitude: , longitude: , native_latitude: , native_location_supported: 1, native_longitude: , native_type: "wgs", power: 2, shift_state: "P", speed: 0, timestamp: 1704441577684}
2024-01-05 07:59:38.680 car_id=1 [info] Driving / Ended / 0 km – 1 min
2024-01-05 07:59:38.680 car_id=1 [info] Start / :online
2024-01-05 08:08:32.874 car_id=1 [info] Suspending logging
2024-01-05 08:11:41.463 car_id=1 [info] Fetching vehicle state ...
2024-01-05 08:23:06.212 car_id=1 [info] Fetching vehicle state ...
2024-01-05 08:29:28.628 car_id=1 [info] Fetching vehicle state ...
2024-01-05 08:37:44.658 car_id=1 [info] Fetching vehicle state ...
2024-01-05 08:38:33.292 car_id=1 [info] Vehicle is still online. Falling asleep for: 33 min
2024-01-05 09:08:34.229 car_id=1 [info] Vehicle is still online. Falling asleep for: 1 h 3 min
2024-01-05 09:08:34.229 car_id=1 [warning] User present ...
2024-01-05 09:08:49.896 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:09:05.257 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:09:20.618 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:09:35.977 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:09:51.337 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:10:07.005 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:10:22.351 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:10:37.828 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:10:53.291 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:11:08.650 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:11:24.113 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:11:39.473 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:11:54.834 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:12:10.501 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:12:25.861 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:12:41.324 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:12:56.787 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:13:12.147 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:13:27.515 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:13:42.970 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:13:58.330 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:14:13.793 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:14:29.255 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:14:44.616 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:15:00.078 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:15:15.541 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:15:31.005 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:15:46.364 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:16:01.724 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:16:17.050 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:16:32.649 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:16:48.112 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:17:03.575 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:17:19.141 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:17:34.603 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:17:49.962 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:18:05.425 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:18:20.888 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:18:36.555 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:18:52.018 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:19:07.481 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:19:22.844 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:19:38.304 car_id=1 [info] Vehicle is still online. Falling asleep for: 
2024-01-05 09:19:53.663 car_id=1 [info] Vehicle is still online. Falling asleep for: 

from teslamate.

cwanja avatar cwanja commented on June 2, 2024

Can it be because of having TeslaFi + Tessie + TeslaMate applications connected to my account?

Absolutely. Tesla could rate limit your vehicle to prevent spamming the API. Lots of assumption, but this could be why Tesla is moving to put the API behind a paywall and enable true third-party development.

Is there a reason you have three loggers? Have you noticed other instances where drives or charges are missing or was this the first instance?

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.