Issue with custom entity in listen-for-command api call

Hi,
i havent been using rhasspy in a while but just updated my system to the latest release and playing arround with it for a bit again.
I had previously set up node red flow to handle an intent which may ask the user to answer a simple yes or no question. For Example, i tell rhasspy that i want to take a bath, it then checks the temperature in the bathroom and if its below a certain threshold it asks me if i want to turn on the heater and waits for my response.
For this i used /api/listen-for-command?entity=callback&value=bathroom, so rhasspy wakes up and listens for the answer and then publishes another event with the callback information so in nodered i could filter for the specific callback.

This does not seem to work anymore with 2.5.9 atm. Rhasspy wakes up and listens but wont send my custom entity and value back after it recongized the intent.
Am i doing something wrong or is this broken atm? Maybe there is another solution for something like this?

Thanks!

I did some more testing and the custom entity won’t be added to the intent published using websocket or mqtt/hermes.
It does show up in the http response tho aftere an intent was recognized:

{
  "type": "intent",
  "value": {
    "asrConfidence": null,
    "asrTokens": [
      [
        {
          "confidence": 1,
          "rangeEnd": 4,
          "rangeStart": 0,
          "time": null,
          "value": "true"
        }
      ]
    ],
    "customData": null,
    "id": "59362a5a-e312-4509-b6c4-a1629d915413",
    "input": "true",
    "intent": {
      "confidenceScore": 1,
      "intentName": "boolean"
    },
    "lang": null,
    "rawInput": "yes",
    "sessionId": "59362a5a-e312-4509-b6c4-a1629d915413",
    "siteId": "livingroom",
    "slots": [
      {
        "confidence": 1,
        "entity": "boolean",
        "range": {
          "end": 4,
          "rawEnd": 3,
          "rawStart": 0,
          "start": 0
        },
        "rawValue": "yes",
        "slotName": "boolean",
        "value": {
          "kind": "Unknown",
          "value": "true"
        }
      },
      {
        "confidence": 0,
        "entity": "callback",
        "range": null,
        "rawValue": "bath",
        "slotName": "callback",
        "value": {
          "value": "bath"
        }
      }
    ],
    "wakewordId": null
  }
}

The boolean intent is the spoken intent, the callback intent was supplied using the listen-for-command http api call.
@synesthesiam Is this a bug that the supplied intent wont show up in hermes/websocket?

I can use the http response tho for my flow instead, then the custom entity isnt really needed anymore tho.

Not a bug, per se, but something that needs extra work. Thanks for digging into this :+1:

The custom entities only exist in the HTTP handler right now; the rest of the Rhasspy services are unaware of them. I think the only real solution is going to be to thread them through the Hermes messages, otherwise there’s no way they can end up in the NLU intent at the end.

I’ve created an issue here to remind me: https://github.com/rhasspy/rhasspy/issues/190

1 Like

Thanks for the reply.
Ah ok, it worked with ha events in the past as well but this was using a way older version and rhasspy changed a lot since then i guess.

Using the http api and its respons in nodered works for my use case atm even better than seperately fired events so no rush :smiley:

1 Like