Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Based on:
- # + https://github.com/yoziru/esphome-tesla-ble/blob/main/boards/esp32-generic.yml
- # + https://github.com/yoziru/esphome-tesla-ble/blob/main/packages/base.yml
- # change:
- # - remote packages from github (for ESPHome dashboard for add-on on supervised HA)
- # - compile_process limit (preventing random build errors)
- # - do not use mac suffix on name (I like it this way)
- # - logging tuning for debug
- # - playing with some ble_tracker settings, trying to make ble communication more reliable with my board => not much difference.
- esp32:
- board: az-delivery-devkit-v4
- flash_size: 4MB
- framework:
- type: esp-idf
- version: 5.2.2
- platform_version: 6.7.0
- substitutions:
- friendly_name: ESPHome Tesla BLE
- device_name: "esphome-tesla-ble"
- device_description: Tesla BLE
- esphome:
- compile_process_limit: 1 # build optimization for low memory machine (RPI), prevent random build errors
- name: ${device_name}
- name_add_mac_suffix: false
- friendly_name: ${friendly_name}
- comment: ${device_description}
- project:
- name: yoziru.esphome-tesla-ble
- version: "2024.7.28"
- libraries:
- - https://github.com/yoziru/tesla-ble.git#v2.2.0
- packages:
- common:
- url: https://github.com/yoziru/esphome-tesla-ble/
- ref: main # Tried also to use specific version, no difference getting code to update from github mor ethen than every 24h (?).
- files: packages/common.yml
- refresh: 0s # This seems to not have affect; still caches sources files for 24h it seems(?). Maybe related to this https://github.com/esphome/esphome/pull/5443
- client:
- url: https://github.com/yoziru/esphome-tesla-ble/
- ref: main
- files: packages/client.yml
- refresh: 0s
- # ..try with fixed version tag to try to force esphome to get the right remote packages code from git.
- # common: github://yoziru/esphome-tesla-ble/packages/common.yml@2024.7.28
- # client: github://yoziru/esphome-tesla-ble/packages/client.yml@2024.7.28
- # listener: github://yoziru/esphome-tesla-ble/packages/listener.yml@main # Uncomment this to scan find your VIN BLE MAC address
- logger:
- level: DEBUG
- baud_rate: 0 # Disable serial logging, because might affect ble performance?
- logs:
- wifi: INFO # INFO
- uptime: INFO # INFO
- api: INFO # INFO
- sensor: DEBUG # DEBUG to show sensor value updates to HA, INFO
- esp32_ble: INFO # INFO
- esp32_ble_client: INFO # WARN to not show service UUIDs, INFO
- esp32_ble_tracker: INFO # DEBUG to show discovered devices, INFO
- esp32_ble_client.service: NONE # INFO to list characteristics, NONE
- ble_client.automation: INFO # DEBUG to show connections, INFO
- ble_sensor: WARN # INFO to show connected characteristics, WARN
- api:
- encryption:
- key: !secret api_encryption_key
- # sync time with home assistant
- time:
- - platform: homeassistant
- id: homeassistant_time
- ota:
- platform: esphome
- password: !secret ota_password
- esp32_ble_tracker:
- scan_parameters:
- # Activate scan only after wifi connect, see https://github.com/esphome/issues/issues/2941#issuecomment-1842369092
- continuous: false
- interval: 320ms # default = 320ms
- window: 60ms # default = 30ms # https://esphome.io/components/esp32_ble_tracker.html
- active: true # default = true
- wifi:
- ssid: !secret wifi_ssid
- password: !secret wifi_password
- # Enable fallback hotspot (captive portal) in case wifi connection fails
- ap:
- password: !secret wifi_hotspot_password
- # Activate scan only after wifi connect, see https://github.com/esphome/issues/issues/2941#issuecomment-1842369092
- on_connect:
- - esp32_ble_tracker.start_scan:
- continuous: true
- on_disconnect:
- - esp32_ble_tracker.stop_scan:
- captive_portal:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement