rhasspy / rhasspy-server-hermes

Web server interface to Rhasspy with Hermes back-end
MIT License
4 stars 18 forks source link

"Recognize" button in doesn't appear to post intents to intent handler when "Handle" is selected #22

Closed jonathandann closed 3 years ago

jonathandann commented 3 years ago

To reproduce:

  1. Set up Home Assistant to handle "GetTime" intent
  2. Go to index.html in Rhasspy
  3. Type "what time is it".
  4. Select "Handle" checkbox
  5. Click "Recognize"

mosquitto_sub -t \# shows the intent is being posted. However the Home Assistant /api/intent/handle API is never called.

Looking at: https://github.com/rhasspy/rhasspy-server-hermes/blob/0cb3d2b4afdd4c0412de2a5e56d37d980d195e6b/templates/index.html#L391 The boolean in the above link is toggled by the "Handle" checkbox in the main web interface. The result of the "Recognize" button is to call setIntent() which displays the intent data returned from /api/text-to-intent. /api/text-to-intent is implemented here: https://github.com/rhasspy/rhasspy-server-hermes/blob/a354e2062677e779a292090f850803f2ae79964b/rhasspyserver_hermes/__main__.py#L1403 which optionally toggles intent handling on or off. However the intent is never actually posted to the handler (i.e. Home Assistant) as far as I can tell.

synesthesiam commented 3 years ago

In your Rhasspy settings, do you have Home Assistant set as the intent handling system?

jonathandann commented 3 years ago

@synesthesiam I do, yes. My profile.json has this entry:

"handle": {
    "system": "hass"
},
jonathandann commented 3 years ago

@synesthesiam Sorry for the noise. My firewall was blocking the rhasspy container from talking to my home assistant container (via an nginx proxy container).