Comments (10)
I think there might be a misunderstanding here. The Tesla API (most likely) does the right thing.
The problem is we are getting nil values from Tesla, which we then interpret as "unknown". We then refuse to publish these to mqtt because - why would we want to publish unknown data? But here nil doesn't mean unknown, it means there is no active route.
At least that is my general feeling. Would be good to have some evidence to back this up. If I am right, the quick fix solution is to add all of those attributes to @always_published
as I mentioned above.
If I remember, will try to get the dump of the data from Tesla with and without navigation active. (something I have been wanting to do for a while actually).
from teslamate.
This no doubt is because we don't publish nil values:
This easy solution would be to add this values to the @always_published
.
But am uneasy doing this, because publishing a nil values tells mqtt to drop the value from the retain database. Which is probably undesirable for this data. i.e. when you subscribe you would get an instant message if there is an active route, but if there is no route you would not receive a message to say so until the value changes.
from teslamate.
But then when I drove home without navigation
This is expected behavior as no new values got propagated if no new navigation starts.
from teslamate.
The values when the car is not driving and with no route set:
"drive_state": Object {
"active_route_latitude": Number(lat2),
"active_route_longitude": Number(lon2),
"active_route_traffic_minutes_delay": Number(0.0),
"gps_as_of": Number(1711399845),
"heading": Number(200),
"latitude": Number(lat),
"longitude": Number(lon),
"native_latitude": Number(lat),
"native_location_supported": Number(1),
"native_longitude": Number(lon),
"native_type": String("wgs"),
"power": Number(0),
"shift_state": Null,
"speed": Null,
"timestamp": Number(1711399846493),
},
I replaced the lat/long values as I don't want to publish the location of my house. But I note that the active route lat/lon is different to the other two values, my guess is that might be the last place we navigated to. Will continue.
from teslamate.
My testing seems to show that the car always provides these attributes, even when not navigating:
active_route_latitude
active_route_longitude
active_route_traffic_minutes_delay
When not navigating, these have values from the last navigation. Wonder if this is a Tesla bug. Doesn't matter though, we have to deal with it. And we have no ability to report this to Tesla either.
This is 2016 Model S upgraded to MCU2.
My suspicion is if I reboot the MCU these values might disappear (not tested).
When navigating, we get additional values. These values only appear when the car is navigating, they don't appear (not even as nil values) when car is not navigating.
active_route_destination
active_route_energy_at_arrival
active_route_miles_to_arrival
active_route_minutes_to_arrival
While not strictly related to this issue, the question occurred previously concerning vehicle_state.media_info.a2dp_source_name
. It looks like that value is currently set to a Mobile phone even though the car is not connected via bluetooth. So No, you can't use this field to detect if the driver is nearby.
Getting back to this issue, we can't clear the top 3 values, because these values are showing up in the API. But maybe something can be done about the other values.
from teslamate.
@JakobLichterfeld While looking at this from a Home Assistant perspective, I was hoping to use that field active_route_destination to help set off some things at home.. But if that field doesnt get reset to blank or null and the car is not actively navigating anywhere, then the data for it is not useful. The "active" prefix is not accurate then
from teslamate.
Active navigation is directly propagated from the Tesla API. changing the original behavior within Teslamate would be bad practice as it would change the meaning and would break interoperability and interchangeably.
from teslamate.
Getting back to this issue, we can't clear the top 3 values, because these values are showing up in the API.
Even if I wish it was not, my assumption about how the Tesla API handles this was correct.
Active navigation is directly propagated from the Tesla API. changing the original behavior within Teslamate would be bad practice as it would change the meaning and would break interoperability and interchangeably.
from teslamate.
from teslamate.
Related Issues (20)
- Different values for Logged Distance HOT 4
- Should pin image full version as in elixir:1.16.1-otp-26 HOT 7
- switch netcat-traditional to netcat-openbsd for IP v6 support HOT 1
- Battery health issue HOT 7
- random test failures HOT 19
- Idea: add lease mileage limit with start/end dates HOT 1
- Upgrading via docker-compose from v1.28.3 to v1.28.4 results in unusable system with "404 page not found" error HOT 14
- Vehicle showing offline instead of asleep since 2024.8.x software update HOT 2
- doc: version tag in docker-compose.yml is obsolete since docker 25.05
- lost current charge record HOT 2
- Unexpected Relationship between Range (rated) and Range (est.) in Internal Drives Dashboard, Drive panel HOT 11
- 1.28.4 fails to start, 1.28.3 works fine HOT 2
- v1.28.4 fails to start with Permission denied error HOT 23
- "non-existing domain" error - car unavailable HOT 8
- Teslamate stops working after 1.28.4 update HOT 1
- Unable to open overview dashboard HOT 3
- Permanent loading icon HOT 5
- Model Y LR battery capacity incorrectly reporting after 1.28.5 update HOT 14
- efficiency field of table cars is empty HOT 2
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.