Closed wimaha closed 4 months ago
I tested but get this error in red: "Error failed to perform handshake with vehicle (B): no private key available"
I can see the files being created in "~/TeslaBleHttpProxy/key". I can also delete them. See that they are missing. I can re-created those key file.
But when I specify the VIN, and try send to
2024/07/08 01:33:01 INFO TeslaBleHttpProxy 1.1 is loading ...
2024/07/08 01:33:01 ERRO failed to load private key. err="open key/private.pem: no such file or directory"
2024/07/08 01:33:01 WARN BleControl could not be initialized!
2024/07/08 01:33:01 INFO TeslaBleHttpProxy is running!
2024/07/08 01:33:33 INFO ECDSA private key generated and saved
2024/07/08 01:33:33 INFO ECDSA public key generated and saved
2024/07/08 01:33:33 INFO BleControl initialized
2024/07/08 01:34:09 can't accept: listner timed out
Another attempt by stopping and starting (so this time with the private.pem and public.pem file present:
2024/07/08 01:35:09 INFO TeslaBleHttpProxy 1.1 is loading ...
2024/07/08 01:35:09 INFO BleControl initialized
2024/07/08 01:35:09 INFO TeslaBleHttpProxy is running!
2024/07/08 01:35:47 can't accept: listner timed out
Notice it is the first time I attempt to do BLE thing with the Tesla from that Pi4... so it could be a problem on my side. Not sure at all what is going on.
Thank you for testing @dglaude! 👍
I found the bug and resolved it. Please update to the newest dev version. docker compose pull
and docker compose up -d
.
And please answer in the new Pull Request. Thank you!! https://github.com/wimaha/TeslaBleHttpProxy/pull/24
Don't hold your breath, I will need to wait for the car to come back for further testing. ;-)
Thank you! I've testes today with two cars and as it was working I've merged the change and released version 1.2. I look forward to receiving feedback from you. :-)
Generating the key and sending them to the vehicule did work perfectly for me. Just get in the car with a browser, have your key card with you and your VIN. Your are a few click away from doing the setup.
There is however that error message that has a typo listner
and I don't know if this is expected:
2024/07/09 00:19:03 can't accept: listner timed out
But it does not seems to be a problem. Maybe I should try multiple times to see if it is always taking place, or just a one time glitch.
The full log of activity from the startup:
$ docker logs --follow tesla-ble-http-proxy
2024/07/08 23:54:40 INFO TeslaBleHttpProxy 1.2 is loading ...
2024/07/08 23:54:40 ERRO failed to load private key. err="open key/private.pem: no such file or directory"
2024/07/08 23:54:40 WARN BleControl could not be initialized!
2024/07/08 23:54:40 INFO TeslaBleHttpProxy is running!
2024/07/09 00:18:34 INFO ECDSA private key generated and saved
2024/07/09 00:18:34 INFO ECDSA public key generated and saved
2024/07/09 00:18:34 INFO BleControl initialized
2024/07/09 00:18:46 INFO Key-Request connection established
2024/07/09 00:18:46 INFO sending command=add-key-request body=map[]
2024/07/09 00:18:47 INFO Sent add-key request to XP7Y1234567890ABC. Confirm by tapping NFC card on center console.
2024/07/09 00:18:47 INFO successfully executed command=add-key-request body=map[]
2024/07/09 00:19:03 can't accept: listner timed out
2024/07/09 00:19:49 INFO received command=charge_stop body=map[]
2024/07/09 00:19:49 INFO connecting to Vehicle ...
2024/07/09 00:19:54 INFO connection established
2024/07/09 00:19:54 INFO sending command=charge_stop body=map[]
2024/07/09 00:19:55 INFO the car has already stopped charging
2024/07/09 00:19:55 INFO successfully executed command=charge_stop body=map[]
After starting the proxy you can browse to
http://IP:8080/dashboard
. Here you can generate the needed keys and send them to the car.To try this version, you can find it on Docker at:
The version is under the dev tag on Docker: image: wimaha/tesla-ble-http-proxy:dev