Hej
chce zrobić kilka małych głośników wifi i to w zasadzie działa oraz możliwość łączenia się z nimi przez bluetooth.
Urządzenie jest wykrywane przez bluetooth ale nie może się sparować.
esphome:
name: radio-internetowe-z-ha
platform: ESP32
board: esp32-s3-devkitc-1
# Uruchamianie skryptu przy starcie
on_boot:
priority: -100
then:
- script.execute: set_initial_volume
# Enable logging
logger:
level: VERY_VERBOSE
# Enable Home Assistant API
api:
encryption:
key: !secret key
ota:
platform: esphome
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
output_power: 8.5
manual_ip:
static_ip: 192.168.xx.xx
gateway: 192.168.xx.xx
subnet: 255.255.255.0
dns1: 8.8.8.8
dns2: 8.8.4.4
# Opcjonalnie ustawiamy punkt dostępowy (captive portal) jako fallback
ap:
ssid: "Radio-Internetowe-Z-Ha"
password: !secret ap_password
captive_portal:
# Konfiguracja interfejsu I2S dla ESP32
i2s_audio:
i2s_lrclk_pin: GPIO01
i2s_bclk_pin: GPIO03
# Example configuration entry
media_player:
- platform: i2s_audio
name: ESPHome I2S Media Player
dac_type: external
i2s_dout_pin: GPIO02
mode: mono
id: esp_i2s_media_player
# Ustawienie domyślnej głośności na start
script:
- id: set_initial_volume
then:
- delay: 5s
- media_player.volume_set:
id: esp_i2s_media_player
volume: 0.13
esp32_ble_server:
manufacturer: "Orange"
manufacturer_data: [0x4C, 0, 0x23, 77, 0xF0 ]
LOG
[16:55:51][D][esp32_ble_server:155]: BLE Client connected
[16:55:57][VV][scheduler:226]: Running interval '' with interval=60000 last_execution=4294942251 (now=34957)
[16:56:07][VV][api.service:674]: on_ping_request: PingRequest {}
[16:56:07][VV][api.service:043]: send_ping_response: PingResponse {}
[16:56:23][I][safe_mode:041]: Boot seems successful; resetting boot loop counter
[16:56:23][VV][esp32.preferences:040]: s_pending_save: key: 233825507, len: 4
[16:56:23][D][esp32.preferences:114]: Saving 1 preferences to flash...
[16:56:23][VV][esp32.preferences:123]: Checking if NVS data 233825507 has changed
[16:56:23][V][esp32.preferences:126]: sync: key: 233825507, len: 4
[16:56:23][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[16:56:24][VV][esp-idf:000][BTU_TASK]: W (69861) BT_HCI: hcif disc complete: hdl 0x1, rsn 0x13
[16:56:24][VV][esp-idf:000][BTU_TASK]: W (69861) BT_BTM: btm_sec_clr_temp_auth_service() - no dev CB
[16:56:24][VV][esp-idf:000][BTU_TASK]: E (69862) BT_BTM: Device not found
[16:56:24][V][esp32_ble:337]: (BLE) gatts_event [esp_gatt_if: 3] - 15
[16:56:24][D][esp32_ble_server:164]: BLE Client disconnected