Description
Dear Fredilarsen,
thank you so much for publishing this code. It works in my 2022 Tesla M3 delivered in December 2022 in Germany. I checked it on ESP32 and ESP8266 boards with 3V supply from a CR123 battery. The voltage is sufficient for both, the uController and the STX882 (I use it with the antenna). Boot time is less than 100ms, so, it works instantly.
I also added a 3V relay - both, the ESP8266 and the relay are directly powered by the battery thru a momentary switch (so, the relay is not connected to the ESP). The relay is used to switch the resistor for unlocking the charge plug. For the 22kW plug I use, two 220 Ohm resistors are in series, one so shorted by the relay when the switch is released. If the switch is pressed, the relay is actuated and opens the short so that the resistance increases to 440 Ohm which unlocks the plug. So, here, the NC pathe of the relay is used.
For a 11kW cable, one need to put a 1200 Ohm resistor in parallel to the built in 680 Ohm resistor. The relay is in series to the 1200 Ohm resistor on switched „on“ to unlock the charge plug. So, here, the NO path of the relay is used.
Details in thus in German here: https://blog.thesen.eu/tesla-command-button-beenden-und-entriegeln-des-steckers/
With an ESP8266 D1 Mini, I could fit everything in a Europen Type 2 plug. With just one switch I can now do both, open the charge door and release the charge plug.
With a CR123 lithium battery, it will last probably 10 years …
Best regards
Thomas