diff --git a/README.md b/README.md index 07c82db..cdb1c45 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Tested with M5Stack NanoC6 and Tesla firmwares 2024.26.3.1. - [x] Doors locked / unlocked - [x] User present / not present - [x] Charging flap open / closed (only when vehicle is awake) - - [x] BLE signal strength + - [x] BLE signal strength ## Usage @@ -33,10 +33,10 @@ Tested with M5Stack NanoC6 and Tesla firmwares 2024.26.3.1. ### Finding the BLE MAC address of your vehicle 1. Copy and rename `secrets.yaml.example` to `secrets.yaml` and update it with your WiFi credentials (`wifi_ssid` and `wifi_password`) and vehicle VIN (`tesla_vin`). -1. Enable the `tesla_ble_listener` package in `packages/base.yml` and build the firmware. -1. Flash the firmware to your ESP32 device. -1. Open the ESPHome logs in Home Assistant andto wake it up. watch for the "Found Tesla vehicle" message, which will contain the BLE MAC address of your vehicle. - > Note: The vehicle must be in range and awake for the BLE MAC address to be discovered. If the vehicle is not awake, open the Tesla app and run any command +1. Enable the `tesla_ble_listener` package in `packages/base.yml` by uncommenting the `listener: !include listener.yml` line. +1. Build and flash the firmware to your ESP32 device. See the 'Building and flashing ESP32 firmware' section below. +1. Open the ESPHome logs in Home Assistant and wake it up. Watch for the "Found Tesla vehicle" message, which will contain the BLE MAC address of your vehicle. + > Note: The vehicle must be in range and awake for the BLE MAC address to be discovered. If the vehicle is not awake, open the Tesla app and run any command ```log [00:00:00][D][tesla_ble_listener:044]: Parsing device: [CC:BB:D1:E2:34:F0]: BLE Device name 1 [00:00:00][D][tesla_ble_listener:044]: Parsing device: [19:8A:BB:C3:D2:1F]: @@ -54,7 +54,7 @@ Tested with M5Stack NanoC6 and Tesla firmwares 2024.26.3.1. ### Building and flashing ESP32 firmware 1. Connect your ESP32 device to your computer via USB 1. Copy and rename `secrets.yaml.example` to `secrets.yaml` and update it with your WiFi credentials (`wifi_ssid` and `wifi_password`) and vehicle details (`ble_mac_address` and `tesla_vin`) -1. Build the image with [ESPHome](https://esphome.io/guides/getting_started_command_line.html) +1. Build the image with [ESPHome](https://esphome.io/guides/getting_started_command_line.html). Alternate boards are listed in the `boards/` directory. ```sh make compile BOARD=m5stack-nanoc6 @@ -63,7 +63,7 @@ Tested with M5Stack NanoC6 and Tesla firmwares 2024.26.3.1. 1. Upload/flash the firmware to the board. ```sh - make upload + make upload BOARD=m5stack-nanoc6 ``` 1. After flashing, you can use the log command to monitor the logs from the device. The host suffix is the last part of the device name in the ESPHome dashboard (e.g. `5b2ac7`). @@ -80,7 +80,7 @@ Tested with M5Stack NanoC6 and Tesla firmwares 2024.26.3.1. ### Adding the device to Home Assistant -1. In Home Assistant, go to Settings > Devices & Services. If your device is discovered automatically, you can add it by clicking the "Configure" button by the discovered device. If not, click the "+ Add integration" button and select "ESPHome" as the integration and enter the IP address of your device. +1. In Home Assistant, go to Settings > Devices & Services. If your device is discovered automatically, you can add it by clicking the "Configure" button by the discovered device. If not, click the "+ Add integration" button and select "ESPHome" as the integration and enter the IP address of your device. 2. Enter the API encryption key from the `secrets.yaml` file when prompted. 3. That's it! You should now see the device in Home Assistant and be able to control it. diff --git a/packages/base.yml b/packages/base.yml index 2a2d4ca..a1aaa09 100644 --- a/packages/base.yml +++ b/packages/base.yml @@ -7,6 +7,7 @@ packages: board: !include board.yml common: !include common.yml project: !include project.yml + # listener: !include packages/listener.yml # Uncomment this to scan find your VIN BLE MAC address esphome: name: ${device_name} diff --git a/tesla-ble-esp32-generic.yml b/tesla-ble-esp32-generic.yml index b0bbd6f..61c7f02 100644 --- a/tesla-ble-esp32-generic.yml +++ b/tesla-ble-esp32-generic.yml @@ -4,7 +4,6 @@ packages: base: !include packages/base.yml device_base: !include boards/esp32-generic.yml client: !include packages/client.yml - # listener: !include packages/listener.yml # 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 diff --git a/tesla-ble-m5stack-atoms3.yml b/tesla-ble-m5stack-atoms3.yml index 4a26601..0cda13f 100644 --- a/tesla-ble-m5stack-atoms3.yml +++ b/tesla-ble-m5stack-atoms3.yml @@ -4,7 +4,6 @@ packages: base: !include packages/base.yml device_base: !include boards/m5stack-atoms3.yml client: !include packages/client.yml - # listener: !include packages/listener.yml # Uncomment this to scan find your VIN BLE MAC address # for ESPHome Dashboard, use this instead of external_components dashboard_import: diff --git a/tesla-ble-m5stack-nanoc6.yml b/tesla-ble-m5stack-nanoc6.yml index 2e7adc2..aad6376 100644 --- a/tesla-ble-m5stack-nanoc6.yml +++ b/tesla-ble-m5stack-nanoc6.yml @@ -4,7 +4,6 @@ packages: base: !include packages/base.yml device_base: !include boards/m5stack-nanoc6.yml client: !include packages/client.yml - # listener: !include packages/listener.yml # Uncomment this to scan find your VIN BLE MAC address dashboard_import: package_import_url: github://yoziru/esphome-tesla-ble/tesla-ble-m5stack-nanoc6.dashboard.yml diff --git a/tesla-ble.example.yml b/tesla-ble.example.yml index f32ce5b..d28491b 100644 --- a/tesla-ble.example.yml +++ b/tesla-ble.example.yml @@ -18,7 +18,6 @@ packages: base: !include packages/base.yml client: !include packages/client.yml common: !include packages/common.yml - # listener: !include packages/listener.yml # Uncomment this to scan find your VIN BLE MAC address # for ESPHome Dashboard, use this instead of external_components dashboard_import: