Skip to content

In home assistant wake word stops working after first use in m5stack-atom-echo.yaml #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
keyboarderror opened this issue Feb 24, 2025 · 8 comments
Labels

Comments

@keyboarderror
Copy link

keyboarderror commented Feb 24, 2025

Using in home assistant wake words on the Atom Echo causes the device to hang after the first request. On device works normally. You can reload the integration or restart the device to use it again.

I've fixed the problem by the changing the else condition in the start_wake_word script like so:

Before:

- id: start_wake_word
    then:
      - wait_until:
          and:
            - media_player.is_idle:
            - speaker.is_stopped:
      - if:
          condition:
            lambda: return id(wake_word_engine_location).state == "On device";
          then:
            - voice_assistant.stop
            - micro_wake_word.stop:
            - delay: 1s
            - script.execute: reset_led
            - script.wait: reset_led
            - micro_wake_word.start:
          else:
            - if:
                condition: voice_assistant.is_running
                then:
                  - voice_assistant.stop:
                  - script.execute: reset_led
            - voice_assistant.start_continuous:`

After:

````- id: start_wake_word
    then:
      - wait_until:
          and:
            - media_player.is_idle:
            - speaker.is_stopped:
      - if:
          condition:
            lambda: return id(wake_word_engine_location).state == "On device";
          then:
            - voice_assistant.stop
            - micro_wake_word.stop:
            - delay: 1s
            - script.execute: reset_led
            - script.wait: reset_led
            - micro_wake_word.start:
          else:
            - if:
                condition: 
                  lambda: return id(wake_word_engine_location).state == "In Home Assistant";
                then:
                  - voice_assistant.stop:
                  - script.execute: reset_led
                  - delay: 500ms
                  - lambda: id(va).set_use_wake_word(true);               
            - voice_assistant.start_continuous


But I really have no idea what I'm doing. You might want to fix it properly. 
@Androxilogin
Copy link

I've noticed that pressing the button while using home assistant wake words will enable it to listen to a new request. Since the last update it has been working as an on/off switch, so it seems.

@jesserockz
Copy link
Member

I am unable to reproduce this. I reflashed the latest released firmware just now and it is working and listening for a wake word after every response given. I have tried over 20 times so far.

Can you provide device logs showing what you mean by stops working?

@keyboarderror
Copy link
Author

OK, I changed the script back and re-flashed it. I compiled the latest firmware last night. It takes an hour and 10 minutes on my Raspberry Pi 4. The problem is back. Here's the log from re-flash to fail.

logs_m5stack-atom-echo_run.txt

@bilbotbaggin
Copy link

I Can confirm the same behavior on two M5 Atom Echo devices cleanly installed with the voice assist firmware, I am able to issue one voice command and then the device becomes non responsive to voice commands.

Nothing jumping out to me on the device console though I am fairly inexperienced.

@keyboarderror
Copy link
Author

My workaround is just copied from the select: -platform: template that does the initial setup. The - micro_wake_word.stop statement isn't necessary looking at the logs as it's part on the On device wake word service and is set at start.

@jesserockz
Copy link
Member

@keyboarderror looking at those logs, you are not even using micro-wake-word, but it is just always streaming to ha which is doing the wake word detection with openwakeword etc?

@keyboarderror
Copy link
Author

keyboarderror commented Feb 27, 2025

@jesserockz Correct. It was an unnecessary command leftover from the copied code. I have removed it from the workaround.

Copy link

github-actions bot commented May 1, 2025

As there has been no activity on this issue for 30 days, I am marking it as stale. If you think this is a mistake, please comment below and I will remove the stale label.

@github-actions github-actions bot added the stale label May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants