Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- esphome:
- name: voiceassistant
- name_add_mac_suffix: true
- project:
- name: m5stack.atom-echo-voice-assistant
- version: "1.0"
- min_version: 2023.5.0
- esp32:
- board: m5stack-atom
- framework:
- type: esp-idf
- dashboard_import:
- package_import_url: github://esphome/firmware/voice-assistant/m5stack-atom-echo.yaml@main
- ota:
- password: !secret ota_password
- wifi:
- ssid: !secret wifi_ssid
- password: !secret wifi_password
- manual_ip:
- static_ip: 10.0.2.154 # Your IP address for this device
- gateway: 10.0.2.1 # Your gateway IP Address, this is normally the IP of your router
- subnet: 255.255.255.0 # Your subnet, this you can find in your router
- api:
- encryption:
- key: !secret api_encryptionkey
- logger:
- 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
- on_start:
- - light.turn_on:
- id: led
- blue: 100%
- red: 0%
- green: 0%
- effect: none
- on_tts_start:
- - light.turn_on:
- id: led
- blue: 0%
- red: 0%
- green: 100%
- effect: none
- on_tts_end:
- - light.turn_on:
- id: led
- blue: 0%
- red: 0%
- green: 100%
- effect: pulse
- on_end:
- - delay: 1s
- - wait_until:
- not:
- speaker.is_playing:
- - light.turn_off: led
- on_error:
- - light.turn_on:
- id: led
- blue: 0%
- red: 100%
- green: 0%
- 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_multi_click:
- - timing:
- - ON FOR AT LEAST 350ms
- then:
- - voice_assistant.start:
- - timing:
- - ON FOR AT LEAST 350ms
- - OFF FOR AT LEAST 10ms
- then:
- - light.turn_on:
- id: led
- blue: 100%
- red: 0%
- green: 0%
- effect: pulse
- - voice_assistant.stop:
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement