Home Assistant not recognizing intents

After a few months away from playing with Rhasspy and rebuilding my Home Assistant Instance I thought I’d start over with RPi3 running Rhasspy (instead of Rhasspy ona VM and Sat).

I’ve been taking things slowly and walking through the supplied Tutorials. I have Rhasspy setup to send intents to HA, I have a working HA token and I can do a test event with curl from my RPi to HA and see it when I listen to the event.

I haven’t gotten past trying to get GetTemperature working when using the “Recognize” field with the Handle box checked.
I think it’s a HA issue as this morning during my last test I saw this in my HA log:

File “/usr/src/homeassistant/homeassistant/components/intent/init.py”, line 68, in post
intent_result = await intent.async_handle(
File “/usr/src/homeassistant/homeassistant/helpers/intent.py”, line 62, in async_handle
raise UnknownIntent(f"Unknown intent {intent_type}")
homeassistant.helpers.intent.UnknownIntent: Unknown intent GetTemperature

My HA config is:
#Rhasspy Integration

    url: ''
    method: 'POST'
    content_type: text/plain
    payload: '{{payload}}'

intent_script: !include_dir_merge_list intents/

in my intents directory I have a file named get-temperature.yaml with the contents of:

    text: The temperature is {{ states.sensor.temperature }} degrees
    service: notify.notify
      message: Hello from an intent!

Am I missing something obvious?

In the docs there are two spaces before the intent name.
I do not use the dir_merge, you might want to try putting in it exactly like in the docs here (no dir_merge):

The speech part on the intent does not trigger your rest command, but the TTS on home assistant.

Good idea, I moved it back into the configuation.yaml file until I get a known working setup and then I’ll figure out how to split it out.

I have zero knowledge on how HA uses TTS. At this point I haven’t even gotten to knowing if Rhasspy will listen to my voice :slightly_smiling_face: I just want to make sure Rhasspy and HA are communicating properly.

If you are all new, I suggest using events instead of intents. For a couple of reasons

  • Events can be easily used in automations
  • Events are easy to debug because you can listen to them in de developers tab in HA.
  • There is more info on events then on intents (at least in my opinion, but it might be my lack if intent knowledge)
  • You can setup automations which call more than 1 service, one being a mqtt publish to hermes/dialogueManager/endSession to end a Rhasspy session correctly, including a speech message to the correct satellite and the other to do the actual action (turn a light on)
  • you will not need the rest_command at all.

To make it more comprehensive, here is my automation on the rhasspy_Lights event:

- id: '1581372525473'
  alias: EventLights
  - event_data: {}
    event_type: rhasspy_Lights
    platform: event
  condition: []
  - data_template:
      entity_id: light.{{ trigger.event.data.location }}
    service_template: light.turn_{{ trigger.event.data.action }}
  - service: mqtt.publish
      topic: hermes/dialogueManager/endSession
      payload_template: '{"sessionId": "{{trigger.event.data._intent.sessionId}}",
        "text": "Ok, {{ trigger.event.data.location }} {{ trigger.event.data.action}}"}'
  mode: single

This example listens to the rhasspy_Lights event, where Lights is the intent in the Rhasspy sentences with location and action as slots.

The trigger.event holds a lot of data, like the sessionId from Rhasspy. This way, Home Assistant will publish a payload to the endSession topic with a sessionId. The dialogueManager then closes the session with a spoken response. (“Ok, kitchen off”)

The rest_command you use just speaks the message but does not end a session.
The session on Rhasspy then eventually has a timeout and ends, but in my opinion that is not what you would want.

1 Like