Rhasspy offline voice assistant toolkit

Is there a way to increase the loging or somewhere else I can look? I’d be happy to try and help but so far I haven’t seen anything useful in any logs.

I do have an MQTT broker already on my server, but thought websockets would be better in the long run. Both Rhasspy and node-red are containers on the same server so they should communicate without issue.

But I’m a novice so not sure how to investigate :man_shrugging:.

Deadend

I appreciate the offer :slight_smile:
I think the problem is just that the websocket library I’m using is old and doesn’t play nice with the rest of Rhasspy. I’ve been meaning to upgrade to Quart for some time, which has native support for websockets. I have a side branch with some of it done, but it’s untested.

If you’re interested, here’s where the current websocket code is.

I also have a feature request, can you generate an event when no intent is captured?
This way, I can give TTS feedback on an unknown / empty intent

Hi there!
Although there is a lot described I cannot get Rhasspy to work on Hass.io on Pi3. I installed Rhasspy Assistant using the reposity. It runs well and I can define sentences. However it is not sending anything to HA (no automation is triggered).
What am I missing in configuration HA or Rhasspy to communicate? Do I have to set something in the settings of Rhasspy and/or add something to configuration.yaml? Enable API somehow??
Please help this noob! FYI: I am running HA by SSL (https://my-ip:8123)

Can you post your sentences and automations?

1 Like

Sure, no problem :slight_smile: It’s been added to the latest release (which includes the GStreamer audio input). I’m properly publishing hermes/nlu/intentNotRecognized when no intent is recognized.

2 Likes

Welcome, @Donkie

This is probably the issue, but something that’s easily remedied. In your Rhasspy Settings tab, jump down to the Home Assistant section and check the Hass URL. You’ll probably need to change http to https for it to connect :slight_smile:

Great news!

I tested (docker image) the latest release, and can confirm (for me at least) that the websocket delay is gone! I was only able to test for 10-15 minutes, but it was a massive improvement for my setup. The websocket still goes to disconnected in Node-Red, but I think that is just a minor bug as it still works when it says disconnected (I assume it reconnects and just isn’t updated correctly).

I had the websocket and both rhasspy and hermes MQTT topics going to a debug node and they all three populated simultaneously.

Thank you very much for the work! I am super excited to implement this voice control!!!

DeadEnd

1 Like

You’re welcome :slight_smile: Happy Rhasspy-ing!

I’ve tried many combinations like https://my-ip with or without port number, localhost etc but everytime I get an error:
“HomeAssistantIntentHandler - Can’t contact server - Unable to reach your Home Assistant server at https://my-ip. Is it running?”
What do I have to fill in exactly? And is there nothing I have to enable in HA or add to configuration . yaml to get communication running?

@Romkabouter: I think it is not related to automation sentences since the automations are never triggered according HA.

Well, you might just have inproper triggers :wink:

In my setup is http://hassio/homeassistant/, that is the default. You do not have to enable anything special

Tried that and same with https but still the same issue.
If I use this link (http or https) as URL in my browser I also dont reach any site of webserver, do you??

No, the URL is gives a network not reached. Strange, I know :smiley:

Acces token and API password are empty as well

Is there actually anything in the log? Does the wakeword get triggered and are events sent?

It is try to send the event but I get an error:
‘Invalid URL https:/hassio/homeassistant/api/events/rhasspy_GetTime: No host supplied’

Setting are idential as yours except I’ve also tried the URL with HTTPS (same result).
Sure there is nothing to add to configuration.yaml or to the config of the Rhasspy Assistant:
{
“user_dir”: “/share/rhasspy/profiles”,
“profile”: “en”,
“ssl”: true,
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”
}

PS tried disabling SSL and use the http expression but same results…

[ERROR:310003] HomeAssistantIntentHandler: handle_intent
Traceback (most recent call last):
File “/usr/share/rhasspy/rhasspy/intent_handler.py”, line 104, in in_started
intent = self.handle_intent(intent)
File “/usr/share/rhasspy/rhasspy/intent_handler.py”, line 145, in handle_intent
self.forward_intent(event_type, slots)
File “/usr/share/rhasspy/rhasspy/intent_handler.py”, line 159, in forward_intent
response = requests.post(post_url, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/requests/api.py”, line 116, in post
return request(‘post’, url, data=data, json=json, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/requests/api.py”, line 60, in request
return session.request(method=method, url=url, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/requests/sessions.py”, line 519, in request
prep = self.prepare_request(req)
File “/usr/local/lib/python3.6/dist-packages/requests/sessions.py”, line 462, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File “/usr/local/lib/python3.6/dist-packages/requests/models.py”, line 313, in prepare
self.prepare_url(url, params)
File “/usr/local/lib/python3.6/dist-packages/requests/models.py”, line 390, in prepare_url
raise InvalidURL(“Invalid URL %r: No host supplied” % url)
requests.exceptions.InvalidURL: Invalid URL ‘http:/hassio/homeassistant/api/events/rhasspy_GetTime’: No host supplied
[ERROR:309995] main: api_events_log

Odd question… but you don’t have a long lived access token in your Home Assistant setup in Rhasspy?

I’m out of the loop on your conversation, but if you want to communicate with Home Assistant from Rhasspy, you have to have the token created and linked.

If you need to create on you have to go to your profile page, create a new token, and then copy/paste it into Rhasspy… its in the Docs somewhere.

DeadEnd

Strange, I don’t have one but everything runs fine.