I’m trying to add a ReSpeakerv3 to Home Assistant, yaml file below, but when I click install it gives this compile error:
INFO ESPHome 2024.12.2
INFO Reading configuration /config/esphome/respeaker-s3.yaml...
INFO Generating C++ source...
INFO Updating https://github.com/espressif/[email protected]
INFO Compiling app...
Processing esp32s3 (board: esp32-s3-devkitc-1; framework: espidf; platform: https://github.com/pioarduino/platform-espressif32.git#51.03.07)
--------------------------------------------------------------------------------
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
- framework-espidf @ 3.50105.0 (5.1.5)
- tool-cmake @ 3.21.3
- tool-esptoolpy @ 4.8.1
- tool-mklittlefs @ 3.2.0
- tool-ninja @ 1.10.2
- tool-riscv32-esp-elf-gdb @ 12.1.0+20221002
- tool-xtensa-esp-elf-gdb @ 12.1.0+20221002
- toolchain-esp32ulp @ 2.35.0-20220830
- toolchain-riscv32-esp @ 12.2.0+20230208
- toolchain-xtensa-esp32s3 @ 12.2.0+20230208
Reading CMake configuration...
No dependencies
Compiling .pioenvs/esp32s3/src/esphome/components/i2s_audio_xiao/i2s_audio_xiao.cpp.o
Compiling .pioenvs/esp32s3/src/esphome/components/i2s_audio_xiao/speaker/i2s_audio_speaker.cpp.o
In file included from src/esphome/components/i2s_audio_xiao/i2s_audio_xiao.h:5,
from src/esphome/components/i2s_audio_xiao/i2s_audio_xiao.cpp:1:
/data/cache/platformio/packages/framework-espidf/components/driver/deprecated/driver/i2s.h:27:2: warning: #warning "This set of I2S APIs has been deprecated, please include 'driver/i2s_std.h', 'driver/i2s_pdm.h' or 'driver/i2s_tdm.h' instead. if you want to keep using the old APIs and ignore this warning, you can enable 'Suppress leagcy driver deprecated warning' option under 'I2S Configuration' menu in Kconfig" [-Wcpp]
27 | #warning "This set of I2S APIs has been deprecated, \
| ^~~~~~~
Compiling .pioenvs/esp32s3/src/esphome/components/light/addressable_light.cpp.o
Compiling .pioenvs/esp32s3/src/esphome/components/light/automation.cpp.o
In file included from src/esphome/components/i2s_audio_xiao/speaker/../i2s_audio_xiao.h:5,
from src/esphome/components/i2s_audio_xiao/speaker/i2s_audio_speaker.h:5,
from src/esphome/components/i2s_audio_xiao/speaker/i2s_audio_speaker.cpp:1:
/data/cache/platformio/packages/framework-espidf/components/driver/deprecated/driver/i2s.h:27:2: warning: #warning "This set of I2S APIs has been deprecated, please include 'driver/i2s_std.h', 'driver/i2s_pdm.h' or 'driver/i2s_tdm.h' instead. if you want to keep using the old APIs and ignore this warning, you can enable 'Suppress leagcy driver deprecated warning' option under 'I2S Configuration' menu in Kconfig" [-Wcpp]
27 | #warning "This set of I2S APIs has been deprecated, \
| ^~~~~~~
src/esphome/components/i2s_audio_xiao/i2s_audio_xiao.cpp: In member function 'virtual void esphome::i2s_audio_xiao::I2SAudioComponent::setup()':
src/esphome/components/i2s_audio_xiao/i2s_audio_xiao.cpp:15:24: error: 'I2S_NUM_MAX' was not declared in this scope; did you mean 'I2S_NUM_1'?
15 | if (next_port_num >= I2S_NUM_MAX) {
| ^~~~~~~~~~~
| I2S_NUM_1
*** [.pioenvs/esp32s3/src/esphome/components/i2s_audio_xiao/i2s_audio_xiao.cpp.o] Error 1
src/esphome/components/i2s_audio_xiao/speaker/i2s_audio_speaker.cpp: In static member function 'static void esphome::i2s_audio_xiao::I2SAudioSpeaker::player_task(void*)':
src/esphome/components/i2s_audio_xiao/speaker/i2s_audio_speaker.cpp:54:24: error: 'I2S_MCLK_MULTIPLE_DEFAULT' was not declared in this scope; did you mean 'I2S_MCLK_MULTIPLE_512'?
54 | .mclk_multiple = I2S_MCLK_MULTIPLE_DEFAULT,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| I2S_MCLK_MULTIPLE_512
*** [.pioenvs/esp32s3/src/esphome/components/i2s_audio_xiao/speaker/i2s_audio_speaker.cpp.o] Error 1
========================== [FAILED] Took 6.17 seconds ==========================
This my yaml file, mostly a copy paste from the install page (https://wiki.seeedstudio.com/respeaker_lite_ha/)
esphome:
name: esp32s3
friendly_name: ReSpeakerv3
platformio_options:
board_build.flash_mode: dio
board_build.mcu: esp32s3
# on_boot:
# then:
# - if:
# condition:
# switch.is_on:
# then:
# - voice_assistant.start_continuous:
esp32:
board: esp32-s3-devkitc-1
variant: esp32s3
framework:
type: esp-idf
version: recommended
logger:
level: VERY_VERBOSE
api:
wifi:
networks:
- ssid: ZONE0
password: !secret wifi_password
- ssid: ZONE1
password: !secret wifi_password
- ssid: ZONE2
password: !secret wifi_password
ap:
ssid: "Respeaker-S3 Fallback Hotspot"
password: ""
captive_portal:
external_components:
- source: github://QingWind6/ESPHome_XIAO-ESP32S3
i2s_audio_xiao:
i2s_lrclk_pin: GPIO7
i2s_bclk_pin: GPIO8
i2s_mclk_pin: GPIO9
microphone:
- platform: i2s_audio_xiao
id: xiao_mic
adc_type: external
i2s_din_pin: GPIO44
pdm: false
bits_per_sample: 32bit
channel: left
speaker:
- platform: i2s_audio_xiao
id: xiao_speaker
dac_type: external
i2s_dout_pin: GPIO43
mode: stereo
voice_assistant:
microphone: xiao_mic
use_wake_word: true
noise_suppression_level: 0
auto_gain: 0dBFS
volume_multiplier: 1
speaker: xiao_speaker
id: assist
on_listening:
- light.turn_on:
id: led
blue: 100%
red: 0%
green: 0%
effect: "Slow Pulse"
on_stt_vad_end:
- light.turn_on:
id: led
blue: 100%
red: 0%
green: 0%
effect: "Fast Pulse"
on_tts_start:
- light.turn_on:
id: led
blue: 100%
red: 0%
green: 0%
brightness: 100%
effect: none
on_end:
- delay: 100ms
- wait_until:
not:
speaker.is_playing:
- script.execute: reset_led
on_error:
- light.turn_on:
id: led
red: 100%
green: 0%
blue: 0%
brightness: 100%
effect: none
- delay: 1s
- script.execute: reset_led
on_client_connected:
- if:
condition:
switch.is_on: use_wake_word
then:
- voice_assistant.start_continuous:
- script.execute: reset_led
on_client_disconnected:
- if:
condition:
switch.is_on: use_wake_word
then:
- voice_assistant.stop:
- light.turn_off: led
light:
- platform: esp32_rmt_led_strip
id: led
name: None
disabled_by_default: true
entity_category: config
pin: GPIO1
default_transition_length: 0s
chipset: ws2812
num_leds: 1
rgb_order: grb
rmt_channel: 0
effects:
- pulse:
name: "Slow Pulse"
transition_length: 250ms
update_interval: 250ms
min_brightness: 50%
max_brightness: 100%
- pulse:
name: "Fast Pulse"
transition_length: 100ms
update_interval: 100ms
min_brightness: 50%
max_brightness: 100%
output:
- platform: ledc
id: light_output
pin: GPIO21
inverted: true
script:
- id: reset_led
then:
- if:
condition:
- switch.is_on: use_wake_word
- switch.is_on: use_listen_light
then:
- light.turn_on:
id: led
effect: none
else:
- light.turn_off:
id: led
switch:
- platform: template
name: Use wake word
id: use_wake_word
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
entity_category: config
on_turn_on:
- lambda: id(assist).set_use_wake_word(true);
- if:
condition:
not:
- voice_assistant.is_running
then:
- voice_assistant.start_continuous
on_turn_off:
- voice_assistant.stop
- lambda: id(assist).set_use_wake_word(false);
- platform: template
name: Use Listen Light
id: use_listen_light
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
entity_category: config
on_turn_on:
- script.execute: reset_led
on_turn_off:
- script.execute: reset_led