fredilarsen / TeslaChargeDoorOpener

Open the Tesla charge door with an Arduino and an ASK STX882 transmitter
Apache License 2.0
131 stars 19 forks source link

Adding code for RF sniffing the Tesla cable #2

Closed LeoTiedt closed 4 years ago

LeoTiedt commented 4 years ago

Hi fredilarsen, thanks for that great project. I already tried it using my EU Model 3 and it works perfectly!

One other question: Could you maybe add the code you used for sniffing the rf signal form the charging cable? I would really like to take a deeper look into this. With common rf sniffing libraries I don't get any data from the Tesla cable....

That would be highly appreciated!

Also isn't there a method to unlock the charging cable after charging using an rf signal? The Tesla key fob is able to unlock the charging port!....

Thanks a lot! Best, Leo

fredilarsen commented 4 years ago

Hi Leo

Very nice that you got it working. I use it every day, and triggered by a microswitch in the plug holder it is enjoyable to see the charge door swing open as I pull the plug out of the wall holder after parking the car :-) In my device I also included it in my ModuleInterface setup and added a physical button to send a trigger via ModuleInterface/PJON to a MQTT broker that is picked up by a Tesla integration in Home Assistant to unlock the charge cable too when leaving.

I did write an Arduino sketch to capture binary signals and save them as pulse sequences and then autodetect the pulse width and encode the sequences as hex strings and print them to serial. Unfortunately I tested out a lot of possibilities and has a lot of commented code that may be useful for other types of signals, so while having a sound structure and functionality it is a mess that I do not feel like publishing unless it is cleaned up first.

After completing this project I found this very cheap but well functioning logic analyzer board that can be used with an ASK receiver (like SRX882) and PulseView to do a similar capturing with the OOK decoder in PulseView. The hex sequence can then be used in a transmitter program like the one in this repo.

PS: I did not have my github notification settings up to date, therefore the delayed response. Fixed now.

Fred