RE: AS ESPHome yaml for home assistant - admin - 11-28-2024
"Is it possible that in 1 yaml file to program bought gpio15 an gpio 16 leds?" what this means? you can control both LED with GPIO15 and GPIO16, it's OK.
RE: AS ESPHome yaml for home assistant - datkinson - 12-02-2024
I recently purchased and setup the KinCony Voice Assistant device. Works great, but the volume from the speaker is too low to hear. How can I increase the volume from the speaker?
RE: AS ESPHome yaml for home assistant - admin - 12-02-2024
if you use ESPHome, you can set the volume in yaml file.
RE: AS ESPHome yaml for home assistant - datkinson - 12-05-2024
(12-02-2024, 10:59 PM)admin Wrote: if you use ESPHome, you can set the volume in yaml file.
Could you give me an example? I've searched online, but don't see any examples of increasing the volume in the yaml file.
RE: AS ESPHome yaml for home assistant - admin - 12-05-2024
see here in details: https://esphome.io/components/speaker/index.html
RE: AS ESPHome yaml for home assistant - filip.richter - 12-20-2024
Hi all,
I have my working configuration here, also using media player:
Code: esphome:
name: assistant1
friendly_name: Assistant 1
platformio_options:
board_build.flash_mode: dio
on_boot:
- light.turn_on:
id: notify_center
blue: 100%
brightness: 60%
effect: fast pulse
esp32:
board: esp32-s3-devkitc-1
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"
external_components:
- source: github://pr#7672
components:
- audio
- speaker
- i2s_audio
- speaker
refresh: 0s
psram:
mode: octal # quad for N8R2 and octal for N16R8
speed: 80MHz
# Enable logging
logger:
hardware_uart: USB_SERIAL_JTAG
# Enable Home Assistant API
api:
encryption:
key: "*********************************************"
on_client_connected:
then:
- delay: 50ms
- light.turn_off: notify_center
- micro_wake_word.start:
on_client_disconnected:
then:
- voice_assistant.stop:
ota:
- platform: esphome
password: "****************************************"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
fast_connect: True
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Assistant1 Fallback Hotspot"
password: "********************************"
web_server:
port: 80
captive_portal:
button:
- platform: restart
name: "Restart"
- platform: template
name: "Start assist"
on_press:
then:
- voice_assistant.start
- platform: template
name: "Start continious assist"
on_press:
then:
- voice_assistant.start_continuous:
- platform: template
name: "Stop assist"
on_press:
then:
- voice_assistant.stop:
switch:
- platform: template
id: mute
name: Mute
optimistic: true
on_turn_on:
- micro_wake_word.stop:
- voice_assistant.stop:
- light.turn_on:
id: notify_center
red: 100%
green: 0%
blue: 0%
brightness: 60%
effect: fast pulse
- delay: 2s
- light.turn_off:
id: notify_center
- light.turn_on:
id: notify_center
red: 100%
green: 0%
blue: 0%
brightness: 30%
on_turn_off:
- micro_wake_word.start:
- light.turn_on:
id: notify_center
red: 0%
green: 100%
blue: 0%
brightness: 60%
effect: fast pulse
- delay: 2s
- light.turn_off:
id: notify_center
light:
- platform: esp32_rmt_led_strip
id: notify_center
rgb_order: RGB
pin: GPIO16
num_leds: 1
rmt_channel: 0
chipset: ws2812
name: "Notify light"
effects:
- pulse:
- pulse:
name: "Fast Pulse"
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0%
max_brightness: 100%
- platform: esp32_rmt_led_strip
rgb_order: GRB
pin: GPIO15
num_leds: 3
rmt_channel: 1
chipset: ws2812
name: "Lower light"
id: notify_lower
effects:
- pulse:
- pulse:
name: "Fast Pulse"
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0%
max_brightness: 100%
- addressable_color_wipe:
- addressable_scan:
name: Scan Effect
move_interval: 300ms
scan_width: 1
- addressable_scan:
name: Scan Effect 2
move_interval: 800ms
scan_width: 1
# Audio and Voice Assistant Config
i2s_audio:
- id: i2s_in
i2s_lrclk_pin: GPIO3 #WS
i2s_bclk_pin: GPIO2 #SCK
- id: i2s_speaker
i2s_lrclk_pin: GPIO6 #LRC
i2s_bclk_pin: GPIO7 #BLCK
microphone:
- platform: i2s_audio
id: va_mic
adc_type: external
i2s_din_pin: GPIO4 #SD pin on the INMP441
channel: left
pdm: false
i2s_audio_id: i2s_in
bits_per_sample: 32 bit
speaker:
platform: i2s_audio
id: va_speaker
i2s_audio_id: i2s_speaker
dac_type: external
i2s_dout_pin: GPIO8 # DIN Pin of the MAX98357A Audio Amplifier
channel: left
sample_rate: 48000
media_player:
- platform: speaker
name: "Assistent media player"
id: speaker_media_player_id
speaker: va_speaker
sample_rate: 48000
on_play:
- logger.log: "Playback started!"
- light.turn_on:
id: notify_lower
red: 30%
green: 30%
blue: 0%
brightness: 100%
on_idle:
- logger.log: "Playback finished!"
- light.turn_off: notify_lower
micro_wake_word:
on_wake_word_detected:
then:
- voice_assistant.start:
wake_word: !lambda return wake_word;
models:
- model: github://esphome/micro-wake-word-models/models/v2/okay_nabu.json
voice_assistant:
id: va
microphone: va_mic
noise_suppression_level: 2.0
volume_multiplier: 4.0
media_player: speaker_media_player_id
on_start:
- light.turn_on:
id: notify_center
red: 30%
green: 30%
blue: 70%
brightness: 60%
effect: fast pulse
- media_player.volume_set: 100%
on_stt_end:
- light.turn_off: notify_center
on_error:
- micro_wake_word.start:
on_end:
- light.turn_off: notify_center
- wait_until:
not:
voice_assistant.is_running:
- micro_wake_word.start:
on_tts_start:
- light.turn_on:
id: notify_center
red: 0%
green: 30%
blue: 0%
brightness: 60%
effect: fast pulse
on_tts_end:
- delay: 2s
- light.turn_off: notify_center
May help someone, it took me 3 days to make it working
RE: AS ESPHome yaml for home assistant - admin - 12-20-2024
Thank you very much share your config file to help people.
RE: AS ESPHome yaml for home assistant - PeteAklNZ - 12-27-2024
(12-05-2024, 11:21 PM)admin Wrote: see here in details: https://esphome.io/components/speaker/index.html
So I have this file:
/homeassistant/esphome/kincony-as.yaml
and I've modified the speaker section to:
speaker:
platform: i2s_audio
id: va_speaker
i2s_audio_id: i2s_speaker
volume: 90%
dac_type: external
i2s_dout_pin: GPIO8 # DIN Pin of the MAX98357A Audio Amplifier
channel: mono
Then did a quick reload of the YAML, then restarted Home Assistant, but no change in volume.
Is there something else I need to do please?
RE: AS ESPHome yaml for home assistant - PeteAklNZ - 12-27-2024
(12-05-2024, 11:21 PM)admin Wrote: see here in details: https://esphome.io/components/speaker/index.html
Think my previous reply was not following the example, so also tried this:
speaker.volume_set: 90%
and this:
speaker.volume_set:
id: va_speaker
volume: 90%
Still no change
RE: AS ESPHome yaml for home assistant - admin - 12-28-2024
sure, you can control GPIO15 and GPIO16 different LEDs. see this demo video: https://www.youtube.com/shorts/59CFvpFJMdc
|