Esp32-bt-proxy and power_save_mode

Hello!

I have an ESP32 (“AZDelivery ESP32 Board Dev Kit C V4 NodeMCU” - 240 MHz, 520 KB RAM, 4 MB Flash) with BT proxy running. There is no ethernet connection. Below is my esp32-bt-proxy.yaml file content:

substitutions:
  name: "esp32-bt-proxy"
  friendly_name: "ESP32 Bluetooth Proxy"

packages:
  esphome.bluetooth-proxy: github://esphome/bluetooth-proxies/esp32-generic/esp32-generic.yaml@main

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

esp32:
  board: az-delivery-devkit-v4      #esp32dev
  framework:
    type: esp-idf                   #arduino should NOT be used (https://esphome.io/components/bluetooth_proxy.html)

# Enable logging
logger:
  level: DEBUG

# Enable Home Assistant API
api:
  encryption:
    key: !secret esp32-bt-proxy_encryption_key

wifi:
  ssid: !secret router_ssid
  password: !secret router_password
  power_save_mode: LIGHT
  manual_ip:
    static_ip: 192.168.11.10
    gateway: 192.168.11.1
    subnet: 255.255.255.0

This codes comes from setting up via the Bluetooth Proxy installer website (with slight adjustments from me, e.g. use of !secrets). It apparently creates another (shorter) code than what is explained on ESPHome Bluetooth Proxy, which leaves me a bit puzzled.

I am unsure about the power_save_mode, which is not mentioned for the BT proxy. Do I have to set it at all? Does it affect only Wifi or also BT? If also the latter, should I better set power_save_mode to NONE (instead of LIGHT)?

EDIT1:
When I set it to NONE, I learn this:

power_save_mode NONE is incompatible with esp32_ble. Please remove the power save mode. See also With update to esphome v1.19 BLE Tracker on ESP32-S causes issue · Issue #2141 · esphome/issues · GitHub

So I keep it as LIGHT, but my other question, if this affects only Wifi or also BT, still remains.

EDIT2:
I replaced the log level value INFO by DEBUG and provide the output here for completeness:

INFO Starting log output from 192.168.11.10 using esphome API
INFO Successfully connected to esp32-bt-proxy @ 192.168.11.10 in 19.491s
INFO Successful handshake with esp32-bt-proxy @ 192.168.11.10 in 0.265s
[11:52:39][I][app:100]: ESPHome version 2024.8.3 compiled on Sep  9 2024, 11:46:47
[11:52:39][C][wifi:600]: WiFi:
[11:52:39][C][wifi:428]:   Local MAC: [redacted]:20
[11:52:39][C][wifi:433]:   SSID: [redacted]
[11:52:39][C][wifi:436]:   IP Address: 192.168.11.10
[11:52:39][C][wifi:440]:   BSSID: [redacted]
[11:52:39][C][wifi:441]:   Hostname: 'esp32-bt-proxy'
[11:52:39][C][wifi:443]:   Signal strength: -39 dB ▂▄▆█
[11:52:39][C][wifi:447]:   Channel: 1
[11:52:39][C][wifi:448]:   Subnet: 255.255.255.0
[11:52:39][C][wifi:449]:   Gateway: 192.168.11.1
[11:52:39][C][wifi:450]:   DNS1: 0.0.0.0
[11:52:39][C][wifi:451]:   DNS2: 0.0.0.0
[11:52:39][C][logger:185]: Logger:
[11:52:39][C][logger:186]:   Level: DEBUG
[11:52:39][C][logger:188]:   Log Baud Rate: 115200
[11:52:39][C][logger:189]:   Hardware UART: UART0
[11:52:39][C][bluetooth_proxy:088]: Bluetooth Proxy:
[11:52:39][C][bluetooth_proxy:089]:   Active: YES
[11:52:39][C][safe_mode.button:024]: Safe Mode Button 'Safe Mode Boot'
[11:52:39][C][safe_mode.button:024]:   Icon: 'mdi:restart-alert'
[11:52:40][C][factory_reset.button:011]: Factory Reset Button 'Factory reset'
[11:52:40][C][factory_reset.button:011]:   Icon: 'mdi:restart-alert'
[11:52:40][C][esp32_ble:391]: ESP32 BLE:
[11:52:40][C][esp32_ble:393]:   MAC address: [redacted]:22
[11:52:40][C][esp32_ble:394]:   IO Capability: none
[11:52:40][C][esp32_ble_tracker:653]: BLE Tracker:
[11:52:40][C][esp32_ble_tracker:654]:   Scan Duration: 300 s
[11:52:40][C][esp32_ble_tracker:655]:   Scan Interval: 320.0 ms
[11:52:40][C][esp32_ble_tracker:656]:   Scan Window: 30.0 ms
[11:52:40][C][esp32_ble_tracker:657]:   Scan Type: ACTIVE
[11:52:40][C][esp32_ble_tracker:658]:   Continuous Scanning: True
[11:52:40][C][mdns:116]: mDNS:
[11:52:40][C][mdns:117]:   Hostname: esp32-bt-proxy
[11:52:40][C][esphome.ota:073]: Over-The-Air updates:
[11:52:40][C][esphome.ota:074]:   Address: 192.168.11.10:3232
[11:52:40][C][esphome.ota:075]:   Version: 2
[11:52:40][C][safe_mode:018]: Safe Mode:
[11:52:40][C][safe_mode:020]:   Boot considered successful after 60 seconds
[11:52:40][C][safe_mode:021]:   Invoke after 10 boot attempts
[11:52:40][C][safe_mode:023]:   Remain in safe mode for 300 seconds
[11:52:40][C][api:139]: API Server:
[11:52:40][C][api:140]:   Address: 192.168.11.10:6053
[11:52:40][C][api:142]:   Using noise encryption: YES
[11:53:24][I][safe_mode:041]: Boot seems successful; resetting boot loop counter
[11:53:24][D][esp32.preferences:114]: Saving 1 preferences to flash...
[11:53:24][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed

Apart from the power save mode, is there anything else that I missed or overlooked and should correct?

The log looks ok to my understanding.

Thanks a lot for sharing your thoughts! :+1:

I would leave it at the default, ie don’t specify at all. This is what the yaml specifies.

1 Like