The server DOES process the intent correctly – the light turns on or off as requested. The server is just throwing an error when I try to send the end session back.
I talk about the app specifically because you can also host rhasspy on a rasperry pi as a satellite and i don’t want to confuse between them.
The app just fires the intent to home assistant or whatever and assumes it was handled and ends the session, there is no need to call end session from outside. If you want to end the session there is currently only mqtt as option as described above.
I knew that the main software could also be used to run in a satellite. That’s why I verified that you meant your android app. My point was that the server is properly processing the intent when the app sends it. But I’m stuck telling the server to send the endSession.
In an effort to troubleshoot this, I added a debug node to the output of the node that is supposed to set up the endSession parameter.
When I send the intent via the Rhasspy webUI, the debug node only shows once.
But when I send the intent via the app, the debug node shows twice. Here’s a short (30 something second) video so you can see what I mean.
Edit to add: I’ve also noticed if I attempt to send a request shortly after one has already processed, it fails. My guess is the app doesn’t know that the previous request was in fact processed so it refuses the new one. I don’t know that for sure though.
A thank you, now i understand what the problem is!
When you further inspect your incoming event you will recognized that it once get’s fired by the server and once by the satellite.
This is because when you use mqtt as intent recognition the server will always also handle it.
The server processes it by recognizing the correct intent by the text. Then it handles it by sending it to homeassistant, the app is doing the same → it gets fired twice. You don’t need to tell the app that the intent has been handled.
That makes a little more sense to me. But all the sentence and slot info (needed to determine the intent info that should be sent to HA) is on Rhasspy server.
If the app is also sending intent info to HA, how does it know WHAT to send? If the app has the ability to send the info to HA directly, what is the Rhasspy server for?
The app knows what to send by using the intent recognition service of the server. It’s just a very modular design because it wanted to give maximum flexibility but that also leads to some complexity in setup.
I plan on adding a setup guide to the app to simplify this process and make it clearer on what certain services do.
That would be helpful. Since I don’t want the intent processed twice, do I need to turn off remote intent handling? If I do that, will the mobile app always have the latest versions of sentences and slots?
I decided to try turning of Intent Recognition and Intent Handling both. Having done so, the server does correctly process the request and only once. But my second question still remains: will the app be kept up to date when changes are made on the server to the sentences and slots?
It should work when your server has added the client Side Id in the wakeword site Ids list.
It works by sending small packages to your server all the time (this floods mqtt a little bit), so i would advice you to either create multiple porcupine accounts or use udp instead.
For udp you add the server address in the app and then in your server u add the docker container ip address as udp audio input. Like 172.17.0.2:20000, you can use multiple devices as udp input by naming them like so: 172.17.0.2:20000:mobile1 … (i haven’t tried that yet)