firmware icon indicating copy to clipboard operation
firmware copied to clipboard

Does not compile

Open toogooda opened this issue 2 years ago • 1 comments

Cannot get your yaml to compile ...

My Configuration from your file just changing normal items like wifi, api etc:

substitutions:
  name: "m5stack-atom-echo"
  friendly_name: "M5Stack Atom Echo"

esphome:
  name: "${name}"
  friendly_name: "${friendly_name}"
  name_add_mac_suffix: true
  project:
    name: m5stack.atom-echo-voice-assistant
    version: "1.0"
  min_version: 2023.7.0

esp32:
  board: m5stack-atom
  framework:
    type: esp-idf

logger:
api:
  encryption:
    key: "URNqhlW2GC1/9wY4BEUg027chf8tP8RxKlms3hoTk+I="
ota:
  password: "6dfcccce48d92a6f48e96eceee9ce2af"

dashboard_import:
  package_import_url: github://esphome/firmware/voice-assistant/m5stack-atom-echo.yaml@main

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Atomspeaker Fallback Hotspot"
    password: "Z4kkzLLXj7oe"

captive_portal:

improv_serial:

i2s_audio:
  i2s_lrclk_pin: GPIO33
  i2s_bclk_pin: GPIO19

microphone:
  - platform: i2s_audio
    id: echo_microphone
    i2s_din_pin: GPIO23
    adc_type: external
    pdm: true

speaker:
  - platform: i2s_audio
    id: echo_speaker
    i2s_dout_pin: GPIO22
    dac_type: external
    mode: mono

voice_assistant:
  microphone: echo_microphone
  speaker: echo_speaker
  silence_detection: true
  on_listening:
    - light.turn_on:
        id: led
        blue: 100%
        red: 0%
        green: 0%
        brightness: 50%
  on_start:
    - light.turn_on:
        id: led
        blue: 100%
        red: 0%
        green: 0%
        brightness: 100%
        effect: pulse
  on_tts_start:
    - light.turn_on:
        id: led
        blue: 0%
        red: 0%
        green: 100%
        brightness: 100%
        effect: none
  on_tts_end:
    - light.turn_on:
        id: led
        blue: 0%
        red: 0%
        green: 100%
        brightness: 100%
        effect: pulse
  on_end:
    - delay: 100ms
    - wait_until:
        not:
          speaker.is_playing:
    - light.turn_off: led
  on_error:
    - light.turn_on:
        id: led
        blue: 0%
        red: 100%
        green: 0%
        brightness: 100%
        effect: none
    - delay: 1s
    - light.turn_off: led


binary_sensor:
  - platform: gpio
    pin:
      number: GPIO39
      inverted: true
    name: Button
    disabled_by_default: true
    entity_category: diagnostic
    id: echo_button
    on_click:
      - if:
          condition: voice_assistant.is_running
          then:
            - light.turn_off: led
            - voice_assistant.stop:
          else:
            - light.turn_on:
                id: led
                blue: 100%
                red: 0%
                green: 0%
                brightness: 50%
                effect: none
            - voice_assistant.start:

light:
  - platform: esp32_rmt_led_strip
    id: led
    name: None
    disabled_by_default: true
    entity_category: config
    pin: GPIO27
    default_transition_length: 0s
    chipset: SK6812
    num_leds: 1
    rgb_order: grb
    rmt_channel: 0
    effects:
      - pulse:
          transition_length: 250ms
          update_interval: 250ms

image

Log file: [logs_atomspeaker_run.txt] (https://github.com/esphome/firmware/files/12385115/logs_atomspeaker_run.txt)

toogooda avatar Aug 19 '23 05:08 toogooda

Something seems really broken with that source code it was compiling with. There are extra characters that should not be there. Try a clean build and if that does not work, try uninstall and reinstall the add-on.

jesserockz avatar Sep 21 '23 23:09 jesserockz