External MQTT Timeout Error

Hi folks, just discovered Rhasspy the other day and decided to see if it’s suitable for an offline voice assistant. Being familiar with Docker I have installed it in a container on my Debian server with the intention of it being the central processing hub and to use satellites to send/receive mqtt messages for audio. So, the service is running but no audio devices though, and as I have an external Mosquitto MQTT server v2.0.14 already installed I connected to that. The Rhasspy logs show that connection and subscriptions are okay, however if I enter text in the Recognize textbox and enter it, it fails as follows:

[DEBUG:2021-11-29 23:15:45,825] rhasspyserver_hermes: -> HandleToggleOff(site_id='central_server')

[DEBUG:2021-11-29 23:15:45,826] rhasspyserver_hermes: Publishing 28 bytes(s) to rhasspy/handle/toggleOff

[DEBUG:2021-11-29 23:15:45,826] rhasspyserver_hermes: Subscribed to hermes/error/nlu

[DEBUG:2021-11-29 23:15:45,827] rhasspyserver_hermes: -> NluQuery(input='what time is it', site_id='central_server', id='b45af726-279a-469c-99b2-fd2a031c60a9', intent_filter=None, session_id='b45af726-279a-469c-99b2-fd2a031c60a9', wakeword_id=None, lang=None, custom_data=None, asr_confidence=None, custom_entities=None)

[DEBUG:2021-11-29 23:15:45,827] rhasspyserver_hermes: Publishing 278 bytes(s) to hermes/nlu/query

[DEBUG:2021-11-29 23:15:53,853] rhasspyserver_hermes: Connected to MQTT broker

[DEBUG:2021-11-29 23:15:53,853] rhasspyserver_hermes: Subscribed to hermes/hotword/+/detected

[DEBUG:2021-11-29 23:15:53,853] rhasspyserver_hermes: Subscribed to hermes/nlu/intentNotRecognized

[DEBUG:2021-11-29 23:15:53,854] rhasspyserver_hermes: Subscribed to hermes/error/nlu

[DEBUG:2021-11-29 23:15:53,854] rhasspyserver_hermes: Subscribed to hermes/asr/textCaptured

[DEBUG:2021-11-29 23:15:53,854] rhasspyserver_hermes: Subscribed to rhasspy/asr/central_server/+/audioCaptured

[DEBUG:2021-11-29 23:15:53,854] rhasspyserver_hermes: Subscribed to hermes/audioServer/central_server/audioSummary

[DEBUG:2021-11-29 23:15:53,854] rhasspyserver_hermes: Subscribed to hermes/intent/#

[DEBUG:2021-11-29 23:15:54,565] rhasspydialogue_hermes: Connected to MQTT broker

[DEBUG:2021-11-29 23:15:54,565] rhasspydialogue_hermes: Subscribed to hermes/hotword/+/detected

[DEBUG:2021-11-29 23:15:54,565] rhasspydialogue_hermes: Subscribed to hermes/dialogueManager/startSession

[DEBUG:2021-11-29 23:15:54,566] rhasspydialogue_hermes: Subscribed to hermes/tts/sayFinished

[DEBUG:2021-11-29 23:15:54,566] rhasspydialogue_hermes: Subscribed to hermes/nlu/intentNotRecognized

[DEBUG:2021-11-29 23:15:54,566] rhasspydialogue_hermes: Subscribed to hermes/dialogueManager/endSession

[DEBUG:2021-11-29 23:15:54,566] rhasspydialogue_hermes: Subscribed to hermes/asr/textCaptured

[DEBUG:2021-11-29 23:15:54,566] rhasspydialogue_hermes: Subscribed to hermes/dialogueManager/configure

[DEBUG:2021-11-29 23:15:54,566] rhasspydialogue_hermes: Subscribed to hermes/audioServer/central_server/playFinished

[DEBUG:2021-11-29 23:15:54,567] rhasspydialogue_hermes: Subscribed to hermes/dialogueManager/continueSession

[DEBUG:2021-11-29 23:15:54,567] rhasspydialogue_hermes: Subscribed to hermes/intent/#

[DEBUG:2021-11-29 23:15:54,777] rhasspynlu_hermes: Connected to MQTT broker

[DEBUG:2021-11-29 23:15:54,778] rhasspynlu_hermes: Subscribed to rhasspy/nlu/central_server/train

[DEBUG:2021-11-29 23:15:54,778] rhasspynlu_hermes: Subscribed to hermes/nlu/query

[DEBUG:2021-11-29 23:16:15,850] rhasspyserver_hermes: -> HandleToggleOn(site_id='central_server')

[DEBUG:2021-11-29 23:16:15,851] rhasspyserver_hermes: Publishing 28 bytes(s) to rhasspy/handle/toggleOn

[ERROR:2021-11-29 23:16:15,851] rhasspyserver_hermes: 

Traceback (most recent call last):

  File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py", line 1821, in full_dispatch_request

    result = await self.dispatch_request(request_context)

  File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py", line 1869, in dispatch_request

    return await handler(**request_.view_args)

  File "/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/__main__.py", line 1452, in api_text_to_intent


  File "/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/__main__.py", line 2706, in text_to_intent_dict

    text, intent_filter=intent_filter, site_id=site_id

  File "/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/__init__.py", line 524, in recognize_intent

    handle_intent(), messages, message_types

  File "/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/__init__.py", line 995, in publish_wait

    result_awaitable, timeout=timeout_seconds

  File "/usr/lib/python3.7/asyncio/tasks.py", line 423, in wait_for

    raise futures.TimeoutError()

Plus I don’t see anything when watching my mqtt broker using MQTT.fx.
So, I tried using the internal mqtt server and it worked instantly BUT why? WHY does it not work with my external mqtt server? Any advice appreciated. Thanks.

What do you have as intent handler? If no intent handler, or no intenthandler ending the session then a timout will occur.

What do you mean with external MQTT already installed? Installed where? And what are the settings you have in Rhasspy?

Hi @romkabouter thanks for the reply. I don’t have an intent handler but that’s irrelevant. It works without an intent handler using the internal MQTT broker. I just listen for MQTT messages in Node-RED to see it working. I have an intent recogniser Fsticuffs. The external MQTT broker is installed in its own docker container, obviously Rhasspy can communicate with it okay as it connects and subscribes okay, it just doesn’t send any messages and timeouts. I’ll just stick to using the internal broker for now in order to get familiar with the product.


I have a similar problem using an external MQTT Broker causing not working audio devices.

Did you manage to get it fixed?