Skip to content
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

Pairing appear successful but Error: vehicle rejected request: your public key has not been paired with the vehicle #93

Closed
raphmur opened this issue Jul 17, 2024 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@raphmur
Copy link
Collaborator

raphmur commented Jul 17, 2024

          I have the exact same problem using HA on Proxmox w/ BT via USB pass through. It will generate Public and Private Key and Deploy to car w/ confirmation (in the log of the addon) but the car does not acknowledge/display a key pair request on the screen.
[00:31:28] INFO: VIN [REDACTED] BLE MAC & LN (20:[REDACTED]:4C|Sa4[REDACTED]) presence detected
[00:33:39] INFO: VIN [REDACTED] BLE MAC & LN (20:[REDACTED]:4C|Sa4[REDACTED]) presence detected
[00:35:50] INFO: VIN [REDACTED] BLE MAC & LN (20:[REDACTED]:4C|Sa4[REDACTED]) presence detected
[00:37:13] INFO: Received MQTT message; topic:tesla_ble/[REDACTED]/config msg:generate-keys vin:[REDACTED] cmd:config
[00:37:13] NOTICE: Generating the private key...
[00:37:13] NOTICE: The private key is shown only in debug mode
[00:37:13] NOTICE: Generating the public key...
read EC key
writing EC key
[00:37:13] NOTICE: -----BEGIN PUBLIC KEY-----
[REDACTED]
-----END PUBLIC KEY-----
[00:37:13] NOTICE: Adding Home Assistant 'Deploy Key' button
[00:37:13] WARNING: Private and Public keys were generated; Next:

            1/ Remove any previously deployed BLE keys from vehicle before deploying this one
            2/ Open the Tesla App on your smartphone and make sure the vehicule is awake
            3/ In Home Assistant device Tesla_BLE_[REDACTED], push the button 'Deploy Key'
[00:37:17] INFO: Received MQTT message; topic:tesla_ble/[REDACTED]/config msg:deploy-key vin:[REDACTED] cmd:config
[00:37:17] INFO: Trying to deploy the public key to vin:[REDACTED]
[00:37:17] NOTICE: Attempt 1/5 to delivery the public key to vin [REDACTED]
[00:37:18] WARNING: KEY DELIVERED; IN YOUR CAR, CHECK THE CAR's CENTRAL SCREEN AND ACCEPT THE KEY USING YOUR NFC CARD
[00:37:18] INFO: acceptKeyConfirmationLoop; check if key was accepted by sending a ping command vin:[REDACTED]
[00:37:18] NOTICE: Attempt 1/5 sending Ping vehicule to vin:[REDACTED] command:ping
[00:37:20] ERROR: tesla-control send command:ping to vin:[REDACTED] failed exit status 1.
[00:37:20] ERROR: teslaCtrlSendCommand; Error: vehicle rejected request: your public key has not been paired with the vehicle
[00:37:20] NOTICE: teslaCtrlSendCommand; Retrying in 5 seconds
[00:37:25] NOTICE: Attempt 2/5 sending Ping vehicule to vin:[REDACTED] command:ping
[00:37:26] ERROR: tesla-control send command:ping to vin:[REDACTED] failed exit status 1.
[00:37:26] ERROR: teslaCtrlSendCommand; Error: vehicle rejected request: your public key has not been paired with the vehicle
[00:37:26] NOTICE: teslaCtrlSendCommand; Retrying in 5 seconds

Originally posted by @Gates1234 in #91 (comment)

@raphmur
Copy link
Collaborator Author

raphmur commented Jul 17, 2024

Hello @Gates1234, your issue is not the same as above. In your case, it appears that your bluetooth is working as expected.

When you are in your car you will need to start it to get the key to be accepted. I agree the doc is not super clear 100% failsafe yet...

What you need to do:
0/ Restart the addon with debug mode enabled on the config page
image

1/ Wake your car prior to pressing "Deploy key". For this: open the Tesla app, or open your car
2/ [important] Go in your car, and use the NFC card on the center console to authenticate and start the car
3/ Press the "Deploy key": you should see a message on the screen

Paste the log output here.

@Gates1234
Copy link

Hello @Gates1234, your issue is not the same as above. In your case, it appears that your bluetooth is working as expected.

When you are in your car you will need to start it to get the key to be accepted. I agree the doc is not super clear 100% failsafe yet...

What you need to do: 0/ Restart the addon with debug mode enabled on the config page image

1/ Wake your car prior to pressing "Deploy key". For this: open the Tesla app, or open your car 2/ [important] Go in your car, and use the NFC card on the center console to authenticate and start the car 3/ Press the "Deploy key": you should see a message on the screen

Paste the log output here.

Thanks for the prompt reply. This specifically did not work for me immediately as expected but I did get my issue resolved and hopefully it helps others in the future. Unfortunately I can't grab the logs beyond the last ~100 lines, which basically just show the successful pairing.

This is my first foray into BT w/ HA so probably more a BT/me issue rather than this specific add-on.

  1. I blacklisted btusb in Proxmox (host machine) - People have reported elsewhere linux hosts will argue with HA on the pass through module. In bluetoothctl it looked like the BT adaptor was sometimes powering on and off.
    image

  2. Rebooted Proxmox and confirmed devices were removed on reboot w/

lsmod | grep btusb

  1. I unplugged all ESPHOME32 BT proxies. It seems the proxy was interfering with the request.

  2. I followed the steps you provided above and deployed key AFTER putting key card on the center console and entering PIN.

@baylanger baylanger added the help wanted Extra attention is needed label Jul 17, 2024
@raphmur
Copy link
Collaborator Author

raphmur commented Jul 17, 2024

Good it works now.
I understand that you have installed HA through via Proxmox + you have remote espHome BT proxies in your home (--> this is not exposing a physical device in HA, so should not interfere).

@baylanger I suspect this could be linked to the hci0 being not too happy with tesla-control, then dropping towards hci1 if too heavily used... Maybe it could have happened during the send key process?

@raphmur
Copy link
Collaborator Author

raphmur commented Jul 19, 2024

Closing this one. Now focusing on #91

@raphmur raphmur closed this as completed Jul 19, 2024
@baylanger
Copy link
Collaborator

Please see last comment in #125 that I just posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants