Querying vehicle_data (or other) from API #4449
Replies: 3 comments 9 replies
-
I assume you mean sending a command to the Tesla API and not a TeslaMate API? If so, we could introduce that feature. But it's not there today. Enhanced security would need to be done and that comes in the form of more experience needed to configure and run TeslaMate. With the API changes coming (e.g. charging) that could be a roadblock as well. |
Beta Was this translation helpful? Give feedback.
-
Teslamate publishes a lot of data it receives from the tesla API to MQTT. It parses the data from the API and publishes it to individual topics that you can subscribe to to receive events when the data for that topic changes. If you already have teslamate running, you can You'll see something like this:
Data is periodically polled/streamed, so as it gets updated and published to each topic, you will see a new log line for that topic and its corresponding most recent data. Of course, you probably have a programmatic use-case in mind. You can use any MQTT library for your programming language of choice and subscribe to whatever topics you are interested in receiving data from. For example, if your application subscribes to the Since much of the data is already in MQTT, you can integrate with that instead of integrating with the tesla api derectly, depending on your use-case. However, this might break at any time if tesla decides to limit access to existing owner/streaming api #4408 Not sure about sending commands. This piece is for read-only data. |
Beta Was this translation helpful? Give feedback.
-
As a partial answer to my own question, I found a way (with a simple https: call) to query some information about the vehicle. All that is required is a valid 'refresh token' which any TeslaMate user is going to have. Here is the URL that works: It returns with the following JSON message (sanitized with 'X's' where personal data goes)...
I just found this construct as an example somewhere online, but what is still totally unclear is how to construct a similar query for any arbitrary parameter that is documented in the undocumented API. Nor am I clear as to whether this query is one of the ones in the undocumented API (or which it is) !! Perhaps this query is one that is done by TeslaMate and all of this is available from TeslaMate as MQTT ? Still very muddy to me !! |
Beta Was this translation helpful? Give feedback.
-
Does teslamate include any functionality to perform manual queries or send commands through the API for diagnostic / debugging purposes? Since it already has already gone through the authentication and has the appropriate token, etc. it would seem like an easy function to provide.
Trying to do this directly through the API seems like a daunting task for a non software developer...
Beta Was this translation helpful? Give feedback.
All reactions