Espressif ESP32-S3-BOX-3

Notka prasowa o urządzeniu:

https://www.espressif.com/en/news/ESP32-S3-BOX-3

i praktyczne wykorzystanie z HA:

Pytanie czy ma ktoś z tym urządzeniem doświadczenie.
Kupiłem dziś do testów, podłączyłem zgodnie z tutorialami do HA i mam problemy.
Działa tylko przez chwilę, (tzn wybudza się na wake word) potem zapada w letarg i już nie reaguje.
Gubi też co jakiś czas połączenie z HA.
Dostęp do WIFI ma dobry. Nie wiem co z tym zrobić.

Wstawić konfigurację i logi (ze wskazaniem tego co widzisz/odbierasz organoleptycznie, a nie widać w logu) do posta, bez tego można co najwyżej zgadywać…

1 polubienie

Na przykład przy próbie połączenia przez dash ESP i próbie instalacji nowego Firmware mam takie logi

INFO ESPHome 2024.8.3
INFO Reading configuration /config/esphome/esp32-s3-box-3-2e8918.yaml...
ERROR Unexpected exception while reading configuration:
Traceback (most recent call last):
  File "/usr/local/bin/esphome", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/esphome/esphome/__main__.py", line 1014, in main
    return run_esphome(sys.argv)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/__main__.py", line 992, in run_esphome
    config = read_config(dict(args.substitution) if args.substitution else {})
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/config.py", line 1091, in read_config
    res = load_config(command_line_substitutions)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/config.py", line 945, in load_config
    return _load_config(command_line_substitutions)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/config.py", line 935, in _load_config
    return validate_config(config, command_line_substitutions)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/config.py", line 772, in validate_config
    config = do_packages_pass(config)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/components/packages/__init__.py", line 177, in do_packages_pass
    package_config = _process_base_package(package_config)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/components/packages/__init__.py", line 101, in _process_base_package
    repo_dir, revert = git.clone_or_update(
                       ^^^^^^^^^^^^^^^^^^^^
  File "/esphome/esphome/git.py", line 90, in clone_or_update
    age = datetime.now() - datetime.fromtimestamp(file_timestamp.stat().st_mtime)
                                                  ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/pathlib.py", line 1014, in stat
    return os.stat(self, follow_symlinks=follow_symlinks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/data/packages/dec89df9/.git/HEAD'

A gdzie YAML do kompletu?

O to chodziło?

substitutions:
  name: esp32-s3-box-3-2e8918
  friendly_name: ESP32 S3 Box 3 2e8918
packages:
  esphome.voice-assistant: github://esphome/wake-word-voice-assistants/esp32-s3-box-3/esp32-s3-box-3.yaml@main
esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}
api:
  encryption:
    key: cf3v7pdqY8yS7LH90sCKh8AJKYdr1pbhJuwCDdSoOqM=


wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
[D][esp32_ble:264]: Disabling BLE...
[D][esp-idf:000][BTU_TASK]: W (21225) BT_APPL: bta_dm_disable BTA_DISABLE_DELAY set to 200 ms

[W][component:237]: Component esp32_ble took a long time for an operation (210 ms).
[W][component:238]: Components should block for at most 30 ms.
[D][api:102]: Accepted 192.168.1.199
[W][component:170]: Component api cleared Warning flag
[D][api.connection:1375]: Home Assistant 2024.9.1 (192.168.1.199): Connected successfully
[W][component:237]: Component api took a long time for an operation (218 ms).
[W][component:238]: Components should block for at most 30 ms.
[W][component:237]: Component esphome.coroutine took a long time for an operation (214 ms).
[W][component:238]: Components should block for at most 30 ms.
[D][api.connection:197]: Home Assistant 2024.9.1 (192.168.1.199) requested disconnected
[W][component:157]: Component api set Warning flag: unspecified
[W][component:237]: Component api took a long time for an operation (213 ms).
[W][component:238]: Components should block for at most 30 ms.
[D][api:102]: Accepted 192.168.1.199
[W][component:170]: Component api cleared Warning flag
[D][api.connection:1375]: Home Assistant 2024.9.1 (192.168.1.199): Connected successfully
[W][component:237]: Component api took a long time for an operation (215 ms).
[W][component:238]: Components should block for at most 30 ms.
[D][ring_buffer:024]: Created ring buffer with size 2048
[D][micro_wake_word:399]: Resetting buffers and probabilities
[D][micro_wake_word:195]: State changed from IDLE to START_MICROPHONE
[W][component:237]: Component api took a long time for an operation (237 ms).
[W][component:238]: Components should block for at most 30 ms.
[D][micro_wake_word:107]: Starting Microphone
[D][micro_wake_word:195]: State changed from START_MICROPHONE to STARTING_MICROPHONE
[D][esp-idf:000][read_task]: I (58099) I2S: DMA Malloc info, datalen=blocksize=512, dma_buf_count=8

[D][esp-idf:000][read_task]: I (58107) I2S: I2S0, MCLK output by GPIO2

[D][esp-idf:000][read_task]: I (58113) AUDIO_PIPELINE: link el->rb, el:0x3d040878, tag:i2s, rb:0x3d040c8c

[D][esp-idf:000][read_task]: I (58115) AUDIO_PIPELINE: link el->rb, el:0x3d0409ec, tag:filter, rb:0x3d042ccc

[D][esp-idf:000][read_task]: I (58120) AUDIO_ELEMENT: [i2s-0x3d040878] Element task created

[D][esp-idf:000][read_task]: I (58122) AUDIO_THREAD: The filter task allocate stack on external memory

[D][esp-idf:000][read_task]: I (58125) AUDIO_ELEMENT: [filter-0x3d0409ec] Element task created

[D][esp-idf:000][read_task]: I (58127) AUDIO_ELEMENT: [raw-0x3d040b1c] Element task created



[D][esp-idf:000][i2s]: I (58133) AUDIO_ELEMENT: [i2s] AEL_MSG_CMD_RESUME,state:1

[D][esp-idf:000][filter]: I (58135) AUDIO_ELEMENT: [filter] AEL_MSG_CMD_RESUME,state:1

[D][esp-idf:000][filter]: I (58138) RSP_FILTER: sample rate of source data : 16000, channel of source data : 2, sample rate of destination data : 16000, channel of destination data : 1

[D][esp-idf:000][read_task]: I (58141) AUDIO_PIPELINE: Pipeline started

[D][esp_adf.microphone:273]: Microphone started
[D][micro_wake_word:195]: State changed from STARTING_MICROPHONE to DETECTING_WAKE_WORD
[I][safe_mode:041]: Boot seems successful; resetting boot loop counter
[D][esp32.preferences:114]: Saving 1 preferences to flash...
[D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[D][micro_wake_word:162]: The 'okay nabu' model sliding average probability is 0.973 and most recent probability is 1.000
[D][micro_wake_word:123]: Wake Word 'okay nabu' Detected
[D][micro_wake_word:195]: State changed from DETECTING_WAKE_WORD to STOP_MICROPHONE
[D][micro_wake_word:129]: Stopping Microphone
[D][esp_adf.microphone:234]: Stopping microphone
[D][micro_wake_word:195]: State changed from STOP_MICROPHONE to STOPPING_MICROPHONE
[D][esp-idf:000][filter]: W (134034) AUDIO_ELEMENT: IN-[filter] AEL_IO_ABORT

[D][esp-idf:000][read_task]: E (134037) AUDIO_ELEMENT: [filter] Element already stopped

[D][esp-idf:000][read_task]: W (134069) AUDIO_PIPELINE: There are no listener registered

[D][esp-idf:000][read_task]: I (134071) AUDIO_PIPELINE: audio_pipeline_unlinked

[D][esp-idf:000][read_task]: W (134071) AUDIO_ELEMENT: [i2s] Element has not create when AUDIO_ELEMENT_TERMINATE

[D][esp-idf:000][read_task]: I (134075) I2S: DMA queue destroyed

[D][esp-idf:000][read_task]: W (134077) AUDIO_ELEMENT: [filter] Element has not create when AUDIO_ELEMENT_TERMINATE

[D][esp-idf:000][read_task]: W (134079) AUDIO_ELEMENT: [raw] Element has not create when AUDIO_ELEMENT_TERMINATE

[D][esp_adf.microphone:285]: Microphone stopped
[D][micro_wake_word:195]: State changed from STOPPING_MICROPHONE to IDLE
[D][voice_assistant:504]: State changed from IDLE to START_MICROPHONE
[D][voice_assistant:510]: Desired state set to START_PIPELINE
[D][voice_assistant:221]: Starting Microphone
[D][ring_buffer:024]: Created ring buffer with size 16384
[D][voice_assistant:504]: State changed from START_MICROPHONE to STARTING_MICROPHONE
[D][esp-idf:000][read_task]: I (134104) I2S: DMA Malloc info, datalen=blocksize=512, dma_buf_count=8

[D][esp-idf:000][read_task]: I (134108) I2S: I2S0, MCLK output by GPIO2

[D][esp-idf:000][read_task]: I (134112) AUDIO_PIPELINE: link el->rb, el:0x3d03e5e0, tag:i2s, rb:0x3d03e9f4

[D][esp-idf:000][read_task]: I (134116) AUDIO_PIPELINE: link el->rb, el:0x3d03e754, tag:filter, rb:0x3d03ea30

[D][esp-idf:000][read_task]: I (134119) AUDIO_ELEMENT: [i2s-0x3d03e5e0] Element task created

[D][esp-idf:000][read_task]: I (134121) AUDIO_THREAD: The filter task allocate stack on external memory

[D][esp-idf:000][read_task]: I (134124) AUDIO_ELEMENT: [filter-0x3d03e754] Element task created

[D][esp-idf:000][read_task]: I (134126) AUDIO_ELEMENT: [raw-0x3d03e884] Element task created



[D][esp-idf:000][i2s]: I (134132) AUDIO_ELEMENT: [i2s] AEL_MSG_CMD_RESUME,state:1

[D][esp-idf:000][filter]: I (134134) AUDIO_ELEMENT: [filter] AEL_MSG_CMD_RESUME,state:1

[D][esp-idf:000][filter]: I (134137) RSP_FILTER: sample rate of source data : 16000, channel of source data : 2, sample rate of destination data : 16000, channel of destination data : 1

[D][esp-idf:000][read_task]: I (134140) AUDIO_PIPELINE: Pipeline started

[D][esp_adf.microphone:273]: Microphone started
[D][voice_assistant:504]: State changed from STARTING_MICROPHONE to START_PIPELINE
[D][voice_assistant:275]: Requesting start...
[D][voice_assistant:504]: State changed from START_PIPELINE to STARTING_PIPELINE
>

Tak, o to.

Bo skoro próbujesz coś kompilować i odnośniki w YAMLu są donikąd to warto wiedzieć czemu.

Teraz potrzeba kogoś, kto ma ten sprzęt i już wie gdzie leży problem bez szukania albo kogoś, kto ma mnóstwo wolnego czasu i przeanalizuje te kilometry

Sądzę, że wgrałeś nieaktualnego bina, bo projekt miał radykalne zmiany repozytoriów w zeszłym miesiącu, więc musisz wgrać najnowszą wersję softu (a nie jakąś muzealną - czytaj: starszą niż miesiąc, czy może wręcz tydzień) zanim zaczniesz to używać.

Z innej beczki - zacznij wstawiać kod poprawnie
https://forum.arturhome.pl/t/jak-prawidlowo-zamieszczac-yaml-inny-kod-lub-logi-w-postach-na-forum/11455/1

OK dzięki a gdzie znajdę aktualnego bina?

A skąd brałeś swojego? Ja widzę tylko zmiany na repo, a nie odtwarzam twoje drogi działania.

W takim razie zgłoś issue, że mają starego bina nie pasującego do YAMLa.
(no chyba, że pobierałeś go dawno temu a nie teraz, nie mam sprzętu więc nie mogę zweryfikować gdzie pies pogrzebany)

W wolnej chwili postaram się wrzucić tymczasowego YAMLa specjalnie dla Ciebie.

Jedno pytanie, bo szkoda mi roboty na darmo, twój sprzęt to S3box3 czy jakiś inny (S3box-lite lub S3box)?

Czasem nie ogarniam czemu główni deweloperzy robią taki pierdolnik, że sam nie potrafię znaleźć miejsca gdzie, się znajduje aktualna witryna tego projektu…

Póki co zakładam, że masz S3box3, a nie jakiś inny
wklej tego CAŁEGO YAMLa zamiast CAŁEGO swojego w projekcie w IDE i skompiluj - nie obiecuję, że zadziała, ale jakaś szansa jest

substitutions:
  name: esp32-s3-box-3-2e8918
  friendly_name: ESP32 S3 Box 3 2e8918
  loading_illustration_file: https://github.com/esphome/wake-word-voice-assistants/raw/main/casita/loading_320_240.png
  idle_illustration_file: https://github.com/esphome/wake-word-voice-assistants/raw/main/casita/idle_320_240.png
  listening_illustration_file: https://github.com/esphome/wake-word-voice-assistants/raw/main/casita/listening_320_240.png
  thinking_illustration_file: https://github.com/esphome/wake-word-voice-assistants/raw/main/casita/thinking_320_240.png
  replying_illustration_file: https://github.com/esphome/wake-word-voice-assistants/raw/main/casita/replying_320_240.png
  error_illustration_file: https://github.com/esphome/wake-word-voice-assistants/raw/main/casita/error_320_240.png
  timer_finished_illustration_file: https://github.com/esphome/wake-word-voice-assistants/raw/main/casita/timer_finished_320_240.png

  loading_illustration_background_color: "000000"
  idle_illustration_background_color: "000000"
  listening_illustration_background_color: "FFFFFF"
  thinking_illustration_background_color: "FFFFFF"
  replying_illustration_background_color: "FFFFFF"
  error_illustration_background_color: "000000"

  voice_assist_idle_phase_id: "1"
  voice_assist_listening_phase_id: "2"
  voice_assist_thinking_phase_id: "3"
  voice_assist_replying_phase_id: "4"
  voice_assist_not_ready_phase_id: "10"
  voice_assist_error_phase_id: "11"
  voice_assist_muted_phase_id: "12"
  voice_assist_timer_finished_phase_id: "20"

  # These unique characters have been extracted from every test file of every language available on https://github.com/home-assistant/intents (14 March 2024)
  allowed_characters: " !#%'()+,-./0123456789:;<>?@ABCDEFGHIJKLMNOPQRSTUVWYZ[]_abcdefghijklmnopqrstuvwxyz{|}°²³µ¿ÁÂÄÅÉÖÚßàáâãäåæçèéêëìíîðñòóôõöøùúûüýþāăąćčďĐđēėęěğĮįıļľŁłńňőřśšťũūůűųźŻżŽžơưșțΆΈΌΐΑΒΓΔΕΖΗΘΚΜΝΠΡΣΤΥΦάέήίαβγδεζηθικλμνξοπρςστυφχψωϊόύώАБВГДЕЖЗИКЛМНОПРСТУХЦЧШЪЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяёђєіїјљњћאבגדהוזחטיכלםמןנסעפץצקרשת،ءآأإئابةتجحخدذرزسشصضطظعغفقكلمنهوىيٹپچڈکگںھہیےংকচতধনফবযরলশষস়ািু্చయలిెొ్ംഅആഇഈഉഎഓകഗങചജഞടഡണതദധനപഫബഭമയരറലളവശസഹാിീുൂെേൈ്ൺൻർൽൾაბგდევზთილმნოპრსტუფქყშჩცძჭხạảấầẩậắặẹẽếềểệỉịọỏốồổỗộớờởợụủứừửữựỳ—、一上不个中为主乾了些亮人任低佔何作供依侧係個側偵充光入全关冇冷几切到制前動區卧厅厨及口另右吊后吗启吸呀咗哪唔問啟嗎嘅嘛器圍在场執場外多大始安定客室家密寵对將小少左已帘常幫幾库度庫廊廚廳开式後恆感態成我戲戶户房所扇手打执把拔换掉控插摄整斯新明是景暗更最會有未本模機檯櫃欄次正氏水沒没洗活派温測源溫漏潮激濕灯為無煙照熱燈燥物狀玄现現瓦用發的盞目着睡私空窗立笛管節簾籬紅線红罐置聚聲脚腦腳臥色节著行衣解設調請謝警设调走路車车运連遊運過道邊部都量鎖锁門閂閉開關门闭除隱離電震霧面音頂題顏颜風风食餅餵가간감갔강개거게겨결경고공과관그금급기길깥꺼껐꼽나난내네놀누는능니다닫담대더데도동됐되된됨둡드든등디때떤뜨라래러렇렌려로료른를리림링마많명몇모무문물뭐바밝방배변보부불블빨뽑사산상색서설성세센션소쇼수스습시신실싱아안않알았애야어얼업없었에여연열옆오온완외왼요운움워원위으은을음의이인일임입있작잠장재전절정제져조족종주줄중줘지직진짐쪽차창천최추출충치침커컴켜켰쿠크키탁탄태탬터텔통트튼티파팬퍼폰표퓨플핑한함해했행혀현화활후휴힘,?"

  micro_wake_word_model: okay_nabu

esphome:
  name: ${name}
  friendly_name: ${friendly_name}
  min_version: 2024.7.0
  name_add_mac_suffix: false
  platformio_options:
    board_build.flash_mode: dio
  on_boot:
    priority: 600
    then:
      - script.execute: draw_display
      - delay: 30s
      - if:
          condition:
            lambda: return id(init_in_progress);
          then:
            - lambda: id(init_in_progress) = false;
            - script.execute: draw_display

esp32:
  board: esp32s3box
  flash_size: 16MB
  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"
      CONFIG_AUDIO_BOARD_CUSTOM: "y"
      CONFIG_ESP32_S3_BOX_3_BOARD: "y"
    components:
      - name: esp32_s3_box_3_board
        source: github://jesserockz/esp32-s3-box-3-board@main
        refresh: 0s

psram:
  mode: octal
  speed: 80MHz

external_components:
  - source: github://pr#5230
    components: esp_adf
    refresh: 0s
  - source: github://jesserockz/esphome-components
    components: [file]
    refresh: 0s

api:
  encryption:
    key: cf3v7pdqY8yS7LH90sCKh8AJKYdr1pbhJuwCDdSoOqM=
  on_client_connected:
    - script.execute: draw_display
  on_client_disconnected:
    - script.execute: draw_display

ota:
  - platform: esphome
    id: ota_esphome

logger:
  hardware_uart: USB_SERIAL_JTAG

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
  on_connect:
    - script.execute: draw_display
  on_disconnect:
    - script.execute: draw_display

button:
  - platform: factory_reset
    id: factory_reset_btn
    internal: true

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: true
    id: top_left_button
    internal: true
    on_multi_click:
      - timing:
          - ON for at least 50ms
          - OFF for at least 50ms
        then:
          - switch.turn_off: timer_ringing
      - timing:
          - ON for at least 10s
        then:
          - button.press: factory_reset_btn

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

light:
  - platform: monochromatic
    id: led
    name: Screen
    icon: "mdi:television"
    entity_category: config
    output: backlight_output
    restore_mode: RESTORE_DEFAULT_ON
    default_transition_length: 250ms

esp_adf:
  board: esp32s3box3

microphone:
  - platform: esp_adf
    id: box_mic

speaker:
  - platform: esp_adf
    id: box_speaker

micro_wake_word:
  models:
    - ${micro_wake_word_model}
  on_wake_word_detected:
    - voice_assistant.start:
        wake_word: !lambda return wake_word;

voice_assistant:
  id: va
  microphone: box_mic
  speaker: box_speaker
  noise_suppression_level: 2
  auto_gain: 31dBFS
  volume_multiplier: 2.0
  vad_threshold: 3
  on_listening:
    - lambda: id(voice_assistant_phase) = ${voice_assist_listening_phase_id};
    - text_sensor.template.publish:
        id: text_request
        state: "..."
    - text_sensor.template.publish:
        id: text_response
        state: "..."
    - script.execute: draw_display
  on_stt_vad_end:
    - lambda: id(voice_assistant_phase) = ${voice_assist_thinking_phase_id};
    - script.execute: draw_display
  on_stt_end:
    - text_sensor.template.publish:
        id: text_request
        state: !lambda return x;
    - script.execute: draw_display
  on_tts_start:
    - text_sensor.template.publish:
        id: text_response
        state: !lambda return x;
  on_tts_stream_start:
    - lambda: id(voice_assistant_phase) = ${voice_assist_replying_phase_id};
    - script.execute: draw_display
  on_tts_stream_end:
    - if:
        condition:
          switch.is_off: mute
        then:
          - lambda: id(voice_assistant_phase) = ${voice_assist_idle_phase_id};
        else:
          - lambda: id(voice_assistant_phase) = ${voice_assist_muted_phase_id};
    - script.execute: draw_display
  on_end:
    - wait_until:
        not:
          voice_assistant.is_running:
    - if:
        condition:
          and:
            - switch.is_off: mute
            - lambda: return id(wake_word_engine_location).state == "On device";
            - lambda: return id(voice_assistant_phase) != ${voice_assist_timer_finished_phase_id};
        then:
          - micro_wake_word.start:
  on_error:
    - if:
        condition:
          lambda: return !id(init_in_progress);
        then:
          - lambda: id(voice_assistant_phase) = ${voice_assist_error_phase_id};
          - script.execute: draw_display
          - delay: 1s
          - if:
              condition:
                switch.is_off: mute
              then:
                - lambda: id(voice_assistant_phase) = ${voice_assist_idle_phase_id};
              else:
                - lambda: id(voice_assistant_phase) = ${voice_assist_muted_phase_id};
          - script.execute: draw_display
  on_client_connected:
    - lambda: id(init_in_progress) = false;
    - script.execute: start_voice_assistant
    - script.execute: draw_display
  on_client_disconnected:
    - script.execute: stop_voice_assistant
    - script.execute: draw_display
  on_timer_started:
    - script.execute: draw_display
  on_timer_cancelled:
    - script.execute: draw_display
  on_timer_updated:
    - script.execute: draw_display
  on_timer_tick:
    - script.execute: draw_display
  on_timer_finished:
    - script.execute: stop_voice_assistant
    - lambda: id(voice_assistant_phase) = ${voice_assist_timer_finished_phase_id};
    - switch.turn_on: timer_ringing
    - script.execute: draw_display
    - wait_until:
        not:
          microphone.is_capturing:
    - while:
        condition:
          switch.is_on: timer_ringing
        then:
          - lambda: id(box_speaker).play(id(timer_finished_wave_file), sizeof(id(timer_finished_wave_file)));
          - delay: 1s
    - wait_until:
        not:
          speaker.is_playing:
    - switch.turn_off: timer_ringing
    - script.execute: start_voice_assistant
    - script.execute: draw_display

script:
  - id: draw_display
    then:
      - if:
          condition:
            lambda: return !id(init_in_progress);
          then:
            - if:
                condition:
                  wifi.connected:
                then:
                  - if:
                      condition:
                        api.connected:
                      then:
                        - lambda: |
                            switch(id(voice_assistant_phase)) {
                              case ${voice_assist_listening_phase_id}:
                                id(s3_box_lcd).show_page(listening_page);
                                id(s3_box_lcd).update();
                                break;
                              case ${voice_assist_thinking_phase_id}:
                                id(s3_box_lcd).show_page(thinking_page);
                                id(s3_box_lcd).update();
                                break;
                              case ${voice_assist_replying_phase_id}:
                                id(s3_box_lcd).show_page(replying_page);
                                id(s3_box_lcd).update();
                                break;
                              case ${voice_assist_error_phase_id}:
                                id(s3_box_lcd).show_page(error_page);
                                id(s3_box_lcd).update();
                                break;
                              case ${voice_assist_muted_phase_id}:
                                id(s3_box_lcd).show_page(muted_page);
                                id(s3_box_lcd).update();
                                break;
                              case ${voice_assist_not_ready_phase_id}:
                                id(s3_box_lcd).show_page(no_ha_page);
                                id(s3_box_lcd).update();
                                break;
                              case ${voice_assist_timer_finished_phase_id}:
                                id(s3_box_lcd).show_page(timer_finished_page);
                                id(s3_box_lcd).update();
                                break;
                              default:
                                id(s3_box_lcd).show_page(idle_page);
                                id(s3_box_lcd).update();
                            }
                      else:
                        - display.page.show: no_ha_page
                        - component.update: s3_box_lcd
                else:
                  - display.page.show: no_wifi_page
                  - component.update: s3_box_lcd
          else:
            - display.page.show: initializing_page
            - component.update: s3_box_lcd

  - id: fetch_first_active_timer
    then:
      - lambda: |
          const auto timers = id(va).get_timers();
          auto output_timer = timers.begin()->second;
          for (auto &iterable_timer : timers) {
            if (iterable_timer.second.is_active && iterable_timer.second.seconds_left <= output_timer.seconds_left) {
              output_timer = iterable_timer.second;
            }
          }
          id(global_first_active_timer) = output_timer;
  - id: check_if_timers_active
    then:
      - lambda: |
          const auto timers = id(va).get_timers();
          bool output = false;
          if (timers.size() > 0) {
            for (auto &iterable_timer : timers) {
              if(iterable_timer.second.is_active) {
                output = true;
              }
            }
          }
          id(global_is_timer_active) = output;
  - id: fetch_first_timer
    then:
      - lambda: |
          const auto timers = id(va).get_timers();
          auto output_timer = timers.begin()->second;
          for (auto &iterable_timer : timers) {
            if (iterable_timer.second.seconds_left <= output_timer.seconds_left) {
              output_timer = iterable_timer.second;
            }
          }
          id(global_first_timer) = output_timer;
  - id: check_if_timers
    then:
      - lambda: |
          const auto timers = id(va).get_timers();
          bool output = false;
          if (timers.size() > 0) {
            output = true;
          }
          id(global_is_timer) = output;

  - id: draw_timer_timeline
    then:
      - lambda: |
          id(check_if_timers_active).execute();
          id(check_if_timers).execute();
          if (id(global_is_timer_active)){
            id(fetch_first_active_timer).execute();
            int active_pixels = round( 320 * id(global_first_active_timer).seconds_left / max(id(global_first_active_timer).total_seconds , static_cast<uint32_t>(1)) );
            if (active_pixels > 0){
              id(s3_box_lcd).filled_rectangle(0 , 225 , 320 , 15 , Color::WHITE );
              id(s3_box_lcd).filled_rectangle(0 , 226 , active_pixels , 13 , id(active_timer_color) );
            }
          } else if (id(global_is_timer)){
            id(fetch_first_timer).execute();
            int active_pixels = round( 320 * id(global_first_timer).seconds_left / max(id(global_first_timer).total_seconds , static_cast<uint32_t>(1)));
            if (active_pixels > 0){
              id(s3_box_lcd).filled_rectangle(0 , 225 , 320 , 15 , Color::WHITE );
              id(s3_box_lcd).filled_rectangle(0 , 226 , active_pixels , 13 , id(paused_timer_color) );
            }
          }
  - id: draw_active_timer_widget
    then:
      - lambda: |
          id(check_if_timers_active).execute();
          if (id(global_is_timer_active)){
            id(s3_box_lcd).filled_rectangle(80 , 40 , 160 , 50 , Color::WHITE );
            id(s3_box_lcd).rectangle(80 , 40 , 160 , 50 , Color::BLACK );

            id(fetch_first_active_timer).execute();
            int hours_left = floor(id(global_first_active_timer).seconds_left / 3600);
            int minutes_left = floor((id(global_first_active_timer).seconds_left - hours_left * 3600) / 60);
            int seconds_left = id(global_first_active_timer).seconds_left - hours_left * 3600 - minutes_left * 60 ;
            auto display_hours = (hours_left < 10 ? "0" : "") + std::to_string(hours_left);
            auto display_minute = (minutes_left < 10 ? "0" : "") + std::to_string(minutes_left);
            auto display_seconds = (seconds_left  < 10 ? "0" : "") + std::to_string(seconds_left) ;

            std::string display_string = "";
            if (hours_left > 0) {
              display_string = display_hours + ":" + display_minute;
            } else {
              display_string = display_minute + ":" + display_seconds;
            }
            id(s3_box_lcd).printf(120, 47, id(font_timer), Color::BLACK, "%s", display_string.c_str());
          }

  - id: start_voice_assistant
    then:
      - if:
          condition:
            switch.is_off: mute
          then:
            - if:
                condition:
                  lambda: return id(wake_word_engine_location).state == "In Home Assistant";
                then:
                  - lambda: id(va).set_use_wake_word(true);
                  - voice_assistant.start_continuous:
            - if:
                condition:
                  lambda: return id(wake_word_engine_location).state == "On device";
                then:
                  - lambda: id(va).set_use_wake_word(false);
                  - micro_wake_word.start
            - lambda: id(voice_assistant_phase) = ${voice_assist_idle_phase_id};
          else:
            - lambda: id(voice_assistant_phase) = ${voice_assist_muted_phase_id};

  - id: stop_voice_assistant
    then:
      - if:
          condition:
            lambda: return id(wake_word_engine_location).state == "In Home Assistant";
          then:
            - lambda: id(va).set_use_wake_word(false);
            - voice_assistant.stop:
      - if:
          condition:
            lambda: return id(wake_word_engine_location).state == "On device";
          then:
            - voice_assistant.stop:
            - micro_wake_word.stop:
      - lambda: id(voice_assistant_phase) = ${voice_assist_not_ready_phase_id};

switch:
  - platform: template
    name: Mute
    id: mute
    icon: "mdi:microphone-off"
    optimistic: true
    restore_mode: RESTORE_DEFAULT_OFF
    entity_category: config
    on_turn_off:
      - if:
          condition:
            lambda: return !id(init_in_progress);
          then:
            - lambda: id(voice_assistant_phase) = ${voice_assist_idle_phase_id};
            - if:
                condition:
                  not:
                    - voice_assistant.is_running
                then:
                  - if:
                      condition:
                        lambda: return id(wake_word_engine_location).state == "In Home Assistant";
                      then:
                        - lambda: id(va).set_use_wake_word(true);
                        - voice_assistant.start_continuous
                  - if:
                      condition:
                        lambda: return id(wake_word_engine_location).state == "On device";
                      then:
                        - lambda: id(va).set_use_wake_word(false);
                        - micro_wake_word.start
            - script.execute: draw_display
    on_turn_on:
      - if:
          condition:
            lambda: return !id(init_in_progress);
          then:
            - lambda: id(va).set_use_wake_word(false);
            - voice_assistant.stop
            - micro_wake_word.stop
            - lambda: id(voice_assistant_phase) = ${voice_assist_muted_phase_id};
            - script.execute: draw_display

  - platform: template
    id: timer_ringing
    optimistic: true
    internal: true
    restore_mode: ALWAYS_OFF
    on_turn_on:
      - delay: 15min
      - switch.turn_off: timer_ringing

select:
  - platform: template
    entity_category: config
    name: Wake word engine location
    id: wake_word_engine_location
    icon: "mdi:account-voice"
    optimistic: true
    restore_value: true
    options:
      - In Home Assistant
      - On device
    initial_option: On device
    on_value:
      - if:
          condition:
            lambda: return !id(init_in_progress);
          then:
            - wait_until:
                lambda: return id(voice_assistant_phase) == ${voice_assist_muted_phase_id} || id(voice_assistant_phase) == ${voice_assist_idle_phase_id};
            - if:
                condition:
                  lambda: return x == "In Home Assistant";
                then:
                  - micro_wake_word.stop
                  - delay: 500ms
                  - if:
                      condition:
                        switch.is_off: mute
                      then:
                        - lambda: id(va).set_use_wake_word(true);
                        - voice_assistant.start_continuous:
            - if:
                condition:
                  lambda: return x == "On device";
                then:
                  - lambda: id(va).set_use_wake_word(false);
                  - voice_assistant.stop
                  - delay: 500ms
                  - if:
                      condition:
                        switch.is_off: mute
                      then:
                        - micro_wake_word.start

globals:
  - id: init_in_progress
    type: bool
    restore_value: false
    initial_value: "true"
  - id: voice_assistant_phase
    type: int
    restore_value: false
    initial_value: ${voice_assist_not_ready_phase_id}
  - id: global_first_active_timer
    type: voice_assistant::Timer
    restore_value: false
  - id: global_is_timer_active
    type: bool
    restore_value: false
  - id: global_first_timer
    type: voice_assistant::Timer
    restore_value: false
  - id: global_is_timer
    type: bool
    restore_value: false

image:
  - file: ${error_illustration_file}
    id: casita_error
    resize: 320x240
    type: RGB24
    use_transparency: true
  - file: ${idle_illustration_file}
    id: casita_idle
    resize: 320x240
    type: RGB24
    use_transparency: true
  - file: ${listening_illustration_file}
    id: casita_listening
    resize: 320x240
    type: RGB24
    use_transparency: true
  - file: ${thinking_illustration_file}
    id: casita_thinking
    resize: 320x240
    type: RGB24
    use_transparency: true
  - file: ${replying_illustration_file}
    id: casita_replying
    resize: 320x240
    type: RGB24
    use_transparency: true
  - file: ${timer_finished_illustration_file}
    id: casita_timer_finished
    resize: 320x240
    type: RGB24
    use_transparency: true
  - file: ${loading_illustration_file}
    id: casita_initializing
    resize: 320x240
    type: RGB24
    use_transparency: true
  - file: https://github.com/esphome/wake-word-voice-assistants/raw/main/error_box_illustrations/error-no-wifi.png
    id: error_no_wifi
    resize: 320x240
    type: RGB24
    use_transparency: true
  - file: https://github.com/esphome/wake-word-voice-assistants/raw/main/error_box_illustrations/error-no-ha.png
    id: error_no_ha
    resize: 320x240
    type: RGB24
    use_transparency: true

font:
  - file:
      type: gfonts
      family: Figtree
      weight: 300
      italic: true
    glyphs: ${allowed_characters}
    id: font_request
    size: 15
  - file:
      type: gfonts
      family: Figtree
      weight: 300
    glyphs: ${allowed_characters}
    id: font_response
    size: 15
  - file:
      type: gfonts
      family: Figtree
      weight: 300
    glyphs: ${allowed_characters}
    id: font_timer
    size: 30

text_sensor:
  - id: text_request
    platform: template
    on_value:
      lambda: |-
        if(id(text_request).state.length()>32) {
          std::string name = id(text_request).state.c_str();
          std::string truncated = esphome::str_truncate(name.c_str(),31);
          id(text_request).state = (truncated+"...").c_str();
        }

  - id: text_response
    platform: template
    on_value:
      lambda: |-
        if(id(text_response).state.length()>32) {
          std::string name = id(text_response).state.c_str();
          std::string truncated = esphome::str_truncate(name.c_str(),31);
          id(text_response).state = (truncated+"...").c_str();
        }

color:
  - id: idle_color
    hex: ${idle_illustration_background_color}
  - id: listening_color
    hex: ${listening_illustration_background_color}
  - id: thinking_color
    hex: ${thinking_illustration_background_color}
  - id: replying_color
    hex: ${replying_illustration_background_color}
  - id: loading_color
    hex: ${loading_illustration_background_color}
  - id: error_color
    hex: ${error_illustration_background_color}
  - id: active_timer_color
    hex: "26ed3a"
  - id: paused_timer_color
    hex: "3b89e3"

file:
  - id: timer_finished_wave_file
    file: https://github.com/esphome/wake-word-voice-assistants/raw/main/sounds/timer_finished.wav

spi:
  - id: spi_bus
    clk_pin: 7
    mosi_pin: 6

display:
  - platform: ili9xxx
    id: s3_box_lcd
    model: S3BOX
    data_rate: 40MHz
    cs_pin: 5
    dc_pin: 4
    reset_pin:
      number: 48
      inverted: true
    update_interval: never
    pages:
      - id: idle_page
        lambda: |-
          it.fill(id(idle_color));
          it.image((it.get_width() / 2), (it.get_height() / 2), id(casita_idle), ImageAlign::CENTER);
          id(draw_timer_timeline).execute();
          id(draw_active_timer_widget).execute();
      - id: listening_page
        lambda: |-
          it.fill(id(listening_color));
          it.image((it.get_width() / 2), (it.get_height() / 2), id(casita_listening), ImageAlign::CENTER);
          id(draw_timer_timeline).execute();
      - id: thinking_page
        lambda: |-
          it.fill(id(thinking_color));
          it.image((it.get_width() / 2), (it.get_height() / 2), id(casita_thinking), ImageAlign::CENTER);
          it.filled_rectangle(20 , 20 , 280 , 30 , Color::WHITE );
          it.rectangle(20 , 20 , 280 , 30 , Color::BLACK );
          it.printf(30, 25, id(font_request), Color::BLACK, "%s", id(text_request).state.c_str());

          id(draw_timer_timeline).execute();
      - id: replying_page
        lambda: |-
          it.fill(id(replying_color));
          it.image((it.get_width() / 2), (it.get_height() / 2), id(casita_replying), ImageAlign::CENTER);
          it.filled_rectangle(20 , 20 , 280 , 30 , Color::WHITE );
          it.rectangle(20 , 20 , 280 , 30 , Color::BLACK );
          it.filled_rectangle(20 , 190 , 280 , 30 , Color::WHITE );
          it.rectangle(20 , 190 , 280 , 30 , Color::BLACK );
          it.printf(30, 25, id(font_request), Color::BLACK, "%s", id(text_request).state.c_str());
          it.printf(30, 195, id(font_response), Color::BLACK, "%s", id(text_response).state.c_str());
          id(draw_timer_timeline).execute();
      - id: timer_finished_page
        lambda: |-
          it.fill(id(idle_color));
          it.image((it.get_width() / 2), (it.get_height() / 2), id(casita_timer_finished), ImageAlign::CENTER);
      - id: error_page
        lambda: |-
          it.fill(id(error_color));
          it.image((it.get_width() / 2), (it.get_height() / 2), id(casita_error), ImageAlign::CENTER);
      - id: no_ha_page
        lambda: |-
          it.image((it.get_width() / 2), (it.get_height() / 2), id(error_no_ha), ImageAlign::CENTER);
      - id: no_wifi_page
        lambda: |-
          it.image((it.get_width() / 2), (it.get_height() / 2), id(error_no_wifi), ImageAlign::CENTER);
      - id: initializing_page
        lambda: |-
          it.fill(id(loading_color));
          it.image((it.get_width() / 2), (it.get_height() / 2), id(casita_initializing), ImageAlign::CENTER);
      - id: muted_page
        lambda: |-
          it.fill(Color::BLACK);
          id(draw_timer_timeline).execute();
          id(draw_active_timer_widget).execute();

Chwilę działa świetnie. Potem się zawiesza.

[16:47:16][D][esp_adf.microphone:273]: Microphone started
[16:47:16][D][micro_wake_word:195]: State changed from STARTING_MICROPHONE to DETECTING_WAKE_WORD
[16:47:54][D][micro_wake_word:162]: The 'okay nabu' model sliding average probability is 0.994 and most recent probability is 1.000
[16:47:54][D][micro_wake_word:123]: Wake Word 'okay nabu' Detected
[16:47:54][D][micro_wake_word:195]: State changed from DETECTING_WAKE_WORD to STOP_MICROPHONE
[16:47:54][D][micro_wake_word:129]: Stopping Microphone
[16:47:54][D][esp_adf.microphone:234]: Stopping microphone
[16:47:54][D][micro_wake_word:195]: State changed from STOP_MICROPHONE to STOPPING_MICROPHONE
[16:47:54][D][esp-idf:000][filter]: W (210935) AUDIO_ELEMENT: IN-[filter] AEL_IO_ABORT

[16:47:54][D][esp-idf:000][read_task]: E (210938) AUDIO_ELEMENT: [filter] Element already stopped

[16:47:54][D][esp-idf:000][read_task]: W (210969) AUDIO_PIPELINE: There are no listener registered

[16:47:54][D][esp-idf:000][read_task]: I (210973) AUDIO_PIPELINE: audio_pipeline_unlinked

[16:47:54][D][esp-idf:000][read_task]: W (210977) AUDIO_ELEMENT: [i2s] Element has not create when AUDIO_ELEMENT_TERMINATE

[16:47:54][D][esp-idf:000][read_task]: I (210981) I2S: DMA queue destroyed

[16:47:54][D][esp-idf:000][read_task]: W (210985) AUDIO_ELEMENT: [filter] Element has not create when AUDIO_ELEMENT_TERMINATE

[16:47:54][D][esp-idf:000][read_task]: W (210989) AUDIO_ELEMENT: [raw] Element has not create when AUDIO_ELEMENT_TERMINATE

[16:47:54][D][esp_adf.microphone:285]: Microphone stopped
[16:47:54][D][micro_wake_word:195]: State changed from STOPPING_MICROPHONE to IDLE
  1. Z tego loga nie wynika, że się zawiesza, więc co jest dalej? może powinieneś podpiąć się po USB do komputera i pokazać logi zbierane po porcie szeregowym.
  2. Czy możesz formatować tekst jak proszę? Musisz to ogarniać, bo zgłoszenie issue jest zapewne przed Tobą…
  3. Mówisz o tym skompilowanym z tego tymczasowego YAMLa (on bazuje na niewydanym kodzie) czy o oryginalnym binie?
  4. Gdzie są odpowiedzi na pytania z wcześniejszych postów?
  5. Wyświetla chociaż taki obrazek?
  6. Jak bardzo “zjadłeś zęby” na projektach w ESPHome, bo to jest tak zaawansowany projekt, że nie czuję się na silach ciągnąć za rękę.

To jest moje pierwsze ESPHome. Jestem zielony jak ogórek gruntowy.
Zainstalowałem Twojego YAMLa.
Mam ESP32-S3-BOX-3.
Nie mam jakiejś spiny z tym urządzeniem, jak nie ogarnę to trafi na półkę.
Zasugerowałem się po prostu filmikami Home Assistance’owych celebrytów na YT.

No to muszę powiedzieć, że na start wybrałeś sobie projekt o takiej skali trudności, że dla początkującego to jak wyprawa z siekierką z Słońce.
Tzn. jeśli cokolwiek nie działa, bo sam pomysł “gotowców” na wybrany sprzęt jest ekstra, tylko to ma zerowy walor edukacyjny, więc jeśli cokolwiek idzie źle, to szanse na samodzielne rozwiązanie problemów niemal zerowe.

W przypadku tego projektu oficjalnego (jeśli dziś nie działa, to z pewnością zostanie naprawiony w ciągu pewnie kilku dni-miesięcy-lat, tylko ktoś musi zgłosić issue, a skoro biorą się za to nowicjusze, to nie ma kto tego zrobić) - akurat problem z przebudową repozytoriów dotyczy wszystkich gotowych projektów (bo nie jesteś pierwszy z podobnym problemem dotyczącym prekomilowanego firmware), ale skoro tym się zajmuje zawodowy programista, to niech spokojnie dokończy to co zaczął.

W ogóle na bazie tego projektu oficjalnego istnieją też jakieś odmiany przygotowywane przez użytkowników - możesz spróbować, tylko czytaj dokumentację

edit - tak z innej beczki pytałem o to jaki masz sprzęt i nie doczekałem się odpowiedzi (bo są 4 wersje dla których są 3 różne firmware pod tym mniej oficjalnym linkiem tak samo jak i pod oficjalnym )

Cześć, wyżej pisałem Mam ESP32-S3-BOX-3.
ESP32-S3-BOX-3 i ESP32-S3-BOX-3(B) to jest dokładnie to samo urządzenie, różnica jest w zawartości zestawu który kupujesz. (B) jest wersją bez dodatkowych podstawek z czujnikiem, przejściówek itp.

Swoją drogą nie wiem czy to nie jest przypadkiem to:

WARNING esp32-s3-box-3-2e8918 @ 192.168.1.58: Connection error occurred: esp32-s3-box-3-2e8918 @ 192.168.1.58: The connection dropped immediately after encrypted hello; Try enabling encryption on the device or turning off encryption on the client (ESPHome Logs 2024.8.3).

Tak, to wygląda prawdopodobnie.

dlatego te 2 wersje mają dokładnie to samo firmware, ale pozostałe 2 wersje są inne i mają inne firmware (a użycie firmware dla innej wersji to częsty błąd i w dodatku strona na oficjalnym blogu - ta z obrazka powyżej domyślnie proponuje soft dla sbox, a nie sbox3) dlatego tak podkreślałem kwestię wersji sprzętu.

Takie coś jeszcze namierzyłem w logach HA.

Rejestrator: aioesphomeapi.connection
Źródło: runner.py:189
Pierwsze zdarzenie: 07:25:44 (69 zdarzenia)
Ostatnio zalogowany: 12:00:49

192.168.1.58: Connection error occurred: 192.168.1.58: Connection requires encryption
esp32-s3-box-3-2e8918 @ 192.168.1.58: Connection error occurred: esp32-s3-box-3-2e8918 @ 192.168.1.58: EOF received
esp32-s3-box-3-2e8918 @ 192.168.1.58: Connection error occurred: Ping response not received after 90.0 seconds
esp32-s3-box-3-2e8918 @ 192.168.1.58: Connection error occurred: [Errno 104] Connection reset by peer
esp32-s3-box-3-2e8918 @ 192.168.1.58: Connection error occurred: esp32-s3-box-3-2e8918 @ 192.168.1.58: Connection lost

Sprawdź czy w YAML masz te same klucze szyfrowania co w integracji (najprościej chyba usunąć i dodać integrację).