-
Notifications
You must be signed in to change notification settings - Fork 766
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
Dynamic endpoints and token to use official Tesla API (self-hosted or from third party provider) #3903
Conversation
✅ Deploy Preview for teslamate ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@JakobLichterfeld I fix the error It was linked to my lack of knowledge about Elixir. I corrected the assignment of the |
I tried the |
No worries, neither me nor Brian found it in our review. And I did not test it on my own before merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Successful tested backwards compatibility with |
@jlestel please update with latest translations from main branch to make merging easier |
Is there any documentation associated with this change? EDIT: nevermind, I see config variables showing up on here :) https://docs.teslamate.org/docs/configuration/environment_variables |
|
Is there any documentation on how the Fleet API Provider needs serve the Data? Also what is the protocol and how do the interfaces look so TeslaMate can consume Fleet Telemetry data? |
|
What is the long-term goal for this? Will additional fields that are available with Fleet Telemetry be integrated in the future? Will it forever be with the 'faked' streaming API, or will there be another solution in the future? I am asking because, with TeslaSolarCharger I have highly Tesla Mate-connected software. Currently, I am hosting a fleet command proxy for all TSC users. I want to host a fleet telemetry server as well. As all the TSC users also use Tesla Mate, it would be cool if I could create a solution that works for Tesla Mate as well. But imitating the unofficial streaming API seems not to be the cleanest way to handle that issue in the long term. |
Is there anywhere a documentation how the old Streaming API transfers the data? Does TeslaMate work with getting Fleet Telemetry data only? Which data is required for TeslaMate to work? |
|
@JakobLichterfeld Thanks, I already read that, my question is not answered there: How needs streaming Data to Look like so TeslaMate can consume it. I already have a Server getting data from fleet Telemetry but I do not know how the Websocket stream to TeslaMate needs to look like, to fake the old streaming API. |
I didn't find any doc, I reengineered to do this: https://github.com/MyTeslaMate/websocket |
I introduced dynamic endpoints and a token to maxime compatibility for future Tesla API/streaming change:
dynamic endpoints based on ENV vars allows us to connect self-hosted Tesla Fleet API or homemade streaming/testing API
an optional token param to use official Tesla API and Telemetry via by a third party:
It is because the access_token and refresh_token are refreshed by these third parties that this token parameter is mandatory. Thus TeslaMate does not lose access and the API keys are managed on the third party's site.
Here are the 2 actors who operate according to this principle: MyTeslamate (free) and Teslemetry (24$/year)
When a token is provided, no inputs are needed when the user sign up
A compatible streaming server is also provided by a third party, the stream only sends events with the minimum interval of 1 minute. The streaming interval is the main regression in this operation with official Tesla Telemetry.
However, the new API also contains new data that can make it possible to create interesting new features.
Initially merged and reverted in PR 3866.