-
Notifications
You must be signed in to change notification settings - Fork 11
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
API deprecated, Tesla will end support per 1/2024. How to move on? #67
Comments
Good question. I haven't given this library much attention lately, but I am not giving up on it either. I will do some reading and let you know. |
Any update? |
I am not able to use commands, they result in 403, probably because of the deprecation of REST API's. Any plans for supporting the Tesla vehicle commands protocol? I am assuming not much you can do, as probably the underlying TeslaJS library would need to support it...? |
I confirm that the old API has been turned off and this node no longer functions. @onokje we need word from you, ether that you will look into this and find a solution, or that we have to move on to other solutions and abandon node-red-contrib-tesla |
Starting today it seems Tesla changed/deactivated the "old" API. It stopped working and the node reports "Precondition failed". Even worse my node-red instance crashes each time I try to open the configuration node to add/change the tokens. Any plans to work on it, any help I can provide? |
Hi all, I will definitely take a look, because I still use this myself :) Unfortunately I don't have a lot of time right now, so any help is appreciated. |
TeslaJS folks are aware too, looks like they need to figure out auth first. |
Sorry to read this, I don't even have my Tesla yet, and new to Node Red. At least you confirm the Precondition Failed return came from Tesla so I must have some configuration correct. (What a horrible choice of words when Precondition already has meaning for Climate and Battery, couldn't they dream of a different word for the API?) I know it has subscription cost, but maybe node-red-contrib-tesla could use the Tessie API and shift the burden to them when Tesla changes their side. I've looked at Tessie and they expose their own API. |
@fascenda There is IMHO no need to change to some paid third party API. There is still a Tesla API, but just the endpoint and syntax changed. There is now a fleet API endpoint for companies, and also some other possible entry ways. |
Thanks @Lineflyer I did understand THAT use of Precondition was relating to the API, okay I see now it's HTTP response 412. Up until that I was getting a variety of other failures, so I call it a success that I got the error. (Along the way, I did have some crashing or hangups in the flow editor and had to restart node-red a few times.) I agree relying on some subscription product would be best to avoid, as a long-retired software dev, I favor open source wherever I can find it. I just installed an OpenEVSE and also EmonCMS on a Raspberry PI for collecting data. That's where I will be collecting my Tesla data. As I said I don't even have the car yet just getting electric service upgraded and learning all this great software. |
The API was really great. You have been able to get all relevant (and even unrelevant) information about the current state of your car. For example: You even got the currently played song title ;) |
I don't understand how the integration still works (all I needed to do was get a new refresh token). I can't seem to reconfigure the config node with this token though. And, unfortunately, I cannot delete it completely because even though all the nodes are deleted, it still shows "in use." Is there a way to reconfigure or can someone help me delete? |
@Lineflyer I read the Tesla "unofficial" API docs and I did see all the things you could do like see what's on the radio. I've been reading some of the updated docs, and again I don't have a Tesla (yet) so I'm only taking some of my past software experience and trying to learn/understand what I find in online documentation. It seems as if Tesla API will now only work with requests from known domains, so something like TeslaFi or Tessie (or many others) that have registered URL could gain access to it. That doesn't sound hopeful for our private servers running Node RED. Which is what was on my mind when I said maybe going via Tessie is the solution, and I understand there is cost there. And I won't be surprised if Tesla starts charging for use of their API, which will potentially increase the cost of these middleware apps. Software has come a long way since I started my software career (40+ years ago). Subscription ($$$) is the way everything is going. |
I've set up my system to move excess solar to the car automatically and that means having access to change amps, something I can't see how to do via tessie right now. |
I have started this weekend a node-red mock-up that uses same messages
content as this project do but using the new fleet API.
SInce now, it seems working, but there still have some work to achieve to
package it for its distribution...
The job is not so huge to get it working, then something should come quite
soon as a plug and play substitute of this node...
Just be a bit patient, as I never coded a new node type. Maybe someone
could help a bit?
BTW, I have found some mistakes in teslamotors api documentation too, I
still have to signal it to them to let them fix it.
After this fleet API working with nodered, the telemetry API would be next
challenge... Or the fleet API for recent models (I have a 2019 model S)
then I do not need it (yet).
Le mar. 30 janv. 2024 à 19:56, fascenda ***@***.***> a écrit :
… @Lineflyer <https://github.com/Lineflyer> I read the Tesla "unofficial"
API docs and I did see all the things you could do like see what's on the
radio. I've been reading some of the updated docs, and again I don't have a
Tesla (yet) so I'm only taking some of my past software experience and
trying to learn/understand what I find in online documentation. It seems as
if Tesla API will now only work with requests from known domains, so
something like TeslaFi or Tessie (or many others) that have registered URL
could gain access to it. That doesn't sound good for our private servers
running Node RED.
Which is what was on my mind when I said maybe going via Tessie is the
solution, and I understand there is cost there. And I won't be surprised if
Tesla starts charging for use of their API, which will potentially increase
the cost of these middleware apps. *Software has come a long way since I
started my software career (40+ years ago). Subscription ($$$) is the way
everything is going.*
—
Reply to this email directly, view it on GitHub
<#67 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADUNWNJAPFM4MYWEFNYHSMTYRE65LAVCNFSM6AAAAAA6BGRZ7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJXGY4TCNZVHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I have made a few attempts:
I used @GaPhi fork of this tesla implementation. |
Here is my mock-up flow, working with my own other flows... but probably not enough robust or well-packaged yet, and without any explanation about how to configure it... But if you are able to follow teslamotors partner registration process, you should be able to get it work too. If some contributors are interested, we can set a little project up to progress faster.
Here is the file (copyright myself) |
Have you looked at: https://developer.tessie.com/reference/set-charging-amps ? |
Isn’t that the main problem? |
Where is this .js file located? (Using Home Assistant) I'd like to try that. |
I am running Node Red in a docker, and found the file at I just did this change and it has worked for me as well. |
Thanks. I started digging while waiting and found it. Giving it a try. Do I need to restart Node Red first? |
Perhaps. After I did the edit, I tried it which crashed my Node Red again, effectively restarting it. After that, it worked for me. |
Seems to have worked. I'm going to replace some spots in my flow and see how it does overall. Thanks for your help! |
Now, can someone tell me how to vent the windows using this API? Unfortunately I deleted all my old nodes and now I keep getting "missing command param" when I try. The climate setting works just fine. |
I've tested most of the other options and they seem to work . It almost seems like the specific command "windowControl" isn't working for some reason. |
Oh man, thank you sooo much!!! It's working :) And even better, I have an example now to understand whats happening and hopefully learn the rest by myself. I would very much like to show my appreciation... |
Great to hear, have fun. |
Yeah, that’s right. I was also quite wondering and annoyed that Tesla changed this service. However, other brands don’t even offer anything like that. Even things like changing charging current in the vehicle is by far not standard. So for me it is worth it… |
Likewise, I really appreciate the sample flow from @Lineflyer. Working well now. What's not so clear to me is how to send commands. The three commands I used previously were Start Charge, Stop Charge, and Set Charging Amps. Any suggestions? |
Answering my own question... Here's a sample flow for Start Charge, Stop Charge and Set Charging Amps to 5 -
|
Great, many thanks ! The only thing for me that’s missing is how to wake up the car when sleeping. Any hint on this ? |
Try the following flow. The "if (msg.payload == 1)" in the Function node is to prevent the Wake Up being triggered on a redeploy of flows.
|
Its in the API documentation.
|
Sorry, but this seems not to work for me. I get following error: Any hint? |
If someone is interested, I developed a tiny HTTP API to make BLE request to my Tesla : https://github.com/Jeoffreybauvin/tesla-http-api-over-ble Basically, you'll need a bluetooth dongle, and your Tesla in range. I did it last night, so, it's pretty fresh :D. |
Can no one help on this issue? Reading the car data does work, but sending a command always results in the error above. Since the car is a leased company car my Access rights are "Driver, not "Owner". Maybe that makes a difference? |
The short answer is, I don't know. Some things to check - Have you linked the Virtual Key as pictured? Your suspicion sounds correct though. Here's an excerpt out of the Teslemetry documentation under Topics / Access Type - When a vehicle is shared by the OWNER to another account, you get DRIVER access. This is also common when the vehicle has been leased in European countries and the leasing company has retained OWNER permissions. |
Thank you ChutneyMary! I'm not able to setup a virtual key and I'm pretty sure also the leasing company won't do it for me. If it's true that even such "simple" commands like start charging are not supported without a virtual key, I'm in big trouble :( Since "Command Sign:REQUIRED" is displayed in the teslemetry console, I assume that's true :( Does someone know which commands need a signing ? A list would be very helpful. "..." |
Read the Teslemetry documentation - While this lists all the commands that do not support signing, I can only assume all the rest do require it. I suggest you investigate the post a few lines above by @Jeoffreybauvin. The Tesla Bluetooth Low Energy API appears to support an off-line method of interacting with the vehicle. I haven't experimented with it yet, but perhaps @Jeoffreybauvin could clarify whether there's any cloud-based authentication occuring? |
Indeed @ChutneyMary , no internet access is needed to interact with the vehicle over BLE. The new key paired with the vehicle is seen as a "new car key" for controlling the vehicle. |
I'm a bit smarter now: In the past it was necessary to be the owner of the car to be able to setup a virtual key. Since this is no good solution for all leased cars, Tesla changed it and it is now possible to setup a virtual key a Driver. You need to have the key card and you have to be in the car to do so. See also here: teslamotors/vehicle-command#45 In car main menu->locks teslemetry is now displayed as Fleet Key, which seems to be fine. However, on Teslemetry console still Access Type:DRIVER Command Sign:REQUIRED is displayed and the Node Red flow is still not working. Maybe Teslemetry did not fully implement the latest changes? Could be true since their documentation does also not mention them... Hopefully I will find the last parts of this puzzle ;) |
Hi, I have copied
hi, this is exactly what I was looking to do... unfortunately any attempt to make an API call ends with a message "invalid token" as shown below. I got the token from iOS app "Auth for Tesla" - tried Both listed on the app, no joy :-((( {"status":401,"response":null,"error":"invalid_token","service":"auth"} my flows are identical, imported from yours except for I have the token and vin in flow variables. any idea what am I doing wrong? any advice much appreciated! |
It won't work with the iOS app "Auth for Tesla". |
thanks! :-) still need to figure out why I get "invalid_respose" while trying to set the charging amps but I at least manage to get some info from my Tesla having the account setup correctly. |
Is your car a leased one? If yes and your Access Type ist "just" Driver and not owner, you have the same poblem as I have. See some post before... |
I am the owner so it won't be the case; I believe it has something to do with the proxy setting -- no understanding here but it feels like it has something to do with the following. https://developer.tesla.com/docs/fleet-api#charge_start Newest vehicles require Tesla Vehicle Command protocol (see details). I do not undestand what's involved but my Model 3 is 2023 version |
Interesting! Since I also get the "invalid response" error, maybe it's not because of the Access Type. Are you able to read the status of the car (see flow from Lineflyer above)? I can read the status, but not send commands |
Same thing here. Its the SDK solvee by usimg a proxy. I am trying HA now it
may work
…On Mon 17. 6. 2024 at 8:08, Underground56 ***@***.***> wrote:
Interesting! Since I also get the "invalid response" error, maybe it's not
because of the Access Type.
Are you able to read the status of the car (see flow from Lineflyer
above)? I can read the status, but not send commands
—
Reply to this email directly, view it on GitHub
<#67 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A44RIBHL4DMXP3QJ2UTN4ZDZHZ4O7AVCNFSM6AAAAAA6BGRZ7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZSGM3DENZVG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hello @Jeoffreybauvin. I've dropped a question over in your github repository in the issues section. Can you please clarify the device and/or build environment you're running the Tesla BLE interface on? I'm not having much success on a Raspberry Pi Zero W (and first time user with Docker). |
Were you able to solve this problem? I'm still hanging on this :( Teslemetry console also still tells me However, in the car the virtual key seems to be installed correctly: Very much appreciate every help... |
I got it working on Home Assistant, can see all data, control the vehicle as needed.
… On 26. 6. 2024, at 11:42, Underground56 ***@***.***> wrote:
Same thing here. Its the SDK solvee by usimg a proxy. I am trying HA now it may work
… <x-msg://25/#>
On Mon 17. 6. 2024 at 8:08, Underground56 @.> wrote: Interesting! Since I also get the "invalid response" error, maybe it's not because of the Access Type. Are you able to read the status of the car (see flow from Lineflyer above)? I can read the status, but not send commands — Reply to this email directly, view it on GitHub <#67 (comment) <#67 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A44RIBHL4DMXP3QJ2UTN4ZDZHZ4O7AVCNFSM6AAAAAA6BGRZ7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZSGM3DENZVG4 . You are receiving this because you commented.Message ID: @.>
Were you able to solve this problem? I'm still hanging on this :( Teslemetry console also still tells me
Access Type: DRIVER
Command Sign: REQUIRED
However, in the car the virtual key seems to be installed correctly:
teslemetry.jpg (view on web) <https://github.com/onokje/node-red-contrib-tesla/assets/172016531/9fe6ff3d-7a3b-45f2-81bb-7999d0a51e16>
Very much appreciate every help...
—
Reply to this email directly, view it on GitHub <#67 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/A44RIBCU4S774FS3SQSNB43ZJKEHLAVCNFSM6AAAAAA6BGRZ7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJRGI3DGMBVGE>.
You are receiving this because you commented.
|
Same here: I got everything running (reading and writing values) with Home Assistent and Teslemetry now, so the problem I had has to do with the Node Red Integration. To be honest, I don't want to rebuild my complete logic in HA since I'm used to Node Red and thing the capabilities are much better. Does anyone know if/when this problem can be fixed in Node Red? Also, I'm wondering why some guys are doing ok in Node red and some don't with the same Code? |
I use HA to communicate via API but all the automation is done in nodered which is a part of HA package anyway. Both handy to be a part of home”package”Sent from my iPhoneOn 29. 6. 2024, at 21:29, Underground56 ***@***.***> wrote:
Same here: I got everything running with Home Assistent, so the problem has to do with the Node Red Integration. To be honest, I don't want to rebuild my complete logic in HA since I'm used to Node Red and thing the capabilities are much better.
Does anyone know if/when this problem can be fixed in Node Red? Also, I'm wondering why some guys are doing ok in Node red and some don't with the same Code?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
There's also this repo for a BLE Proxy: https://github.com/wimaha/TeslaBleHttpProxy I've been using it for a week now, having migrated off first Telsa API to Tessie (paid service, though) and now off Tessie to local, no cloud involved. I've found I also need to use the Tesla wall connector API, but between that and the BLE proxy (and Node Red, of course), everything works as needed. |
https://developer.tesla.com/docs/fleet-api#2023-10-09-rest-api-vehicle-commands-endpoint-deprecation-warning
Are there plans to revise node-red-contrib-tesla? Or do we have to assume that node-red-contrib-tesla will stop working at the beginning of 2024?
The text was updated successfully, but these errors were encountered: