Skip to content

Instantly share code, notes, and snippets.

@JoooostB
Created March 4, 2025 19:20
Show Gist options
  • Save JoooostB/3a948ce385c05f8f2f1676812dc55b84 to your computer and use it in GitHub Desktop.
Save JoooostB/3a948ce385c05f8f2f1676812dc55b84 to your computer and use it in GitHub Desktop.
esphome configuration for tesla-ble with support for opening the chargeport via 433Mhz and a CC1101 module
substitutions:
espidf_version: 5.3.0
platformio_version: 6.8.1
board: esp32dev
variant: esp32
flash_size: 4MB
device_description: "https://github.com/yoziru/esphome-tesla-ble"
ble_mac_address: !secret ble_mac_address # vehicle BLE MAC address
tesla_vin: !secret tesla_vin
charging_amps_max: "16"
esp32:
board: esp32dev
# framework:
# type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: !secret api_encryption_key
ota:
- platform: esphome
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
external_components:
- source: github://yoziru/esphome-tesla-ble@main
- source: github://swoboda1337/components-esphome@main
components: [ cc1101 ]
packages:
base: github://yoziru/esphome-tesla-ble/packages/base.yml@main
client: github://yoziru/esphome-tesla-ble/packages/client.yml@main
# listener: github://yoziru/esphome-tesla-ble/packages/listener.yml@main # Uncomment this to scan find your VIN BLE MAC address
dashboard_import:
package_import_url: github://yoziru/esphome-tesla-ble/tesla-ble-esp32-generic.dashboard.yml@main
spi:
clk_pin: GPIO18 # SCK
miso_pin: GPIO19
mosi_pin: GPIO23
cc1101:
id: transceiver
cs_pin: GPIO5
bandwidth: 400
frequency: 433920
button:
- platform: template
name: "Open Chargeport"
id: chargeport
on_press:
- cc1101.begin_tx:
id: transceiver
- remote_transmitter.transmit_raw:
code: [400, -400, 400, -400, 400, -400, 400, -400, 400, -400, 400, -400, 400, -400, 400, -400, 400, -400, 400, -400, 400, -400, 400, -400, 400, -1200, 400, -400, 400, -400, 800, -800, 400, -400, 800, -800, 800, -800, 400, -400, 800, -800, 800, -800, 800, -800, 800, -800, 800, -800, 400, -400, 800, -400, 400, -800, 800, -400, 400, -800, 400, -400, 800, -400, 400, -400, 400, -800, 400, -400, 400, -400, 800, -400, 400, -800, 800, -400, 400, -800, 800, -800, 400, -400, 400, -400, 400, -400, 800, -400, 400, -800, 400, -400, 800, -1200, 400, -400, 400, -400, 800, -800, 400, -400, 800, -800, 800, -800, 400, -400, 800, -800, 800, -800, 800, -800, 800, -800, 800, -800, 400, -400, 800, -400, 400, -800, 800, -400, 400, -800, 400, -400, 800, -400, 400, -400, 400, -800, 400, -400, 400, -400, 800, -400, 400, -800, 800, -400, 400, -800, 800, -800, 400, -400, 400, -400, 400, -400, 800, -400, 400, -800, 400, -400, 800, -1200, 400, -400, 400, -400, 800, -800, 400, -400, 800, -800, 800, -800, 400, -400, 800, -800, 800, -800, 800, -800, 800, -800, 800, -800, 400, -400, 800, -400, 400, -800, 800, -400, 400, -800, 400, -400, 800, -400, 400, -400, 400, -800, 400, -400, 400, -400, 800, -400, 400, -800, 800, -400, 400, -800, 800, -800, 400, -400, 400, -400, 400, -400, 800, -400, 400, -800, 400, -400, 400, -25000]
# code: [0x02, 0xAA, 0xAA, 0xAA, 0x2B, 0x2C, 0xCB, 0x33, 0x33, 0x2D, 0x34, 0xB5, 0x2B, 0x4D, 0x32, 0xAD, 0x2C, 0x56, 0x59, 0x96, 0x66, 0x66, 0x5A, 0x69, 0x6A, 0x56, 0x9A, 0x65, 0x5A, 0x58, 0xAC, 0xB3, 0x2C, 0xCC, 0xCC, 0xB4, 0xD2, 0xD4, 0xAD, 0x34, 0xCA, 0xB4, 0xA0]
repeat:
times: 5
wait_time: 23ms
- cc1101.end_tx:
id: transceiver
remote_transmitter:
- id: transmitter
pin:
number: 16
carrier_duty_percent: 100%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment