-
Notifications
You must be signed in to change notification settings - Fork 99
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
Tesla command REST-API shutdown in 2024 #743
Comments
Looks like that API is very much built around cloud to cloud integration. |
Tesla ignored us when we were a part of HA. This why we had to go custom. I don't think they care. |
There is some good discussion and solutions coming out over here: |
Does this mean no longer have control of car from Home Assistant :( One of the main reasons I bought a Tesla so I could automatically defrost heat or AC car based on my irregular shifts. Will be so annoyed if Tesla joins Mazda in screwing this all up. |
HA may be willing to put it back in core. Or Nabu Casa could provide an integration and charge for it. If its official and supported the new API should meet HA criteria for official inclusion again. |
ChargeHQ have now migrated to the Tesla Fleet API, so there is a migration path available for 3rd party apps: |
Well, me and a lot of users wonder about the future of this integration. What changes is not just the way that credentials are enrolled. The current integration accesses old APIs, and can no longer control the cars that are delivered since december. It will also not control older cars at some point in the near future. Will there be a new version that uses the new Tesla API, or should we all look for alternative ways to control our cars? I found the Tesla integration a very seamless solution, and even if it is more awkward to enroll keys or cost a few(!) bucks for someone who acts as a "partner" for Tesla, I would be happy to stick to it. I built a pv surplus charging solution that charges my car via HA, the PV integration and the Tesla integration. It works well for me, and it works well for several people whom I support in the German Tesla forum. But I can't tell them if this solution will still work in the future. |
It won't control any car in January 2024. |
So did Tesla Solar Charger, it does now include the option to use the new API instead. The owner needs to register a partner account with Tesla, though. |
Hi all - so come January 1st this integration will stop? If so, that's very sad as I'm not aware of any alternative. Is there any initiative at hand that I could help with or contribute to? What can I otherwise do to manage my tesla charging in HA? |
Follow up on Peter's comment, also quite disappointed. I'm proud of my
automations for hourly pricing and don't know what other 3rd party apps
would be able to integrate into their API as easily as HA is. Does anyone
know any 3rd party apps that integrate with known hourly price programs?
…On Thu, Dec 21, 2023 at 3:58 PM PeterH24x7 ***@***.***> wrote:
Hi all - so come January 1st this integration will stop? If so, that's
very sad as I'm not aware of any alternative. Is there any initiative at
hand that I could help with or contribute to? What can I otherwise do to
manage my tesla charging in HA?
—
Reply to this email directly, view it on GitHub
<#743 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AR2XH23SMRBDRGRRPEK5SF3YKSWHFAVCNFSM6AAAAAA57VL7ZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRWHE4DCMBVGU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
this may or may not be good news for us... Also they talk about something that may be announced in Q1 2024 for independent developers. |
Just get OCPP charger and use OCPP integration. |
https://github.com/pkuehnel/TeslaSolarCharger Tesla Solar Charger is pretty popular. |
OCPP is generic and not as granular as what you can do with the Tesla API. |
|
I forgot to add - if you really want to have anything, get any charger and replace PWM by generated by ESP chip, it will be anything. Juts need to understand cars limitations but that is separate story, OCPP should do enough. |
OCPP doesn't provide real time monitoring of my home battery nor let me charge and discharge my home battery
Whilst OCPP is nice, I already have the Tesla hardware and it goes below 5A in 1A steps to 0A. 5A @ 3 phase @ 240V (3.6 kW) is still quite a bit of power.
Zappi whilst also nice is a hardware solution which doesn't work for my tariff which changes every 5 minutes. Anyway this is a Tesla integration which we would like to see functional into the future. |
Great work they are working with the new Fleet API! I'm wondering how well TeslaSolarCharger works with Home Assistant? |
"Any charger" can charge in the range of 6-16A@230V, 3 phase. The Tesla API can charge at 1-16A@230V, 3 phase. That makes a huge difference when you charge with PV surplus, as you can really adjust the charging power to the current PV output. For those who are not familiar: Solar energy will vary wildly within seconds with every cloud on the sky. You want the most flexibility possible to achieve a good effectiveness. |
TezLab might also help in the future… |
One thing I tried from the new API is the BLE commands that can be sent with tesla-control app. I needed to build it first from the golang sources. There are several commands that can be sent over BLE, mostly related to the charging but not only. For executing those commands one needs only a private key and a public key registered in the car, no tokens at all. As I am using the HA Tesla integration for automation of charging based on solar panel production, BLE commands can be a good replacement of the server endpoints, for me at least. I like the fact that they don't require interaction with the server. Basically I can run the app on an rpi placed in the car so it will receive the commands remotely. Or I can translate those golang sources into C and run on ESP32. Below is the list of supported commands: add-key Add PUBLIC_KEY to vehicle whitelist with ROLE and FORM_FACTOR One interesting command is: |
A Tessie integration is included in the Home Assistant release 2024.1, which uses the official FleetAPI and is thus officially supported now by both Tesla and Home Assistant. The Tessie integration is currently available in RC testing and supports charging_amps for vehicles, no support for energy/ solar products and looks quite feature comparable for vehicles with this Tesla integration. |
Thanks for the hint about Tessie. Hopefully others like TezLab will follow shortly (I’m a TezLab user). |
https://developer.tesla.com/docs/fleet-api#2024-03-26-shutting-down-legacy-vehicle-api-endpoints 2024-03-26: Shutting down Legacy vehicle API endpoints |
Does this plugin still use any of the old unsupported API’s? It sounds like if one continues to use them, one will be banned from using the new Fleet API? |
Guess it's time to start using the Tesla HTTP Proxy. The installation process is beyond my knowledge for now, would anyone have a step by step guide on the prerequisites parts, using HA addons ? From what I've read in the documentation, I'm hoping that we can use DuckDns and Nginx add-ons to reach the first goal : "You must have a domain name (FQDN) with a valid SSL certificate to host your public key on standard port 443." If anyone can confirm this is indeed a way to go, I can start messing around and I'll write a tutorial for users like me with 0 knowledge about this. edit : found somewhere to start |
I wrote a huide, but it‘s in German: https://docs.google.com/document/d/10D-VPjKn9KXTtsnZQC3umNz8oIp5v5CXTXWOE7OeUhU/edit |
That's a great start thanks a lot ! I'll have to adapt like the Myfritz setup, but this is definitely useful ! |
Am I being naive or does the Tesla Fleet API Proxy nonsense not completely kill the ease of integration? So you have to either use Home Assistant OS to use an add-on, or manually mess around with running the docker yourself. This is significantly more difficult than it was before. The simple process of reading your car's battery charge % is now behind a huge wall of complexity. Or am I mistaken? |
Well it can be easy if your willing to pay someone to do all the hard stuff for you. But yes, self hosting is now hard for Tesla vehicles. |
It's not that complicated .... once you've figured out how to do it ^^. This was my case because I don't have knowledge in this field, like at all. I've written a procedure that covers the full process of getting the proxy to work. @alandtse, do you think it's a good idea to post it on this repo ? |
I think “huge” is a relative term. Tesla has made the process significantly more complicated, and a few of us volunteers have been working hard to simplify it as much as possible. It’s working fine for some users, but for others it will probably be unattainable, depending on your skill set. You can use Tessie or Teslemetry instead, with some compromises of privacy and security. Of course, if you have some idea how to improve it, PRs are welcome. |
I've almost finished a blog illustrating how to do this, I expect to post in the next couple of days. It has taken me almost a week to get my head around it however I think it will work well. |
I wrote a guide, but it‘s in German. I keep it up to date with the changes in the OAuth process, and it does also help with portforwarding on the DSL router. We have a very popular regional brand, AVM Fritzbox, which I covered, too. https://docs.google.com/document/d/10D-VPjKn9KXTtsnZQC3umNz8oIp5v5CXTXWOE7OeUhU/edit Imho the new solution has become as streamlined as possible over the last weeks. But I do still notice people have issues with replacing non-working OAuth token. When they enter a new one, the new token gets accepted in the gui, but the new one will not work. Deleting and reinstalling the integration seems not always to solve it. |
I've finished a blog. This is an alternate method assuming you have a registered domain name and are willing to move your DNS to CloudFlare. It uses CloudFlare Zero Trust to get around the need to port forward traffic. https://www.smartmotion.life/2024/04/06/tesla-integration-with-home-assistant/ Hope it helps, happy for any feedback since I'm sure it isn't perfect! |
Thanks for the detailed guide. I have been postponing the fleet API as it was hard to follow but your guide was very helpful. I reached successfully until step 5.11 and when I scan the code on my mobile, I get the error 'Unable to Share Vehicle, This third party isn't registered with Tesla. We can't grant them access at this time.' Any suggestions? Also, when I go to the cloudflare subdomain created with homeassistant.example.com go to my HA instance but going to the subdomain created with tesla.example.com gets 'Forbidden, You don't have permission to access this resource.' Not sure is this is expected behavior and related to above problem' Adding the Apache addon log
|
I've just created a guide for those running HA on Docker too. https://www.smartmotion.life/2024/04/23/tesla-custom-integration-with-home-assistant-on-docker/ |
Thanks for your work on this. Left some appreciation on your blog :) |
Sorry to bump this closed issue, but today I noticed that several of the "write commands" (e.g. open charger latch) stopped working. Is this issue related to that, and do I need to setup a separate server for communicating with the Tesla API to be able to send commands to my car, or will this integration solve that down the road? |
Yeah mine too... Looks like we have to move over to the new Fleet API, right? I'm struggling with the HTTP Proxy though because all of my access to homeassistant is locked down so nothing is internet-facing for me to get a token with. Very frustrating... |
Have you had a look at this, it uses a Cloudflare Zero Trust tunnel - https://www.smartmotion.life/2024/04/06/tesla-integration-with-home-assistant/ |
Sorry for my last reply - worked out that I can use my existing tunnel and add a new domain to it and that seems to work alright! I can access it from outside my VPN, at least! Problem I'm running into now is that every time I create an application onboarding request on developer.tesla.com, I get an email to say that the request is approved, and then it's not on my dashboard to be able to get the client id and token... |
Yeah, thanks for the guide and link! It's manageable, but I'd rather not. 🙂 Question is if that's the only option or if this integration will solve it for all users down the road? As I see it, my options are to:
|
Tesla have said everyone needs to switch over to the fleet API (and are progressively shutting down the legacy access methods), so downgrading this integration to a prior version will not help. You can do this locally with the tunneling to a local http proxy and keep using this integration. Or there are other integrations including Tessie and Teslemetry which also use the fleet API but require a subscription. |
Ok, that's a clear answer, and what I was looking for. Thanks! I guess I have to dig deep in the rabbit hole of CF tunnels then. :) |
I use v3.19.11 for a long period and it still works. When i upgrade to a new version the integration doesn't work anymore. I have a lease car, I did read somewhere that they would not transfer lease cars directly to the new API or would only transfer it later. |
I'm going to close this issue for discussions as the issue itself has been completed and everyone is getting notifications about conversations that have been answered earlier. Please feel free to open up a new discussion about this topic if you feel that the information provided in the readme or here isn't enough. |
Is your feature request related to a problem? Please describe.
Starting 2024 Tesla will shutdown the existing vehicle command REST-API and requires end to end signed commands through a new API
https://developer.tesla.com/docs/fleet-api#2023-10-09-rest-api-vehicle-commands-endpoint-deprecation-warning
Describe the solution you'd like
Maybe a possible migration strategy should be discussed. It may will be more difficult for end users with no IT experience to install this integration, because Tesla requires a public accessible domain with a hosted public certificate for each application.
Describe alternatives you've considered
To be discussed.
The text was updated successfully, but these errors were encountered: