Updated Raspiaudio Muse Luxe to latest microww config.
This commit is contained in:
@@ -22,9 +22,6 @@ ota:
|
|||||||
|
|
||||||
external_components:
|
external_components:
|
||||||
- source: github://RASPIAUDIO/esphomeLuxe@main
|
- source: github://RASPIAUDIO/esphomeLuxe@main
|
||||||
# - source:
|
|
||||||
# type: local
|
|
||||||
# path: components
|
|
||||||
components: [es8388]
|
components: [es8388]
|
||||||
refresh: 0s
|
refresh: 0s
|
||||||
|
|
||||||
@@ -47,6 +44,9 @@ esphome:
|
|||||||
platformio_options:
|
platformio_options:
|
||||||
board_build.flash_mode: dio
|
board_build.flash_mode: dio
|
||||||
board_build.arduino.memory_type: qio_opi
|
board_build.arduino.memory_type: qio_opi
|
||||||
|
project:
|
||||||
|
name: raspiaudio.voice-assistant
|
||||||
|
version: "2025.2.6"
|
||||||
on_boot:
|
on_boot:
|
||||||
priority: -100.0
|
priority: -100.0
|
||||||
then:
|
then:
|
||||||
@@ -213,6 +213,19 @@ sensor:
|
|||||||
- lambda: return clamp(x, 0.0f, 100.0f);
|
- lambda: return clamp(x, 0.0f, 100.0f);
|
||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
|
- platform: gpio
|
||||||
|
pin:
|
||||||
|
number: GPIO27
|
||||||
|
mode:
|
||||||
|
input: true
|
||||||
|
pullup: true
|
||||||
|
id: jack_detect
|
||||||
|
name: Jack Detect
|
||||||
|
internal: true
|
||||||
|
on_press:
|
||||||
|
- script.execute: jack_detect_high
|
||||||
|
on_release:
|
||||||
|
- script.execute: jack_detect_low
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
pin:
|
pin:
|
||||||
number: GPIO19
|
number: GPIO19
|
||||||
@@ -292,6 +305,7 @@ light:
|
|||||||
update_interval: 2s
|
update_interval: 2s
|
||||||
|
|
||||||
i2s_audio:
|
i2s_audio:
|
||||||
|
id: i2s0
|
||||||
i2s_lrclk_pin: GPIO25
|
i2s_lrclk_pin: GPIO25
|
||||||
i2s_bclk_pin: GPIO5
|
i2s_bclk_pin: GPIO5
|
||||||
i2s_mclk_pin: GPIO0
|
i2s_mclk_pin: GPIO0
|
||||||
@@ -299,6 +313,7 @@ i2s_audio:
|
|||||||
microphone:
|
microphone:
|
||||||
- platform: i2s_audio
|
- platform: i2s_audio
|
||||||
id: luxe_mic
|
id: luxe_mic
|
||||||
|
i2s_audio_id: i2s0
|
||||||
sample_rate: 16000
|
sample_rate: 16000
|
||||||
i2s_din_pin: GPIO35
|
i2s_din_pin: GPIO35
|
||||||
bits_per_sample: 16bit
|
bits_per_sample: 16bit
|
||||||
@@ -312,20 +327,22 @@ speaker:
|
|||||||
dac_type: external
|
dac_type: external
|
||||||
sample_rate: 48000
|
sample_rate: 48000
|
||||||
bits_per_sample: 16bit
|
bits_per_sample: 16bit
|
||||||
channel: stereo
|
num_channels: 2
|
||||||
buffer_duration: 100ms
|
buffer_duration: 100ms
|
||||||
|
|
||||||
media_player:
|
media_player:
|
||||||
- platform: speaker
|
- platform: speaker
|
||||||
name: None
|
name: None
|
||||||
id: luxe_media_player
|
id: luxe_media_player
|
||||||
|
internal: false
|
||||||
|
# task_stack_in_psram: true
|
||||||
# volume_min: 0.5
|
# volume_min: 0.5
|
||||||
# volume_max: 0.8
|
# volume_max: 0.8
|
||||||
announcement_pipeline:
|
announcement_pipeline:
|
||||||
speaker: luxe_speaker
|
speaker: luxe_speaker
|
||||||
format: FLAC
|
format: FLAC
|
||||||
sample_rate: 48000
|
sample_rate: 48000
|
||||||
num_channels: 2
|
num_channels: 1
|
||||||
files:
|
files:
|
||||||
- id: little_sound
|
- id: little_sound
|
||||||
file: https://github.com/esphome/home-assistant-voice-pe/raw/dev/sounds/timer_finished.flac
|
file: https://github.com/esphome/home-assistant-voice-pe/raw/dev/sounds/timer_finished.flac
|
||||||
@@ -384,6 +401,7 @@ voice_assistant:
|
|||||||
|
|
||||||
on_tts_start:
|
on_tts_start:
|
||||||
- logger.log: "answering 4 => phase"
|
- logger.log: "answering 4 => phase"
|
||||||
|
- micro_wake_word.stop:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
id(phase) = 4;
|
id(phase) = 4;
|
||||||
- script.execute: update_led
|
- script.execute: update_led
|
||||||
@@ -403,8 +421,23 @@ voice_assistant:
|
|||||||
|
|
||||||
#########
|
#########
|
||||||
# Scripts
|
# Scripts
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
- id: jack_detect_high
|
||||||
|
then:
|
||||||
|
- logger.log: "Jack detect high -> route to speaker"
|
||||||
|
- output.turn_off: dac_mute
|
||||||
|
- lambda: |-
|
||||||
|
id(my_es8388).write_byte(0x1D, 0x20);
|
||||||
|
id(my_es8388).write_byte(0x1C, 0x10);
|
||||||
|
id(my_es8388).write_byte(0x04, 0x30);
|
||||||
|
- id: jack_detect_low
|
||||||
|
then:
|
||||||
|
- logger.log: "Jack detect low -> route to line out"
|
||||||
|
- output.turn_on: dac_mute
|
||||||
|
- lambda: |-
|
||||||
|
id(my_es8388).write_byte(0x1D, 0x00);
|
||||||
|
id(my_es8388).write_byte(0x1C, 0x00);
|
||||||
|
id(my_es8388).write_byte(0x04, 0x0C);
|
||||||
- id: update_led
|
- id: update_led
|
||||||
then:
|
then:
|
||||||
- logger.log: "==>>>update_led"
|
- logger.log: "==>>>update_led"
|
||||||
@@ -429,7 +462,7 @@ script:
|
|||||||
- lambda: id(phase) = 1;
|
- lambda: id(phase) = 1;
|
||||||
- media_player.speaker.play_on_device_media_file:
|
- media_player.speaker.play_on_device_media_file:
|
||||||
media_file: little_sound
|
media_file: little_sound
|
||||||
announcement: true
|
announcement: false
|
||||||
- script.execute: update_led
|
- script.execute: update_led
|
||||||
|
|
||||||
- id: waiting
|
- id: waiting
|
||||||
|
Reference in New Issue
Block a user