Home assistant - How install Rhasspy

Hello,

How can i Install Rhasspy on Home assistant?
I Don’t fine the add-on at the Official add-ons!

:blush:

1 Like

I have a account on Github
Where can I find the method for installation via Home Assistant?
I am a beginner in this system and I am floundering a bit
I’m trying to switch from Domoticz to Home Assistant

:wink:

You do not need an account, add the repo in Home Assisant.
You can read about it here:

Hello,
Tanks You
I found the way to do it with Home Assistant 2020.12.2
In Add-On-Store in the upper right, three vertical points, option Repositories.
Then Manage add-on repositories
It’s OK

:+1:

I’ve also added the rhasspy repo to my home assistant installation.
I have compatible audio hardware.

However I am overwhelmed by rhasspy.

Is there a good recommended tutorial? All I want is to be able to turn off a single or multpiple HA switched with a voice command: aka turn on/off switch1 or turn on/off switchgroup1

I read the rhasspy docs but am still a bit lost about what components I need and how to configure them :frowning:

If you find one please let us know as I would love to dump Alexa for something local.

this should help : Tutorials - Rhasspy

My 5c worth…

Rhasspy, like Home Assistant, seems to be designed to be all things to all people. Therefore how to use it depends very much on what you want to achieve, what hardware and HA installation option you chose, what other software you are using … and of course your level of expertise.

Unfortunately the official documentation is very much a reference manual, listing what the options are, but short on how to use them :frowning: I appreciate that the core developers are hobbyists who enjoy the technical challenges, and are not so keen to devote much of their personal time to writing user documentation. Understandable … but not helpful for newbies.


But back to your installation…
What hardware are you using for HA server and audio ?
Which HA installation option did you use ?
Are you trying to connect your audio hardware directly to your HA server ?


I personally am using a Raspberry Pi 4 with Home Assistant OS and the Rhasspy integration from HACS.
I ended up going for what the Rhasspy tutorial (link by romkabouter above) calls a Base station and Satellite configuration because (a) i don’t know the first thing about Docker, and (b) it seems reasonable to eventually have several satellites around the house.
The satellite can run on a Pi zero - however I already had a spare RasPi 3B, so I connected my 4-mic ReSpeaker HAT hardware and installed Raspbian with ReSpeaker driver (not the out-of-date official seeed one) and Rhasspy.

It can be a bit confusing having the same Rhasspy installed on both the base station and satellite. It didn’t take too much to figure it out … until I came to getting HA to perform the voice command which had just been given. And that’s where the tutorial stops, and the documentation on intents has no examples.

… but I’m getting carried away describing my setup which may be totally irrelevant to your situation :wink:

Sorry but I’ve probably read the complete documentation back and forth a couple of times already. I’m not even sure which of the options incorporated in rhasspy I even need to activate and setup for the minimal use case I have to turn 1 or 2 switches on/off via HA.

thanks for trying to help. I mostly agree to your description of rhasspy and its documentation :slight_smile: I’ve worked in IT for 209 years so I should be able to figure it out somehow but I am overwhelmed about all the options.

let me describe my setup:

I have a NAS at home and am running HA inside a VM on said NAS. I chose the isntallation method: OS if you look at the different options: Installation - Home Assistant

the microphone is connected directly to the N AS and passed through to HA. I have this one: 4 Mic Array for Pi - ReSpeaker

rhasspy is running “inside” HA via the supervisor add-on.

Does that help point me into the right direction? All I want is to be able to turn on/off a couple of switches.

Ok, so start simple.

You say you have added the rhasspy repo to your home assistant installation.
What exactly do you mean with that?

  • What installation setup do you have for Home Assistant?
  • Have you installed the addon in Home Assistant?

I just want to make sure I am putting you on the right track here :slight_smile:

209 years, wow ! And i thought my 30 years was too long :wink:

HA OS in a Virtual Machine on a NAS should be OK. Add Rhasspy (as a Supervisor > Add-on) … this is similar enough to my setup.

But I’m confused about your microphone. The 4-mic ReSpeaker you linked to is a HAT which fits onto a Raspberry Pi’s GPIO - yet you say yours is connected directly to the NAS. Do you have a Raspberry Pi running NAS software (and everything else on the one machine) ? Or is your ReSpeaker the USB version which you have plugged into the NAS ?

I first assumed that having the ReSpeaker, Rhasspy and HA all on the one RasPi4 would be a lot more responsive - but didn’t have the expertise to install the ReSpeaker driver into the Docker VM so the hardware was not recognized by Rhasspy.

HA OS seems to assume it will run on a server hidden away in a cupboard and devices will connect via LAN. The recommended approach seems to be to attach the mic to a separate machine as a satellite. The satelite also runs Rhasspy (this is where it gets a little confusing), and they share the tasks.


This is my HA server’s Rhasspy settings page:

and my Satellite’s Rhasspy settings look like:

Note that Rhasspy on the server has audio recording and playing disabled; and the Satellite machine defers some of the tasks via Remote HTTP to Rhasspy on the server.

On the other hand, if you wish to get everything running on one machine romkabouter can probably help

209 years, wow ! And i thought my 30 years was too long :wink:

LOL I just meant to point out I should be able to figure it out, provided I get a couple of hints :slight_smile:

The NAS is sitting nice and quietly in my living room so I would like to keep everything on this one device.

HA is installed as “OS” inside a virtual machine. Bluetooth, Zigbee and ReSpeaker devices all passed through and working fine with HA. I can’t really remember I think they provided a VM template.

I installed the rhasspy addon in HA and here are my “settings” so far. Just not very clear what the next steps are and if this is correct.

Looking good :slight_smile:

Just start the addon and then goto Open WebUI (wait a minute or so, because Rhasspy webUI must load first)
You can also check the logs.
If you have the samba addon installed, you will have a /share/rhasspy folder with the profiles :slight_smile:

Let me know if you can access the WebU.
Have you also installed the MQTT addon?

I already started the addon, I wanted to post screenshots but I am limited to one per post.
I already use the MQTT addon for zigbee2mqtt.

Ok cool, I suggest to start with the MQTT setting of Rhasspy and make it external.
Make it connect to the HA addon by adding the ipadress and port into.
Set the credentials as well if needed.

You also should be able to post more pictures now, please try

I had done that already, just not sure how to test if it works as there is no “test” button…

Please advise about the other settings necessary.

You can connect to the MQTT broker and subscribe to hermes/audioServer/NAS/audioFrame. There should be a huge amount of messages coming in. That is the audio stream to Rhasspy.

Yes, you need the wakeword. Otherwise Rhasspy will not start to listen.
It is the Hey Google or Alexa for Rhasspy. You can select the one you prefer, I use Snowboy but porcupine is also good.

I am not sure about you Audio Recording setting, maybe press Test and see what is does.
I do not if it should be set to default or maybe you have the Respeaker as a settings as well

thanks. Currently no clue how to connect to the mqtt server to check, will do that later. lets assume it works.

Regarding audio recording:
The Test button doesn’t do anything but when I check the logs it has done something:

[DEBUG:2021-06-24 07:50:00,492] rhasspyserver_hermes: -> AudioGetDevices(modes=[<AudioDeviceMode.INPUT: 'input'>], site_id='NAS', id='8f2442f3-5876-4c5d-93bc-7b01d1ef3c02', test=True)

These are the audio options:

Here’s waht I set for the wakeword, I chose porcupine apparently snowboy needs an online connection and other more complicated stuff. I just need a simple working setup.

Any hints on what to chose for the other settings? They re more or less on defaults I think.
image

No, it does not but porcupine should work fine :slight_smile:

The default audio device says its working, so let’s indeed assume it does :slight_smile:

Do you already have some sentences configured?

Cool, do the other settings like Sppeech to text, intent recognition, text to speech, audio playing, dialogue mgm and intent handling matter for my use case?

No sentences setup yet and like I said I’d be happy to be able to trigger a switch on/off. Say I have a switch (actually a zigbee switch plug) called LoungePlugFairy where I plugged some fairy lights in.

How would I go about being able to turn those on/off via rhasspy?

I do not know your use case, but you have set should work.

Well, without sentences filled (and intents), nothing will happen :wink:
You need Rhasspy to recognize and intent and the intenthandler (Home Assistant) to do something with it.

Have you also installed the MQTT addon?

Why do you need to install mqtt if rhasspy is install as add-on ? Could you explain please ?

Thank you

Because when you want to send a response back to Rhasspy (for instance a spoken confirmation), you need to publish a message on the endSession topic.
Home Assistant can do that with the mqtt.publish service.
So if you connect both Rhasspy and Home Assistant to the same broker, it makes things much more easy.
You could also configure HA to use Rhasspy’s broker however, if that is what you’d prefer.

1 Like

Don’t use Rhasspy on HA Core. It just bricked my setup.

At the microphone setup phase, it

  1. wouldn’t detect any of the 2 devices connected (a USB standalone mic and a Logitech headset)
  2. hung repeatedly, making the supervisor unresponsive
  3. finally, the Pi won’t boot anymore.

You mean the addon? Runs fine for over a year in my setup.
Are you sure it is not the SD card failing?

Definitely. Exceptions seem to be handled poorly. Accessing the console I can see that HA responds for a few minutes (no UI access though), until it just hangs. Was it an USB enumeration issue, or something else, I don’t know.

I didn’t know the name of the integration to try and uninstall it through console, and just typing ‘addons’ rushes the entire list past the screen buffer :frowning:
After a few hangs, it just went into the ‘emergency console’…

Serves me right for enabling it on startup.

Ok strange, I think you are the first one having these issues with Rhasspy and HA.
Typing addons will indeed list all available addons.

Maybe there are more people who have this issue and hopefully they reply in this topic.

I’ve gone out and purchased another microphone, just to try… No dice. Rhasspy just won’t recognize them at all. PySound, arecord… nothing. That’s a total of four different mics so far (two standalones, one from the Logitech headset, and another from a Logitech webcam) :confused:

I’m now going for a dedicated Pi to try it out. If I manage there and verify the hardware, I’d be willing to go back and try to debug the issue with Hassio if you want.

EDIT: Works like a charm on a dedicated Pi. Both standalone microphones recognized, didn’t even bother with the headset and camera. Tried exchanging Pi’s while I was at it, and Rhasspy causes the Hassio supervisor to hang, like before.

Just installed Rhasspy on HA Supervised install. I have 2 usb microphone devices that are recognised by the OS and HA in the System Hardware list.
In Rhasspy they come up as “Working” when selecting arecord in Audio Recording but not when PyAudio is selected. Only see default*(1) and pulse(0) and neither will test as ok.
Is there something I am missing?
TIA
EDIT: All fixed. Did a manual install of pyaudio and now pulse(0) and default*(1) are now showing as working.
EDIT: And then it’s not working!