Open gshaviv opened 11 months ago
The library has been changed to use the new API already. Or do you mean we need to make even more changes?
Indeed. According to the fleet API docs, the old REST api for sending commands will be deprecated end of the month and cease to work and starting Jan 24 sending commands will be done using the new command protocol and the new signed_command endpoint
Here is the link to the notification the old command API is phased out. https://developer.tesla.com/docs/fleet-api#announcements-amp-api-changelog
the current library version already uses the new API.
unless the current command API is going away too, but i dont see any alternative in the docs?
ok i think i found the new endpoint: signed_command
Yep, the new endpoint is signed_command but I don't see any docs how to create the routable_message it needs. Only way I see is to try reverse engineer their go implementation available on GitHub. https://github.com/teslamotors/vehicle-command
is this related to the response i've been getting when trying to send vehicle commands?
RESPONSE BODY: {"response":{"result":false,"reason":"unsigned_cmds_hardlocked"}}
Yep. The new way to send commands is to sign them with your private key so the car can verify them with your public key.
All vehicles will require this starting Jan and vehicles that didn't use the owner api commands last 30 days already require this. Also vehicles manufactured after October require this.
I wonder if we shall use the proxy?
this new API is a bit confusing to understand what is needed. I will try to see if we can use signed_command
tried to have a look at signed_command, but im not sure how to build the message to send the command, probably need to base64 encode the protbuf msg somehow.
I saw in the proxy repository someone from Tesla wrote they are working on publishing docs for this. Hopefully will be available soon
Tesla added a doc explaining how messages are encoded to the proxy repo, maybe now we can implement this in the package:
https://github.com/teslamotors/vehicle-command/commit/d7a3e30f4f631b36760c61bc980157ea6de6d2bd
any insight on encoding the protbuf msg to be sent via signed_command yet?
@gshaviv did you make any progress with signing the command?
@Urkman Sorry, haven't had time to try it. Kinda busy and overwhelmed with other stuff at the moment.
we need the pairing to work as well, not just sending messages. I recently installed Charge HQ and they have the new pairing working.
i think in the vehicle config this is what says if we need pairing or not: supports_qr_pairing
or ble_autopair_enrolled
i found how to do #2 will be pushing the code soon Tesla has updated the docs with more info
tag 9.2.0 includes a helper to send the public key to the vehicle
@gshaviv is the API now working fine for you? should we close this issue?
Vehicle commands are still not supported. Has any change been attempted to support the signed command?
@gshaviv unfortunately i dont have a model 3/y/2021 S/X, so im not able to test. Do you mean that after we send the pub key we need to send all commands via the new signed_command API?
@jonasman exactly. The old way of sending commands no longer works. Only signed commands work.
@gshaviv any idea on the api of that request?
Anyone managed to sign a command using swift and send it to the API? https://developer.tesla.com/docs/fleet-api#signed_command
@Urkman as far as i know, nobody is able to do it without using HTTP proxys yet.
As the old command REST API is being deprecated, the new way of sending commands is via the new Tesla Command Protocol using the signed_command endpoint.