Intent is recognized but sessionEnded always as timeout

Hello,
I have finally found the time to play with rhasspy again. Most recently I had everything working great as a docker containers with node-red as server and sattelite. Big fun so far - THANKS!!!
with home assistant I had done nothing yet, because integrations seemed easier than with node-red and own applications, I now have everything as integration in home assistant.
Now I noticed that the pixel rings on my satellites continue to flash for a long time and could then see in the MQTT that after a successful intent recognition, the sessions end only by timeout.
Can someone give me a tip where I can start?

Yup, check this

Most probably, you do not use endSession. Is that assumption correct?

Previously I used a custom intend recognition.
In node Red I didn’t handled sessionEnd.
I checked my previous configuration, I couldn’t remember, but I configured intent handler also to my custom api. Ups
Will fix it tomorrow and than I can start working with your ESP32 Rhasspy Satellite, try to get this boards running:
esp-s3-box
esp-korvo

Thanks twice

1 Like

You said esp korvo

Have you try it ?

Still not but want to with esp home.

Ok
I have purchase one. And it work with esphome and homme assistant.
But i dont know how to use it xith rhaaspy

Do youbthing we use the same code ?

substitutions:

esphome:
name: ${device_name}
min_version: 2023.11.0
platformio_options:
board_build.flash_mode: dio
on_boot:
- priority: -100
then:
- wait_until: api.connected
- delay: 1s
- if:
condition:
switch.is_on: use_wake_word
then:
- voice_assistant.start_continuous:

esp32:
board: esp-wrover-kit
framework:
type: arduino
version: recommended

external_components:

  • source: github://rpatel3001/esphome@es8311
    components: [ es8311 ]
  • source: github://rpatel3001/esphome@es7210
    components: [ es7210 ]
  • source: github://pr#5230
    components:
    • esp_adf

Enable logging

logger:

API KEY

api:
encryption:
key: ${apikey}

OTA PASSWORD

ota:
password: ${wifi_password}
safe_mode: true
reboot_timeout: 3min
num_attempts: 3

text_sensor:

  • platform: wifi_info
    ip_address:
    name: “${device_name} IP Address”

time:
platform: homeassistant
id: homeassistant_time

WIFI PASSWORD

wifi:
networks:
- id: wifi_default
ssid: ${wifi_ssid}
password: ${wifi_password}

ap:
ssid: ${device_name}
password: ${wifi_password}

i2c:
sda: GPIO19
scl: GPIO32
scan: true
frequency: 400kHz

es8311:
address: 0x18

es7210:
address: 0x40

output:

  • platform: gpio
    id: pa_ctrl
    pin: GPIO12

i2s_audio:

  • id: codec
    i2s_lrclk_pin: GPIO22
    i2s_bclk_pin: GPIO25
    i2s_mclk_pin: GPIO0
  • id: mic_adc
    i2s_lrclk_pin: GPIO26
    i2s_bclk_pin: GPIO27
    i2s_mclk_pin: GPIO0

speaker:

  • platform: i2s_audio
    id: external_speaker
    dac_type: external
    i2s_audio_id: codec
    i2s_dout_pin: GPIO13
    mode: mono

microphone:

  • platform: i2s_audio
    id: external_mic
    adc_type: external
    i2s_audio_id: mic_adc
    i2s_din_pin: GPIO36
    pdm: false

voice_assistant:
id: voice_asst
microphone: external_mic
speaker: external_speaker
noise_suppression_level: 2
auto_gain: 15dBFS
volume_multiplier: 0.5
use_wake_word: false
on_listening:
- light.turn_on:
id: led_ring
blue: 100%
red: 0%
green: 0%
brightness: 100%
effect: wakeword
on_tts_start:
- light.turn_on:
id: led_ring
blue: 0%
red: 0%
green: 100%
brightness: 50%
effect: pulse
on_end:
- delay: 100ms
- wait_until:
not:
speaker.is_playing:
- script.execute: reset_led
on_error:
- light.turn_on:
id: led_ring
blue: 0%
red: 100%
green: 0%
brightness: 100%
effect: none
- delay: 1s
- script.execute: reset_led
- script.wait: reset_led
- lambda: |-
if (code == “wake-provider-missing” || code == “wake-engine-missing”) {
id(use_wake_word).turn_off();
}

script:

  • id: reset_led
    then:
    • if:
      condition:
      switch.is_on: use_wake_word
      then:
      - light.turn_on:
      id: led_ring
      blue: 30%
      red: 0%
      green: 0%
      brightness: 25%
      effect: none
      else:
      - light.turn_off: led_ring

switch:

  • platform: template
    name: Use wake word
    id: use_wake_word
    optimistic: true
    restore_mode: RESTORE_DEFAULT_ON
    entity_category: config
    on_turn_on:
    • lambda: id(voice_asst).set_use_wake_word(true);
    • if:
      condition:
      not:
      - voice_assistant.is_running
      then:
      - voice_assistant.start_continuous
    • script.execute: reset_led
      on_turn_off:
    • voice_assistant.stop
    • script.execute: reset_led

Restart option

  • platform: restart
    name: “${device_name} Restart”

light:

  • platform: esp32_rmt_led_strip
    id: led_ring
    name: “${device_name} Light”
    pin: GPIO33
    num_leds: 12
    rmt_channel: 0
    rgb_order: GRB
    chipset: ws2812
    default_transition_length: 0s
    effects:
    • pulse:
      name: “Pulse”
      transition_length: 0.5s
      update_interval: 0.5s
    • addressable_twinkle:
      name: “Working”
      twinkle_probability: 5%
      progress_interval: 4ms
    • addressable_color_wipe:
      name: “Wakeword”
      colors:
      - red: 28%
      green: 100%
      blue: 90%
      num_leds: 12
      add_led_interval: 40ms
      reverse: false

binary_sensor:

  • platform: template
    name: “${device_name} Volume Up”
    id: btn_volume_up
  • platform: template
    name: “${device_name} Volume Down”
    id: btn_volume_down
  • platform: template
    name: “${device_name} Set”
    id: btn_set
  • platform: template
    name: “${device_name} Play”
    id: btn_play
  • platform: template
    name: “${device_name} Mode”
    id: btn_mode
  • platform: template
    name: “${device_name} Record”
    id: btn_record
    on_press:
    • output.turn_on: pa_ctrl
    • voice_assistant.start:
    • light.turn_on:
      id: led_ring
      brightness: 100%
      effect: “Wakeword”
      on_release:
    • voice_assistant.stop:
    • output.turn_off: pa_ctrl
    • light.turn_off:
      id: led_ring

Status de connection

  • platform: status
    name: “${device_name} Status”

sensor:

  • id: button_adc
    platform: adc
    internal: true
    pin: 39
    attenuation: 11db
    update_interval: 15ms
    filters:
    • median:
      window_size: 5
      send_every: 5
      send_first_at: 1
    • delta: 0.1
      on_value_range:
    • below: 0.55
      then:
      • binary_sensor.template.publish:
        id: btn_volume_up
        state: ON
    • above: 0.65
      below: 0.92
      then:
      • binary_sensor.template.publish:
        id: btn_volume_down
        state: ON
    • above: 1.02
      below: 1.33
      then:
      • binary_sensor.template.publish:
        id: btn_set
        state: ON
    • above: 1.43
      below: 1.77
      then:
      • binary_sensor.template.publish:
        id: btn_play
        state: ON
    • above: 1.87
      below: 2.15
      then:
      • binary_sensor.template.publish:
        id: btn_mode
        state: ON
    • above: 2.25
      below: 2.56
      then:
      • binary_sensor.template.publish:
        id: btn_record
        state: ON
    • above: 2.8
      then:
      • binary_sensor.template.publish:
        id: btn_volume_up
        state: OFF
      • binary_sensor.template.publish:
        id: btn_volume_down
        state: OFF
      • binary_sensor.template.publish:
        id: btn_set
        state: OFF
      • binary_sensor.template.publish:
        id: btn_play
        state: OFF
      • binary_sensor.template.publish:
        id: btn_mode
        state: OFF
      • binary_sensor.template.publish:
        id: btn_record
        state: OFF

Wifi signal

  • platform: wifi_signal
    name: “${device_name} WiFi Signal”
    update_interval: 60s

you are ahead of me, i will try your esp-home config as a starting point but I cant see any mqtt implementation.
To get it working with rhasspy, we should think about responsibilities like wake word detection on device or rhasspy.
we can use rhasspy hermes protocol over MQTT
will try asap, can you format your config, thanks

It s not my code .
But i suppose we need add this or somerhing near that

Blockquote
// MQTT Broker
const char *mqtt_broker = “”;
const char *topic = “”;
const char *mqtt_username = “”;
const char *mqtt_password = “”;
const int mqtt_port = 1883;
WiFiClient espClient;
PubSubClient client(espClient);

// Reception du message MQTT
void callback(char *topic, byte *payload, unsigned int length) {
Serial.print(“Message arrived in topic: “);
Serial.println(topic);
Serial.print(“Message:”);
for (int i = 0; i < length; i++) {
Serial.print((char) payload[i]);
}
Serial.println();
Serial.println(”-----------------------”);

void loop() {

client.loop();

}

Yes. I forgot to mention we should have a look at
https://github.com/Romkabouter/ESP32-Rhasspy-Satellite first. @romkabouter has made impressive work to create satellites for some devices. I used it for M5 stack and it works.
This is a proper concept in terms of rhasspy server and satellite. It shows all the communication and its flow. Not only because of time also I’m not familiar with the programming language and hardware knowledge, therefore using esp-home is interesting to me to get other devises such that esp-korvo and even that esp-s3-box running one day

Yes i try to contact him for help. This week end