ESP Home and ESP32 S3 Box?

I picked one up from ADAFruit and they were out of stock within a couple of days, hot item right now.

Have you managed to use it as a mic against HA Assist using your code? That has been my goal I started looking into and came across this post.

I just picked one up from Digikey (to the UK)
£43 total.

ok :slight_smile:
With the recent ESPHome Update, the Display for the Box is now implemented as Beta…

I got it working and the Box is now acting as Bluetooth-Proxy which displays a Clock… :slight_smile:
For now, I just not implemented Microphone, Speaker, Touch and the RGB-LED which comes with it, because in the current state it fits my main needs…everything else can be implemented later on…

Here’s my current config:

esphome:
  name: esp32-box
  friendly_name: ESP32 Box

esp32:
  board: esp32s3box
  framework:
    type: arduino

spi:
  clk_pin: GPIO7
  mosi_pin: GPIO6

light:
#  - platform: rgb
#    name: RGB LED
#    red: rgb_red
#    green: rgb_green
#    blue: rgb_blue
  - platform: monochromatic
    output: lcd_backlight
    name: "LCD Backlight"
    restore_mode: ALWAYS_ON

output:
#  - platform: ledc
#    id: rgb_red
#    pin: GPIO39
#  - platform: ledc
#    id: rgb_green
#    pin: GPIO40
#  - platform: ledc
#    id: rgb_blue
#    pin: GPIO41
  - platform: ledc
    pin: GPIO45
    id: lcd_backlight

display:
  - platform: ili9xxx
    model: S3BOX
    cs_pin: GPIO5
    dc_pin: GPIO4
    reset_pin: GPIO48
    id: lcd
    lambda: |-
      it.fill(Color(255, 255, 255));
      it.strftime(160, 85, id(font_time), Color::BLACK, TextAlign::CENTER, "%H:%M:%S", id(time_ha).now());
      it.strftime(160, 170, id(font_date), Color::BLACK, TextAlign::CENTER, "%d.%m.%Y", id(time_ha).now());

font:
  - file: "gfonts://Roboto"
    id: font_time
    size: 60
    glyphs: "0123456789:"
  - file: "gfonts://Roboto"
    id: font_date
    size: 50
    glyphs: "0123456789."
  - file: "gfonts://Roboto"
    id: font_small
    size: 20

time:
  - platform: homeassistant
    id: time_ha
    timezone: Europe/Berlin

# Enable Home Assistant API
api:
  encryption:
    key: xxxxx

ota:
  password: xxxxx

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp32-Box Fallback Hotspot"
    password: xxxxx

bluetooth_proxy:
  active: true

button:
  - platform: restart
    name: "Restart Device"

text_sensor:
  - platform: wifi_info
    ip_address:
      name: IP Address
    ssid:
      name: Connected SSID
    bssid:
      name: Connected BSSID
    mac_address:
      name: Mac Wifi Address
    scan_results:
      name: Latest Scan Results

sensor:
  - platform: wifi_signal
    name: "WiFi Signal Sensor"
    update_interval: 60s

  - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
    name: "WiFi Signal dB"
    id: wifi_signal_db
    update_interval: 60s
    entity_category: "diagnostic"

captive_portal:

I kept the config for the RGB LED in it but commented it out - so if you are interested in it, you can easily use it :slight_smile:

8 Likes

How do you integrate the red circle?
Update: See esphome#4793 and the

binary_sensor:
  - platform: tt21100
    name: "Home"
    index: 0

I didn’t.
At least Not yet.

Does anyone here has a working config for ESP32 S3 Box Lite?

1 Like

I got my ESP32 S3 Lite working

esphome:
  name: esp-s3-box
  friendly_name: esp-s3-box

esp32:
  board: esp32s3box
  framework:
    type: arduino
    version: latest

external_components:
  - source: github://pr#4793
    components: [ tt21100 ]
  - source: github://pr#4861
    components: [ es8311 ]
  - source: github://rpatel3001/esphome@es7210
    components: [ es7210 ]

# Enable logging
logger:
  # CDC logging is currently not working on the S3
  # See https://github.com/espressif/esp-idf/commit/9924d9f27192a5fab5f66230c72249ecc6cad34c
  #hardware_uart: USB_CDC
  level: VERBOSE
  logs:
    esp32_ble: WARN
    esp32_ble_tracker: WARN
    ble_dist: WARN
    sensor: WARN
    ledc.output: WARN
    component: WARN
    ili9xxx: WARN
    tt21100: WARN
    touchscreen: WARN
    wifi: WARN
    es8311: WARN
    i2s_audio: VERBOSE
    voice_assistant: VERBOSE
    es7210: WARN

bluetooth_proxy:
  active: true

captive_portal:

time:
  - platform: homeassistant
    id: time_ha
    timezone: Europe/Amsterdam

spi:
  clk_pin: GPIO7
  mosi_pin: GPIO6

display:
  - platform: ili9xxx
    model: S3BOX_LITE
    cs_pin: GPIO5
    dc_pin: GPIO4
    reset_pin: GPIO48
    id: lcd
    # Width = 320, Height = 240
    pages:
      - id: page1
        lambda: |-
          it.strftime(160, 65, id(font_large), Color::WHITE, TextAlign::CENTER, "%H:%M:%S", id(time_ha).now());
          it.strftime(160, 115, id(font_medium), Color::WHITE, TextAlign::CENTER, "%a, %e %b", id(time_ha).now());

interval:
  - interval: 10s
    then:
      - display.page.show_next: lcd
      - component.update: lcd

font:
  - file: "gfonts://Roboto@500"
    id: font_large
    size: 70
    glyphs: "0123456789:APM."
  - file: "gfonts://Roboto@500"
    id: font_medium
    size: 30

sensor:
# Extra sensor to keep track of plug uptime
  - platform: uptime
    name: Uptime Sensor
    filters:
      - lambda: return x / 3600;
    unit_of_measurement: "hours"
    accuracy_decimals: 2
# Extra sensor for WiFi signal
  - platform: wifi_signal
    name: WiFi Sensor
    update_interval: 60s

i2c:
  scl: GPIO18
  sda: GPIO8
  scan: true
  frequency: 400kHz

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
    id: settings
    name: "Settings"

# i2c device at address 0x18 - ES8311 Audio Codec
# i2c device at address 0x24 - TT21100 Touchscreen
# i2c device at address 0x40 - ES7210 Mic ADC
# i2c device at address 0x68 - ICM-42607-P IMU

Hope this can help someone :slight_smile:

3 Likes

For some reason the backlight is working in the opposite way on the Lite

light:
  - platform: monochromatic
    name: "LCD Backlight"
    output: lcd_backlight

If you use

restore_mode: ALWAYS_ON

the display will stay black. For me at least

With the team releasing code for this device with the new voice assistant updates, have you moved to that code at all? I was planning on installing it but their example doesn’t include anything for the screen so I was thinkin gof adding in your section of code to do that. I was hoping to expand on it however to have the voice assistant conversation displayed as it responds (this is what my ESPbox currently does while running Willow). Have you looked into this at all?

1 Like

I did, but right now, it seems that neither the display nor the bluetooth proxy is working with this code.
It seems that there are some conflicts with the current implementation and the idf framework they are using.

I hope, that this will be sorted out in the comming weeks… (?)

If you add inverted: true to the output: section, it’ll fix this.

Full example:

output:
  - platform: ledc
    pin: GPIO45
    id: lcd_backlight
    inverted: true

light:
  - platform: monochromatic
    output: lcd_backlight
    name: "LCD Backlight"
    restore_mode: ALWAYS_ON

I got this working with the HA provided example, but yeah, the screen is unused. If anyone has a config i could use for inspiration, that would be amazing

1 Like

I’m not sure, if there is a working configuration at all… it might be, that the implementation has some conflicts with the different components…

I guess, we have to wait a bit until - maybe, some code for the ESP32-S3 Box 3 will be available… ?
This could probably be used for the older Box also…

This is a modified version of the HA example with some display config I pulled from someone in this thread and modified. I’ve yet to try adding bluetooth proxy to it.

substitutions:
  device_name: "esp32-s3-box0"
  name: "ESP32 S3 Box 0"
  description: ESP32 S3 Box Voice Assistant

packages:
  <<: !include_dir_named common

esphome:
  platformio_options:
    board_build.flash_mode: dio
  project:
    name: esphome.voice-assistant
    version: "1.0"
  min_version: 2023.10.0
  on_boot:
    - priority: -100
      then:
        - wait_until: api.connected
        - delay: 1s
        - if:
            condition:
              switch.is_on: use_wake_word
            then:
              - voice_assistant.start_continuous:

esp32:
  board: esp32s3box
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: "y"
      CONFIG_ESP32S3_DATA_CACHE_64KB: "y"
      CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y"

logger:
  hardware_uart: USB_SERIAL_JTAG

dashboard_import:
  package_import_url: github://esphome/firmware/voice-assistant/esp32-s3-box.yaml@main

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO1
      inverted: true
    name: "Mute"

  - platform: gpio
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: true
    name: Top Left Button
    disabled_by_default: true
    on_click:
      - if:
          condition:
            switch.is_off: use_wake_word
          then:
            - if:
                condition: voice_assistant.is_running
                then:
                  - voice_assistant.stop:
                  - script.execute: reset_led
                else:
                  - voice_assistant.start:
          else:
            - voice_assistant.stop
            - delay: 1s
            - script.execute: reset_led
            - script.wait: reset_led
            - voice_assistant.start_continuous:

output:
 # - platform: ledc
 #   id: rgb_red
 #   pin: GPIO39
 # - platform: ledc
 #   id: rgb_green
 #   pin: GPIO40
 # - platform: ledc
 #   id: rgb_blue
 #   pin: GPIO41
  - platform: ledc
    pin: GPIO45
    id: backlight_output

light:
 # - platform: rgb
 #   name: RGB LED
 #   red: rgb_red
 #   green: rgb_green
 #   blue: rgb_blue
  - platform: monochromatic
    output: backlight_output
    name: LCD Backlight
    id: led
    restore_mode: ALWAYS_OFF
    disabled_by_default: true
    default_transition_length: 0s
    effects:
      - pulse:
          #transition_length: 250ms
          #update_interval: 250ms
          transition_length: 250ms
          update_interval: 750ms
          min_brightness: 10%
          max_brightness: 75%
      - pulse:
          name: Fast Pulse
          transition_length: 50ms
          update_interval: 50ms

esp_adf:

microphone:
  - platform: esp_adf
    id: box_mic

speaker:
  - platform: esp_adf
    id: box_speaker

voice_assistant:
  id: va
  microphone: box_mic
  speaker: box_speaker
  use_wake_word: true
  noise_suppression_level: 2
  auto_gain: 31dBFS
  volume_multiplier: 2.0
  vad_threshold: 3
  on_listening:
    - light.turn_on:
        id: led
        brightness: 100%
        effect: pulse
  on_tts_start:
    - light.turn_on:
        id: led
        brightness: 75%
        effect: pulse
  on_end:
    - delay: 100ms
    - wait_until:
        not:
          speaker.is_playing:
    - script.execute: reset_led
  on_error:
    - light.turn_on:
        id: led
        brightness: 50%
        effect: fast_pulse
    - delay: 1s
    - script.execute: reset_led
    - script.wait: reset_led
    - lambda: |-
        if (code == "wake-provider-missing" || code == "wake-engine-missing") {
          id(use_wake_word).turn_off();
        }

script:
  - id: reset_led
    then:
      - if:
          condition:
            switch.is_on: use_wake_word
          then:
            - light.turn_on:
                id: led
                #brightness: 25%
                brightness: 50%
                effect: none
          else:
            - light.turn_off: 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(va).set_use_wake_word(true);
      - if:
          condition:
            not:
              - voice_assistant.is_running
          then:
            - voice_assistant.start_continuous
      - script.execute: reset_led
    on_turn_off:
      - voice_assistant.stop
      - lambda: id(va).set_use_wake_word(false);
      - script.execute: reset_led

external_components:
  - source: github://pr#5230
    components: esp_adf
    refresh: 0s

psram:
  mode: octal
  speed: 80MHz

spi:
  clk_pin: GPIO7
  mosi_pin: GPIO6

color:
  - id: DARK_PURPLE
    hex: 582cb0
    #hex: 6432c8
  - id: LIGHT_PURPLE
    hex: a65dde

display:
  - platform: ili9xxx
    model: S3BOX
    cs_pin: GPIO5
    dc_pin: GPIO4
    reset_pin: GPIO48
    id: lcd
    lambda: |-
      //it.fill(Color(255, 255, 255));
      it.fill(Color(0, 0, 0));
      //it.strftime(160, 85, id(font_time), Color::BLACK, TextAlign::CENTER, "%I:%M:%S %p", id(time_ha).now());
      // time w/o seconds
      it.strftime(160, 85, id(font_time), Color::WHITE, TextAlign::CENTER, "%I:%M %p", id(time_ha).now());
      //it.strftime(160, 170, id(font_date), Color::BLACK, TextAlign::CENTER, "%Y-%m-%d", id(time_ha).now());
      it.strftime(160, 170, id(font_date), LIGHT_PURPLE, TextAlign::CENTER, "%Y-%m-%d", id(time_ha).now());

font:
  - file: "gfonts://Roboto"
    id: font_time
    size: 55
    #size: 60
    glyphs: "0123456789AMP:- "
  - file: "gfonts://Roboto"
    id: font_date
    size: 50
    glyphs: "0123456789.- "
  - file: "gfonts://Roboto"
    id: font_small
    size: 20

time:
  - platform: homeassistant
    id: time_ha
    #timezone: Europe/Berlin
1 Like

Thanks :slight_smile:
I will try it later today… I already tried to add the display - without BT Proxy at some point, but it didn’t work as expected… So maybe, there was just a config error somewhere… ?

I’ll update as soon as I have uploaded the config to the device and then I’ll come back with an info

Hi,
as far as I can tell, your config is working… but I am running into an compiling issue, after trying to merge your configuration with another one (to add the touchscreen component and a background image)…

Does anyone know, what I did wrong?

substitutions:
  device_name: "esp32-s3-box"
  friendly_name: ESP32 S3 Box
  description: ESP32 S3 Box Voice Assistant
  comment: "ESP32 S3 Box Küche mit Voice-Assistant"
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password
  wifi_update_interval: 3s

packages:
  <<: !include_dir_named common

esphome:
  name: ${device_name}
  friendly_name: ${friendly_name}
  comment: ${comment}

  platformio_options:
    board_build.flash_mode: dio
  project:
    name: esphome.voice-assistant
    version: "1.0"
  min_version: 2023.10.0
  on_boot:
    - priority: -100
      then:
        - wait_until: api.connected
        - delay: 1s
        - if:
            condition:
              switch.is_on: use_wake_word
            then:
              - voice_assistant.start_continuous:

esp32:
  board: esp32s3box
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: "y"
      CONFIG_ESP32S3_DATA_CACHE_64KB: "y"
      CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y"

logger:
  hardware_uart: USB_SERIAL_JTAG
  level: VERBOSE
  logs:
    esp32_ble: WARN
    esp32_ble_tracker: WARN
    ble_dist: WARN
    sensor: WARN
    ledc.output: WARN
    component: WARN
    ili9xxx: WARN
    tt21100: WARN
    touchscreen: WARN
    wifi: WARN
    es8311: WARN
    i2s_audio: VERBOSE
    voice_assistant: VERBOSE
    es7210: WARN

dashboard_import:
  package_import_url: github://esphome/firmware/voice-assistant/esp32-s3-box.yaml@main

ota:
  password: 
 
api:
  encryption:
    key: 
    
# Wifi-Settings
wifi:
  ssid: ${wifi_ssid}
  password: ${wifi_password}
  fast_connect: true
  
sensor:
  - platform: wifi_signal
    name: "WiFi Signal dB"
    id: wifi_signal_db
    update_interval: 60s
    entity_category: "diagnostic"

  - platform: internal_temperature
    name: "Internal Temperature"
    entity_category: "diagnostic"

  - platform: uptime
    name: Uptime
    id: uptime_sensor
    entity_category: "diagnostic"
    update_interval: $wifi_update_interval
    on_raw_value:
      then:
        - text_sensor.template.publish:
            id: uptime_human
            state: !lambda |-
              int seconds = round(id(uptime_sensor).raw_state);
              int days = seconds / (24 * 3600);
              seconds = seconds % (24 * 3600);
              int hours = seconds / 3600;
              seconds = seconds % 3600;
              int minutes = seconds /  60;
              seconds = seconds % 60;
              return (
                (days ? to_string(days) + "d " : "") +
                (hours ? to_string(hours) + "h " : "") +
                (minutes ? to_string(minutes) + "m " : "") +
                (to_string(seconds) + "s")
              ).c_str(); 

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO1
      inverted: true
    name: Muted

  - platform: tt21100
    name: Home-Button
    index: 0

  - platform: gpio
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: true
    name: Top Left Button
    disabled_by_default: true
    on_click:
      - if:
          condition:
            switch.is_off: use_wake_word
          then:
            - if:
                condition: voice_assistant.is_running
                then:
                  - voice_assistant.stop:
                  - script.execute: reset_led
                else:
                  - voice_assistant.start:
          else:
            - voice_assistant.stop
            - delay: 1s
            - script.execute: reset_led
            - script.wait: reset_led
            - voice_assistant.start_continuous:

text_sensor:
  - platform: wifi_info
    ip_address:
      update_interval: 60s
      name: IP Address
      entity_category: "diagnostic"
    ssid:
      update_interval: 60s
      name: Connected SSID
      entity_category: "diagnostic"
    bssid:
      update_interval: 60s
      name: Connected BSSID
      entity_category: "diagnostic"
    mac_address:
      name: Mac Wifi Address
      entity_category: "diagnostic"
    scan_results:
      update_interval: 60s
      name: Latest Scan Results
      entity_category: "diagnostic"
      
  # Device Uptime Information 
  - platform: template
    name: Uptime Human Readable
    id: uptime_human
    icon: mdi:clock-start

output:
  - platform: ledc
    pin: GPIO45
    id: backlight_output

light:
  - platform: monochromatic
    output: backlight_output
    name: LCD Backlight
    id: led
    restore_mode: ALWAYS_ON
    disabled_by_default: true
    default_transition_length: 0s
    effects:
      - pulse:
          transition_length: 250ms
          update_interval: 750ms
          min_brightness: 10%
          max_brightness: 75%
      - pulse:
          name: Fast Pulse
          transition_length: 50ms
          update_interval: 50ms

esp_adf:

microphone:
  - platform: esp_adf
    id: box_mic

speaker:
  - platform: esp_adf
    id: box_speaker

voice_assistant:
  id: va
  microphone: box_mic
  speaker: box_speaker
  use_wake_word: true
  noise_suppression_level: 2
  auto_gain: 31dBFS
  volume_multiplier: 2.0
  vad_threshold: 3
  on_listening:
    - light.turn_on:
        id: led
        brightness: 100%
        effect: pulse
  on_tts_start:
    - light.turn_on:
        id: led
        brightness: 75%
        effect: pulse
  on_end:
    - delay: 100ms
    - wait_until:
        not:
          speaker.is_playing:
    - script.execute: reset_led
  on_error:
    - light.turn_on:
        id: led
        brightness: 50%
        effect: fast_pulse
    - delay: 1s
    - script.execute: reset_led
    - script.wait: reset_led
    - lambda: |-
        if (code == "wake-provider-missing" || code == "wake-engine-missing") {
          id(use_wake_word).turn_off();
        }

script:
  - id: reset_led
    then:
      - if:
          condition:
            switch.is_on: use_wake_word
          then:
            - light.turn_on:
                id: led
                brightness: 50%
                effect: none
          else:
            - light.turn_off: led

switch:
  - platform: template
    name: ${device_name} Use wake-word
    id: use_wake_word
    optimistic: true
    restore_mode: RESTORE_DEFAULT_ON
    entity_category: config
    on_turn_on:
      - lambda: id(va).set_use_wake_word(true);
      - if:
          condition:
            not:
              - voice_assistant.is_running
          then:
            - voice_assistant.start_continuous
      - script.execute: reset_led
    on_turn_off:
      - voice_assistant.stop
      - lambda: id(va).set_use_wake_word(false);
      - script.execute: reset_led

external_components:
  - source: github://pr#5230
    components: esp_adf
    refresh: 0s

psram:
  mode: octal
  speed: 80MHz

spi:
  clk_pin: GPIO7
  mosi_pin: GPIO6

# some HW Components of the S3-Box
i2c:
  scl: GPIO18
  sda: GPIO8
  scan: true

touchscreen:
  platform: tt21100
  id: my_touchscreen
  interrupt_pin: GPIO3

display:
  - platform: ili9xxx
    model: S3BOX
    cs_pin: GPIO5
    dc_pin: GPIO4
    reset_pin: GPIO48
    id: lcd
    lambda: |-
      auto bg = Color(250, 250, 250);
      auto text = Color(250, 250, 250);
      auto border_color = Color(60, 60, 60);
      auto button_bg_on = Color(36, 180, 245);
      auto button_bg_off = Color(158, 158, 158);
      auto red = Color(255, 0, 0);
      auto green = Color(0, 255, 0);
      auto blue = Color(0, 0, 255);
      it.image(0,0, id(background_image), ImageAlign::TOP_LEFT);
      it.strftime(160, 65, id(font_large), text, TextAlign::CENTER, "%H:%M:%S", id(time_ha).now());
      it.strftime(160, 115, id(font_medium), text, TextAlign::CENTER, "%d.%m.%Y", id(time_ha).now());

# source: https://gist.github.com/BrettSheleski/5a33f6880c5ad4033ac2dc4cb5797ac1
font:
  - file: "gfonts://Roboto@500"
    id: font_large
    size: 70
    glyphs: "0123456789:APM."
  - file: "gfonts://Roboto@500"
    id: font_medium
    size: 30
  - file: "gfonts://Roboto@500"
    id: font_small
    size: 15

image:
  - file: "images/background_spots_lines_85563_320x240.jpg"
    id: background_image
    resize: 320x240
    type: rgba

time:
  - platform: homeassistant
    id: time_ha
    timezone: Europe/Berlin

It does load, the Display is working fine … I am getting the Background image, and also the Date / Time…
The Display also reacts to the “Home” Touch button…
The Mute-Button is working - and if I disable the “use wake-word” switch in HA, the display shuts down…

BUT: The device does not react to the wake-word… for some reason… ?!

Does anyone see the reason, or have I just forgot something while merging the configs together???

In HA the binary_sensor “Use Assist” seems to be off / deactivated…

ok, I got it and it is “Working”… somehow… :smiley:

Right now, without using the “home Button” / Touch…

But - the spoken feedback is really bad… probably, because the device wants to playback the feedback, updates the display … and so on.

Now, the question would be:
Is it possible to “overwrite” the Display when the wakeword was detected?
So - remove all information and maybe just display “listen”… instead of flashing the backlight and updating the display elements?

here’s the current yaml (again, without touch & home-button & Bluetooth)

substitutions:
  device_name: "esp32-s3-box"
  friendly_name: ESP32 S3 Box
  description: ESP32 S3 Box Voice Assistant
  comment: "ESP32 S3 Box Küche mit Voice-Assistant"
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password
  wifi_update_interval: 3s

packages:
  <<: !include_dir_named common

esphome:
  name: ${device_name}
  friendly_name: ${friendly_name}
  comment: ${comment}

  platformio_options:
    board_build.flash_mode: dio
  project:
    name: esphome.voice-assistant
    version: "1.0"
  min_version: 2023.10.0
  on_boot:
    - priority: -100
      then:
        - wait_until: api.connected
        - delay: 1s
        - if:
            condition:
              switch.is_on: use_wake_word
            then:
              - voice_assistant.start_continuous:
esp32:
  board: esp32s3box
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: "y"
      CONFIG_ESP32S3_DATA_CACHE_64KB: "y"
      CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y"

logger:
  hardware_uart: USB_SERIAL_JTAG

dashboard_import:
  package_import_url: github://esphome/firmware/voice-assistant/esp32-s3-box.yaml@main

ota:
  password:  
 
api:
  encryption:
    key: 

# Wifi-Settings
wifi:
  ssid: ${wifi_ssid}
  password: ${wifi_password}
  fast_connect: true
  
sensor:
  - platform: wifi_signal
    name: "WiFi Signal dB"
    id: wifi_signal_db
    update_interval: 60s
    entity_category: "diagnostic"

  - platform: internal_temperature
    name: "Internal Temperature"
    entity_category: "diagnostic"

  - platform: uptime
    name: Uptime
    id: uptime_sensor
    entity_category: "diagnostic"
    update_interval: $wifi_update_interval
    on_raw_value:
      then:
        - text_sensor.template.publish:
            id: uptime_human
            state: !lambda |-
              int seconds = round(id(uptime_sensor).raw_state);
              int days = seconds / (24 * 3600);
              seconds = seconds % (24 * 3600);
              int hours = seconds / 3600;
              seconds = seconds % 3600;
              int minutes = seconds /  60;
              seconds = seconds % 60;
              return (
                (days ? to_string(days) + "d " : "") +
                (hours ? to_string(hours) + "h " : "") +
                (minutes ? to_string(minutes) + "m " : "") +
                (to_string(seconds) + "s")
              ).c_str(); 

text_sensor:
  - platform: wifi_info
    ip_address:
      update_interval: 60s
      name: IP Address
      entity_category: "diagnostic"
    ssid:
      update_interval: 60s
      name: Connected SSID
      entity_category: "diagnostic"
    bssid:
      update_interval: 60s
      name: Connected BSSID
      entity_category: "diagnostic"
    mac_address:
      name: Mac Wifi Address
      entity_category: "diagnostic"
    scan_results:
      update_interval: 60s
      name: Latest Scan Results
      entity_category: "diagnostic"
      
  # Device Uptime Information 
  - platform: template
    name: Uptime Human Readable
    id: uptime_human
    icon: mdi:clock-start

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO1
      inverted: true
    name: Muted

  - platform: gpio
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: true
    name: Top Left Button
    disabled_by_default: true
    on_click:
      - if:
          condition:
            switch.is_off: use_wake_word
          then:
            - if:
                condition: voice_assistant.is_running
                then:
                  - voice_assistant.stop:
                  - script.execute: reset_led
                else:
                  - voice_assistant.start:
          else:
            - voice_assistant.stop
            - delay: 1s
            - script.execute: reset_led
            - script.wait: reset_led
            - voice_assistant.start_continuous:

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(va).set_use_wake_word(true);
      - if:
          condition:
            not:
              - voice_assistant.is_running
          then:
            - voice_assistant.start_continuous
      - script.execute: reset_led
    on_turn_off:
      - voice_assistant.stop
      - lambda: id(va).set_use_wake_word(false);
      - script.execute: reset_led

output:
  - platform: ledc
    pin: GPIO45
    id: backlight_output

light:
  - platform: monochromatic
    output: backlight_output
    name: LCD Backlight
    id: led
    restore_mode: ALWAYS_OFF
    disabled_by_default: true
    default_transition_length: 0s
    effects:
      - pulse:
          transition_length: 250ms
          update_interval: 250ms
      - pulse:
          name: Fast Pulse
          transition_length: 50ms
          update_interval: 50ms

esp_adf:

microphone:
  - platform: esp_adf
    id: box_mic

speaker:
  - platform: esp_adf
    id: box_speaker

voice_assistant:
  id: va
  microphone: box_mic
  speaker: box_speaker
  use_wake_word: true
  noise_suppression_level: 2
  auto_gain: 31dBFS
  volume_multiplier: 2.0
  vad_threshold: 3
  on_listening:
    - light.turn_on:
        id: led
        brightness: 100%
        effect: pulse
  on_tts_start:
    - light.turn_on:
        id: led
        brightness: 75%
        effect: pulse
  on_end:
    - delay: 100ms
    - wait_until:
        not:
          speaker.is_playing:
    - script.execute: reset_led
  on_error:
    - light.turn_on:
        id: led
        brightness: 50%
        effect: fast_pulse
    - delay: 1s
    - script.execute: reset_led
    - script.wait: reset_led
    - lambda: |-
        if (code == "wake-provider-missing" || code == "wake-engine-missing") {
          id(use_wake_word).turn_off();
        }

script:
  - id: reset_led
    then:
      - if:
          condition:
            switch.is_on: use_wake_word
          then:
            - light.turn_on:
                id: led
                brightness: 25%
                effect: none
          else:
            - light.turn_off: led

external_components:
  - source: github://pr#5230
    components: esp_adf
    refresh: 0s

psram:
  mode: octal
  speed: 80MHz

spi:
  clk_pin: GPIO7
  mosi_pin: GPIO6

display:
  - platform: ili9xxx
    model: S3BOX
    cs_pin: GPIO5
    dc_pin: GPIO4
    reset_pin: GPIO48
    id: lcd
    lambda: |-
      auto bg = Color(250, 250, 250);
      auto text = Color(250, 250, 250);
      auto border_color = Color(60, 60, 60);
      auto button_bg_on = Color(36, 180, 245);
      auto button_bg_off = Color(158, 158, 158);
      auto red = Color(255, 0, 0);
      auto green = Color(0, 255, 0);
      auto blue = Color(0, 0, 255);
      it.image(0,0, id(background_image), ImageAlign::TOP_LEFT);
      it.strftime(160, 65, id(font_large), text, TextAlign::CENTER, "%H:%M:%S", id(time_ha).now());
      it.strftime(160, 115, id(font_medium), text, TextAlign::CENTER, "%d.%m.%Y", id(time_ha).now());

# source: https://gist.github.com/BrettSheleski/5a33f6880c5ad4033ac2dc4cb5797ac1
font:
  - file: "gfonts://Roboto@500"
    id: font_large
    size: 70
    glyphs: "0123456789:APM."
  - file: "gfonts://Roboto@500"
    id: font_medium
    size: 30
  - file: "gfonts://Roboto@500"
    id: font_small
    size: 15

image:
  - file: "images/background_spots_lines_85563_320x240.jpg"
    id: background_image
    resize: 320x240
    type: rgba

time:
  - platform: homeassistant
    id: time_ha
    timezone: Europe/Berlin

Agreed that the spoken feedback (speaker) is pretty bad. Definitely is not passing the “significant other test”. So I’ve disabled mine for now.

voice_assistant:
  id: va
  microphone: box_mic
#  speaker: box_speaker
  use_wake_word: true
  noise_suppression_level: 2
  auto_gain: 31dBFS
  volume_multiplier: 2.0
  vad_threshold: 3
  on_listening:
    - light.turn_on:
        id: led
        brightness: 100%
        effect: pulse
  on_tts_start:
    - light.turn_on:
        id: led
        brightness: 75%
        effect: pulse
  on_end:
    - delay: 100ms
#    - wait_until:
#        not:
#          speaker.is_playing:
    - script.execute: reset_led
  on_error:
    - light.turn_on:
        id: led
        brightness: 50%
        effect: fast_pulse
    - delay: 1s
    - script.execute: reset_led
    - script.wait: reset_led
    - lambda: |-
        if (code == "wake-provider-missing" || code == "wake-engine-missing") {
          id(use_wake_word).turn_off();
        }

Commented out the portions under voice_assistant for and it no longer attempts the use the speaker, but it crashes (reboots) each time and only sometimes comes back to a state that is functional (without yet another reboot or install.

This is what shows up in the logs

[19:41:53][D][voice_assistant:372]: Desired state set to AWAITING_RESPONSE
[19:41:53][D][voice_assistant:497]: Speech recognised as: "Turn off lights."
[19:41:53][W][light:476]: 'Master Bedroom Echo' - No such effect 'fast_pulse'
[19:41:53][D][light:036]: 'Master Bedroom Echo' Setting:
[19:41:53][D][light:051]:   Brightness: 100%
[19:41:53][D][light:059]:   Red: 0%, Green: 0%, Blue: 100%
[19:41:53][D][voice_assistant:366]: State changed from STOP_MICROPHONE to STOPPING_MICROPHONE
[19:41:53][D][esp-idf:000]: I (16528) I2S: DMA queue destroyed

[19:41:53][D][voice_assistant:468]: Event Type: 5
[19:41:53][D][voice_assistant:599]: Unhandled event type: 5
[19:41:53][D][voice_assistant:366]: State changed from STOPPING_MICROPHONE to AWAITING_RESPONSE
[19:41:53][D][voice_assistant:468]: Event Type: 6
WARNING master-bedroom-echo-80bf68.device.local: Connection error occurred: [Errno 104] Connection reset by peer
INFO Processing unexpected disconnect from ESPHome API for master-bedroom-echo-80bf68.device.local
WARNING Disconnected from API
INFO Successfully connected to master-bedroom-echo-80bf68.device.local

The other thing that doesn’t pass the “significant other test” is the really bright green Power LED. First night I had it in the bedroom, a pillow was thrown on top of it. I have figured out how to set the LED brightness to basically off when the Home Assistant has the house in “Night” mode. But that green LED is really bright even with white electrical tape over it, the plastic casing leaks that light out.

yes, the LED is really annoying…

“I have figured out how to set the LED brightness to basically off when the Home Assistant has the house in “Night” mode.” → you mean the display brigthness?

I would prefer if the green LED could be switched on / off …
But if it is similar to the other ESP32, then I guess, the LED is directly powered by the USB Port and can’t be controlled with the GPIO’s…

So for now, I will probably switch off the VoiceAssistant functionallity again - and set it up as BT-Proxy… that’s more important to me atm, since I still have Alexa alternatives running (with some commands, HA can’t do yet)

Sad… I hope, that this will become better with the time :wink: