I am trying to setup the home assistant integration, but when I use the Send **intents** to Home Assistant (/api/intents) option under Settings -> Intent Handling, and I test a sentence under the Speech tab, I get the error: 404 Client Error: Not Found for url: https://path.to.homeassistant:8123/api/intent/handle
When I use the event option, all works fine. I want to use the intent option though because I want HA to respond with some text and I can not find any documentation how to do that with events.
This is the intent_script configuration from HA:
intent_script:
Test:
speech:
text: Hi there from Hass IO
action:
service: notify.notifier_telegram
data_template:
message: Hello from an intent!
I believe that the HA part is correct but I don’t know how to verify that.
The reason I think it fails on the Rhasspy side, is that the link under the intent option in the settings page to the HA intent integration is dead.
I have Rhasspy running on a RPI 3 in docker.
Hassio is running on a separate ubuntu server also in Docker
I hope someone can help me with having HA responding back to Rhasspy.
Thanks in advance.
Hi @petergoes, I may have been a bit premature in adding that feature to Rhasspy. Home Assistant has support for /api/intent/handle in the latest development branch, but it hasn’t been officially released yet.
You can take the approach @frkos suggests using events, or you can sneak your intents in the back door by enabling MQTT and the enabling the snips integration. You shouldn’t actually need to install Snips; the HA integration should pick up the MQTT messages from Rhasspy if you have MQTT enabled in both places (HA and Rhasspy), and connect them to the same broker.
I’m eagerly awaiting the next release of HA so we can finally have native intent handling without such hacks
btw… there’s absolutely NO mention about intent: in the hass doc i just got the intent thing working without errors and now i need asststisnt to make it work
I’m getting a 401 error using “Home Assistant” Intent Handling on my satellite, with HASS URL of http://192.168.1.98:8123/ and Send intents selected.
I guess 401 is better than a 404, at least
[DEBUG:2021-05-09 19:02:58,596] rhasspyhomeassistant_hermes: http://192.168.1.98:8123/api/intent/handle
[ERROR:2021-05-09 19:02:58,710] rhasspyhomeassistant_hermes: handle_home_assistant_intent
Traceback (most recent call last):
File "/usr/lib/rhasspy/rhasspy-homeassistant-hermes/rhasspyhomeassistant_hermes/__init__.py", line 169, in handle_home_assistant_intent
response.raise_for_status()
File "/usr/lib/rhasspy/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 1005, in raise_for_status
headers=self.headers,
aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url=URL('http://192.168.1.98:8123/api/intent/handle')
[ERROR:2021-05-09 19:02:58,717] rhasspyhomeassistant_hermes: handle_intent
Traceback (most recent call last):
File "/usr/lib/rhasspy/rhasspy-homeassistant-hermes/rhasspyhomeassistant_hermes/__init__.py", line 88, in handle_intent
assert response_dict, f"No response from {self.url}"
AssertionError: No response from http://192.168.1.98:8123/
[ERROR:2021-05-09 19:03:24,620] rhasspydialogue_hermes: Session timed out for site rem1: rem1-porcupine_raspberry-pi-031df962-346d-4560-97ee-4f4e5ce99a12
[DEBUG:2021-05-09 19:03:24,624] rhasspydialogue_hermes: -> AsrStopListening(site_id='rem1', session_id='rem1-porcupine_raspberry-pi-031df962-346d-4560-97ee-4f4e5ce99a12')
[DEBUG:2021-05-09 19:03:24,625] rhasspydialogue_hermes: Publishing 99 bytes(s) to hermes/asr/stopListening```
My satellite is a RasPi 3B running a fresh install of Raspberry Pi OS desktop and Rhasspy with a ReSpeaker 4-mic HAT. Being fairly new to all this I am trying to avoid installing lots of other things (like docker or venv) I don't understand and will increase the opportunities for failure.
My base HA server is a RasPi4 running Home Assistant OS with Rhasspy Add-on. When i say a voice command to the satelite, the base's Rhasspy home page is regognising and showing it - but not actioning it.