Advertisement
Guest User

Untitled

a guest
Jul 29th, 2024
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.84 KB | None | 0 0
  1. # Based on:
  2. # + https://github.com/yoziru/esphome-tesla-ble/blob/main/boards/esp32-generic.yml
  3. # + https://github.com/yoziru/esphome-tesla-ble/blob/main/packages/base.yml
  4. # change:
  5. # - remote packages from github (for ESPHome dashboard for add-on on supervised HA)
  6. # - compile_process limit (preventing random build errors)
  7. # - do not use mac suffix on name (I like it this way)
  8. # - logging tuning for debug
  9. # - playing with some ble_tracker settings, trying to make ble communication more reliable with my board => not much difference.
  10.  
  11. esp32:
  12. board: az-delivery-devkit-v4
  13. flash_size: 4MB
  14. framework:
  15. type: esp-idf
  16. version: 5.2.2
  17. platform_version: 6.7.0
  18.  
  19. substitutions:
  20. friendly_name: ESPHome Tesla BLE
  21. device_name: "esphome-tesla-ble"
  22. device_description: Tesla BLE
  23.  
  24. esphome:
  25. compile_process_limit: 1 # build optimization for low memory machine (RPI), prevent random build errors
  26. name: ${device_name}
  27. name_add_mac_suffix: false
  28. friendly_name: ${friendly_name}
  29. comment: ${device_description}
  30. project:
  31. name: yoziru.esphome-tesla-ble
  32. version: "2024.7.28"
  33. libraries:
  34. - https://github.com/yoziru/tesla-ble.git#v2.2.0
  35.  
  36.  
  37. packages:
  38. common:
  39. url: https://github.com/yoziru/esphome-tesla-ble/
  40. ref: main # Tried also to use specific version, no difference getting code to update from github mor ethen than every 24h (?).
  41. files: packages/common.yml
  42. 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
  43.  
  44. client:
  45. url: https://github.com/yoziru/esphome-tesla-ble/
  46. ref: main
  47. files: packages/client.yml
  48. refresh: 0s
  49. # ..try with fixed version tag to try to force esphome to get the right remote packages code from git.
  50. # common: github://yoziru/esphome-tesla-ble/packages/common.yml@2024.7.28
  51. # client: github://yoziru/esphome-tesla-ble/packages/client.yml@2024.7.28
  52. # listener: github://yoziru/esphome-tesla-ble/packages/listener.yml@main # Uncomment this to scan find your VIN BLE MAC address
  53.  
  54. logger:
  55. level: DEBUG
  56. baud_rate: 0 # Disable serial logging, because might affect ble performance?
  57. logs:
  58. wifi: INFO # INFO
  59. uptime: INFO # INFO
  60. api: INFO # INFO
  61. sensor: DEBUG # DEBUG to show sensor value updates to HA, INFO
  62. esp32_ble: INFO # INFO
  63. esp32_ble_client: INFO # WARN to not show service UUIDs, INFO
  64. esp32_ble_tracker: INFO # DEBUG to show discovered devices, INFO
  65. esp32_ble_client.service: NONE # INFO to list characteristics, NONE
  66. ble_client.automation: INFO # DEBUG to show connections, INFO
  67. ble_sensor: WARN # INFO to show connected characteristics, WARN
  68.  
  69. api:
  70. encryption:
  71. key: !secret api_encryption_key
  72.  
  73. # sync time with home assistant
  74. time:
  75. - platform: homeassistant
  76. id: homeassistant_time
  77.  
  78. ota:
  79. platform: esphome
  80. password: !secret ota_password
  81.  
  82.  
  83. esp32_ble_tracker:
  84. scan_parameters:
  85. # Activate scan only after wifi connect, see https://github.com/esphome/issues/issues/2941#issuecomment-1842369092
  86. continuous: false
  87. interval: 320ms # default = 320ms
  88. window: 60ms # default = 30ms # https://esphome.io/components/esp32_ble_tracker.html
  89. active: true # default = true
  90.  
  91. wifi:
  92. ssid: !secret wifi_ssid
  93. password: !secret wifi_password
  94. # Enable fallback hotspot (captive portal) in case wifi connection fails
  95. ap:
  96. password: !secret wifi_hotspot_password
  97. # Activate scan only after wifi connect, see https://github.com/esphome/issues/issues/2941#issuecomment-1842369092
  98. on_connect:
  99. - esp32_ble_tracker.start_scan:
  100. continuous: true
  101. on_disconnect:
  102. - esp32_ble_tracker.stop_scan:
  103.  
  104. captive_portal:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement