146 lines
3.6 KiB
Django/Jinja
146 lines
3.6 KiB
Django/Jinja
|
|
# based on:
|
|
# https://github.com/esphome/bluetooth-proxies/blob/main/esp32-generic.yaml
|
|
|
|
esphome:
|
|
# name is hostname
|
|
name: esphome-bleproxy
|
|
friendly_name: BLE Proxy
|
|
name_add_mac_suffix: false
|
|
#project:
|
|
# name: esphome.bluetooth-proxy
|
|
# version: "1.0"
|
|
# provided by esph.py
|
|
build_path: "${build_path}"
|
|
|
|
esp32:
|
|
# board: esp32dev
|
|
board: esp-wrover-kit
|
|
framework:
|
|
# arduino framework uses significantly more memory and performs
|
|
# poorly with the Bluetooth proxy enabled.
|
|
type: esp-idf
|
|
|
|
logger:
|
|
|
|
api:
|
|
password: "{{ hass_esphome_api_password }}"
|
|
|
|
ota:
|
|
password: "{{ hass_esphome_ota_password }}"
|
|
|
|
wifi:
|
|
ssid: "{{ hass_esphome_wifi_ssid }}"
|
|
password: "{{ hass_esphome_wifi_password }}"
|
|
domain: .{{ inventory_hostname.split('.')[1:] | join('.') }}
|
|
|
|
ap:
|
|
# use device_name
|
|
# ssid:
|
|
password: "{{ hass_esphome_fallback_wifi_password }}"
|
|
|
|
mdns:
|
|
disabled: true
|
|
|
|
esp32_ble_tracker:
|
|
on_ble_advertise:
|
|
- then:
|
|
- lambda: |-
|
|
ESP_LOGD("ble_adv", "New BLE device");
|
|
ESP_LOGD("ble_adv", " address: %s", x.address_str().c_str());
|
|
ESP_LOGD("ble_adv", " name: %s", x.get_name().c_str());
|
|
ESP_LOGD("ble_adv", " Advertised service UUIDs:");
|
|
for (auto uuid : x.get_service_uuids()) {
|
|
ESP_LOGD("ble_adv", " - %s", uuid.to_string().c_str());
|
|
}
|
|
ESP_LOGD("ble_adv", " Advertised service data:");
|
|
for (auto data : x.get_service_datas()) {
|
|
ESP_LOGD("ble_adv", " - %s: (length %i)", data.uuid.to_string().c_str(), data.data.size());
|
|
}
|
|
ESP_LOGD("ble_adv", " Advertised manufacturer data:");
|
|
for (auto data : x.get_manufacturer_datas()) {
|
|
ESP_LOGD("ble_adv", " - %s: (length %i)", data.uuid.to_string().c_str(), data.data.size());
|
|
}
|
|
scan_parameters:
|
|
active: false
|
|
|
|
# # defaults
|
|
# # interval: 320ms
|
|
# # window: 30ms
|
|
# # max chances
|
|
# #interval: 1100ms
|
|
# #window: 1100ms
|
|
# # try next
|
|
# interval: 1100ms
|
|
# window: 550ms
|
|
|
|
bluetooth_proxy:
|
|
active: false
|
|
#cache_services: true # defaults to true
|
|
|
|
text_sensor:
|
|
# for reading with appdaemon
|
|
# its excluded from the recorder in home assistant
|
|
- platform: ble_scanner
|
|
name: "json ble scanner"
|
|
#id: esphome_bleproxy_ble_scanner
|
|
|
|
- platform: wifi_info
|
|
mac_address:
|
|
name: "WiFi MAC"
|
|
entity_category: "diagnostic"
|
|
|
|
binary_sensor:
|
|
- platform: status
|
|
name: Status
|
|
entity_category: "diagnostic"
|
|
id: esphome_bleproxy_status
|
|
|
|
switch:
|
|
- platform: restart
|
|
name: "Reboot"
|
|
icon: mdi:power-cycle
|
|
id: esphome_bleproxy_reboot
|
|
|
|
#esp32_camera:
|
|
# name: My Camera
|
|
# external_clock:
|
|
# pin: GPIO27
|
|
# frequency: 20MHz
|
|
# i2c_pins:
|
|
# sda: GPIO25
|
|
# scl: GPIO23
|
|
# data_pins: [GPIO17, GPIO35, GPIO34, GPIO5, GPIO39, GPIO18, GPIO36, GPIO19]
|
|
# vsync_pin: GPIO22
|
|
# href_pin: GPIO26
|
|
# pixel_clock_pin: GPIO21
|
|
# reset_pin: GPIO15
|
|
# resolution: 640x480
|
|
# jpeg_quality: 10
|
|
|
|
esp32_camera:
|
|
external_clock:
|
|
pin: GPIO21
|
|
frequency: 20MHz
|
|
i2c_pins:
|
|
sda: GPIO26
|
|
scl: GPIO27
|
|
data_pins: [GPIO4, GPIO5, GPIO18, GPIO19, GPIO36, GPIO39, GPIO34, GPIO35]
|
|
vsync_pin: GPIO25
|
|
href_pin: GPIO23
|
|
pixel_clock_pin: GPIO22
|
|
|
|
# Image settings
|
|
name: ESP32 Camera
|
|
|
|
# ------------------------------------------------
|
|
|
|
|
|
# from esphome/bluetooth-proxies/esp32-generic.yaml, see https://esphome.io/components/improv_serial.html
|
|
# improv_serial:
|
|
|
|
|
|
# also from esphome/bluetooth-proxies
|
|
#dashboard_import:
|
|
# package_import_url: github://esphome/bluetooth-proxies/esp32-generic.yaml@main
|