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

Variant for ESP32 / espHome #35

Closed
Peke140 opened this issue Jun 24, 2024 · 10 comments
Closed

Variant for ESP32 / espHome #35

Peke140 opened this issue Jun 24, 2024 · 10 comments
Labels
enhancement New feature or request

Comments

@Peke140
Copy link

Peke140 commented Jun 24, 2024

Not sure if this would even be possible but one can only ask.

As the title implies, would it be possible to use this integration together with a Bluetooth proxy from esphome?

@baylanger
Copy link
Collaborator

I brought this topic earlier today in a chat with @iainbullock & @raphmur

The current reality; to send a command to the car the add-on currently uses the official from Tesla tesla-control app.

tesla-control is designed to send commands to the car over Internet (Tesla Fleet API) or over BLE with the use of a hardware Bluetooth dongle. ESPHome Bluetooth Proxy integrates magically into Home Assistant but tesla-control being written in Go makes things harder as there's no HA Go library available.

We can leave this Issue open for now, hoping others will chip in some ideas to make this happen.

@raphmur raphmur added the enhancement New feature or request label Jun 25, 2024
@Peke140
Copy link
Author

Peke140 commented Jun 25, 2024

I always mistakenly thought that the proxy would present itself to the machine as a Bluetooth dongle, making it easy to implement.

In the meantime I will just dust off a raspberry pi I have laying around and try it as a standalone.

@raphmur
Copy link
Collaborator

raphmur commented Jul 2, 2024

Tested the proxy --> Useless.

However there are theses repos that could be interesting to robustify and / or port on esp.

@raphmur raphmur changed the title Esphome Bluetooth proxy Variant for ESP32 / espHome Jul 2, 2024
@baylanger
Copy link
Collaborator

Another promising project to move to ESP32 is TinyGo. It doesn't support Wifi/BLE yet but there's a draft PR.

https://tinygo.org/
tinygo-org/drivers#650

tesla-control could probably be compiled (with few changes?) but until TinyGo merges 650, it's difficult to know.

@raphmur
Copy link
Collaborator

raphmur commented Jul 5, 2024

This is very promising: https://github.com/robin-thoni/tesla-ble-esphome

@BogdanDIA
Copy link

This is very promising: https://github.com/robin-thoni/tesla-ble-esphome

This ESP implementation is based on the reversed engineered protocol of the Android app - done by Alex L few years back. It still works in parallel with the new official tesla-command BLE protocol but the two protocols are different.

@raphmur
Copy link
Collaborator

raphmur commented Jul 15, 2024

Thanks for sharing this @BogdanDIA, if I understand well, this project (based on Alex L's work) is only implementing the VCSEC protocol, which is only part of what the BLE communication with the Tesla covers?

@BogdanDIA
Copy link

@raphmur - is is not only for the covers. The protocol is used to authenticate with the CAR (VCSEC part of it) for opening and driving, it is used for sending commands from keyfob to the car, from phone to the car when no internet exists, from the TPMS sensors to send their data. During revers engineering times around 2019 the "SEC" in VCSEC what thought to mean Secondary but actually it means Security. It worth reading through what the guys at trifinite.org did:
https://trifinite.org/Downloads/20220629_tempa_presentation_troopers22_public.pdf

BTW, one of the latest changes in the FleetAPI introduced a new option for tesla-control: body-controller-state. First command to return status (not useful for charging though), yay

@raphmur
Copy link
Collaborator

raphmur commented Sep 14, 2024

It appears this project https://github.com/yoziru/esphome-tesla-ble is working well already.
Closing this issue.

@raphmur raphmur closed this as completed Sep 14, 2024
@BogdanDIA
Copy link

It is ok to close this. Although the implementation in https://github.com/yoziru/esphome-tesla-ble needs to be updated every time large changes are added by Tesla in vehicle-control impl. I have another implementation, will write in the tesla-local-control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants