Respeaker 2 mic hat LED's

Is there a way to connect the LED’s on the 2-mic hat to the Rhasspy wake-word response??

Yes, HermesLedControl does this.

1 Like

Thanks for that, appreciated

Does this need "connecting " to Rhasspy??

I installed it but it does nothing???

It needs to be configured.
Point it to the same MQTT Server as your Rhasspy setup.
($HOME/.config/hermesledcontrol/configuration.yaml)
–snip–
engine: “rhasspy”
pathToConfig: “/home/pi/.config/rhasspy/profiles/de/profile.json”
hardware: “respeaker2”
#pattern: “projectalice”
#pattern: “alexa”
#pattern: “custom”
#pattern: “google”
#pattern: “pgas”
pattern: “kiboost”
enableDoA: false
leds: 3
#gpioPin: ?
defaultBrightness: 50
–snip–
Modify the path and contents to fit your needs.

HI

thanks for your suggestion but i am a complete noob here, never used linux before so i have no idea really where or how to do this stuff, i only installed by cutting and pasting commands line by line from the install guide, is there a step guide for this fix??

I can find my way round with cd… have used nano to edit txt files but not much more.

Not that I am aware of. You need at least a little knowledge to navigate through the Linux command shell.
I assume, that you have a ssh connection to your Pi.
After login type arecord -l and paste the output.
That shows the audio devices for recording.
Do the same with aplay -l.
That shows the audio devices for playing.

I presume you are logged in as the user “pi”.
The path from my previous post to the HLC should be correct.
Compare it to your config settings.

Hi

yes i have ssh control, user is indeed pi, i have no idea where config settings are, i have not set up mqtt on this device

arecord -l shows…
pi@voice1:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [bcm2835-i2s-wm8960-hifi wm8960-hifi-0]
Subdevices: 0/1
Subdevice #0: subdevice #0

aplay -l shows…
pi@voice1:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [bcm2835-i2s-wm8960-hifi wm8960-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0

All thats in the HLC config is this…

engine: “%ENGINE%”
pathToConfig: “%PATHTOCONFIG%”
hardware: “%DEVICE%”
pattern: “%PATTERN%”
enableDoA: %DOA%

I have now managed to figure out where the rhasspy and HLC config files are and can edit them with nano.

Still no idea about the HLC and mqtt setup - my rhasspy mqtt is set to internal and i have been using websockets to read into Node Red which seems to work ok. I do have Mosquitto on my HASSIO setup but only use it for one integration so i don’t know much about it really.

I think this line on the HLC intro maybe a little misleading :slight_smile:

“Provides an easy way to control your device leds on a hermes environment. It is highly customisable and beginner friendly

Some progress has been made - i moved rhasspy to external mqtt, altered the docker run command as shown, it downloaded a load of stuff,

If i press “wake” now the LEDS come on, and it will recognise STT ok it seems but the LEDS will stay on 100%, however it has now also stopped responding to the wake word??

If i do a manual TTS the LEDS will come on and go off ok, just no wake word???

Beginner-friendly is always a point of view where you are (Developer->User)
From the point of view to program all the mqtt and gpio stuff or just using a ready made script by just modifying a config file. That is meant with beginner-friendly.
I assume use are at the very beginning of all steps.

  1. You have your Rhasspy host up.
  2. You have connected to an external MQTT Host.
  3. You have modified the config file of HLC to point to the config file profile.json (look at my first post)?
  4. Now you struggle with the wake word?
    That is configured here:
    http://hostname:12101/settings -> Wake Word -> Porcupine (Recommended)
    Restart Rhasspy and then do further modifications
  5. It seems to be, that you have a Raspberry Pi(rpi). In the file /boot/config.txt you will find an entry:
    #Enable audio (loads snd_bcm2835)
    dtparam=audio=off
    Set it like this and restart your rpi.

Hi

the wake word was working well until i set mqtt, that has stopped it working, i can do TTS ok and manual recognition/wake is ok

yes Rpi3B+ and the dtparam is set like that but still no wake word ??

I think i have it now - it was the docker restart command in the tutorial pages, this was my original command block…

$ docker run -d -p 12101:12101
–name rhasspy
–restart unless-stopped
-v “$HOME/.config/rhasspy/profiles:/profiles”
-v “/etc/localtime:/etc/localtime:ro”
–device /dev/snd:/dev/snd
rhasspy/rhasspy
–user-profiles /profiles
–profile en

This was the block from the MQTT section:-

docker run -d -p 12101:12101
–network host
–restart unless-stopped
-v “$HOME/.config/rhasspy/profiles:/profiles”
–device /dev/snd:/dev/snd
rhasspy/rhasspy:2.5.0-pre
–user-profiles /profiles
–profile en

It seems to be set to download a specific image - 2.5.0-pre???

Whereas the original was 2.5.9

I changed the block to:-

docker run -d -p 12101:12101
–network host
–restart unless-stopped
-v “$HOME/.config/rhasspy/profiles:/profiles”
–device /dev/snd:/dev/snd
rhasspy/rhasspy
–user-profiles /profiles
–profile en

And that seems to have it fixed it - the leds now come on/off ok and the wake word is good to go :slight_smile:

Maybe the help pages could be updated to remove the 2.5.0 ??

Right, that should have been changed a long time ago indeed. I fixed it, this will be published in the next documentation update. Thanks for reporting this!

Thanks for the help and i’m glad it will be fixed for future users.

The learning curve with linux is practically vertical :slight_smile: I’m more used to MSDOS from back in the day :slight_smile:

When editing the config file, do you leave these lines in there and add new after?

engine: “%ENGINE%”
pathToConfig: “%PATHTOCONFIG%”
hardware: “%DEVICE%”
pattern: “%PATTERN%”
enableDoA: %DOA%

I tried to change the pattern and brightness but it seems to have made no difference??
I did stop HLC first then restart it.

engine: “%ENGINE%”
pathToConfig: “%PATHTOCONFIG%”
hardware: “%DEVICE%”
pattern: “%PATTERN%”
enableDoA: %DOA%

pattern: “alexa”
leds: 3
defaultBrightness: 50

You can use my conf file as a starting point or example.
Change Brightness to 10. Ithink you will notice the difference.