HomeAssistant: Node red TTS doesn't work


I’ve tried to build a flow on my Hassio Server in node red, that reports the current time back. (To my seperate Rhasspy)
Everything seems fine, till the http request node
Debugging shows the following message:

26.12.2019, 23:43:08node: text to speech
msg : error
“Error: connect ECONNREFUSED”

Properties of the http request node:

Text/time template:

Node red export:

{“id”:“cd059731.6ee218”,“type”:“switch”,“z”:“44c25cc8.f16f74”,“name”:“intent filter”,“property”:“intent.name”,“propertyType”:“msg”,“rules”:[{“t”:“eq”,“v”:“GetTime”,“vt”:“str”}],“checkall”:“true”,“repair”:false,“outputs”:1,“x”:450,“y”:160,“wires”:[[“84604ed0.e164b”,“b6c18ef7.bc265”]]}]

Can anyone help me?

Thank you in advance and happy holidays :evergreen_tree:

Hi, @Mondmonarch, thanks for trying Rhasspy!

Not sure exactly what the problem is, but I noticed your error gives the IP address “” but the URL in your settings starts with “http://192…”

I can’t read German, but you may try not using “Basic Authentication”. Rhasspy doesn’t support that (unless you’re doing a reverse proxy behind your own web server).

Okay, I disabled Basic Authentication and the same error is still occuring.
In your example flow on github https://github.com/synesthesiam/rhasspy/blob/master/examples/nodered/rgb-flow.js “Basic Authentication” is also enabled.

Are there any further steps needed in order to use tts?
Or does it work by simply:

  • adjusting the msg.payload to the corresponding answer string
  • sending the msg back through an http request node with the method post to the corresponding Rhasspy IP

I just recognised, that shortly after sending the time intend to Node red, the following error occurs:
Log (read from bottom to top)

[ERROR:50088298] quart.serving: Error in ASGI Framework
Traceback (most recent call last):
File “/usr/local/lib/python3.6/dist-packages/hypercorn/asgi/wsproto.py”, line 91, in handle_asgi_app
await asgi_instance(self.asgi_receive, self.asgi_send)
File “/usr/local/lib/python3.6/dist-packages/quart/asgi.py”, line 106, in call
await _cancel_tasks(pending)
File “/usr/local/lib/python3.6/dist-packages/quart/asgi.py”, line 189, in _cancel_tasks
raise task.exception()
File “/usr/local/lib/python3.6/dist-packages/quart/asgi.py”, line 157, in handle_websocket
‘code’: 1000,
File “/usr/local/lib/python3.6/dist-packages/hypercorn/asgi/wsproto.py”, line 149, in asgi_send
await self.asend(CloseConnection(code=int(message[“code”])))
File “/usr/local/lib/python3.6/dist-packages/hypercorn/asyncio/wsproto.py”, line 93, in asend
File “/usr/local/lib/python3.6/dist-packages/wsproto/init.py”, line 64, in send
data += self.connection.send(event)
File “/usr/local/lib/python3.6/dist-packages/wsproto/connection.py”, line 101, in send
“Connection cannot be closed in state %s” % self.state
wsproto.utilities.LocalProtocolError: Connection cannot be closed in state ConnectionState.CLOSED
[ERROR:50088291] main: api_events_intent
Traceback (most recent call last):
File “app.py”, line 957, in api_events_intent
text = await q.get()
File “/usr/lib/python3.6/asyncio/queues.py”, line 167, in get
yield from getter

Same error is still occuring. Does anyone has an idea?

Are you still using the same configuration for your http request node, as shown in the first Post?
The Error in that Post is most likely caused by your mistyped Url ( the screenshot shows “http://:” instead of “http://”).

If that is not the case, what version of Rhasspy are you using and do you have Text to Speech enabled in the settings ?