Problem passing information from rhasspy to node-red


I am quite new to rhasspy and currently try to get it running, but run into an issue when I try to pass informations from rhasspy to node-red. I could not found specific information about this problem, as most issures seem to start after my problem :slight_smile: I have followed the tutorial at the rhasspy documentation homepage to get the JSON intent transfer working. The current status is, the command recognition works well and a JSON intend is triggered from rhasspy. But node-red does not recive any information. On the node-red side, I used the pre-configured flow from the tutorial. I tried different configurations for the websocket (URL with slash and without at the beginning, different sideIDs and the manual creation of this basic flow) but without success. The websocket always stated “not connected”.

As many other in this forum seems not to have this issue, i assume it has something to do with my system configuration. Does any of you have an idea what could be wrong or what i could test?

My system configuration is the following:
Rhasspy 2.5.0 (docker)
Node-red 1.0.6
Ubuntu 20.04
All inside a virtual box.

Many thanks in advance!

i got a question to your setup first.
Do you also run node-red in a docker container ?

Yes, the question is: is Rhasspy available on localhost:12101 as seen from Node-RED? You may have to use rhasspy:12101 (or Rhasspy’s container name) if Node-RED is running in Docker, because localhost is then referring to Node-RED’s container, not to your VM.

1 Like

Thank you for your fast response!
Yes, both rhasspy and docker are running each inside a docker container. And thanks @koan, your suggestion leaded me to the solution. There was an issue with the data forwarding between the containers.
I had to use the Ip adress of the docker adapter, as described here:

I always define my containers in a Docker Compose file. For Node-RED and Rhasspy this looks like this:

version: '3.7'

    image: nodered/node-red
    container_name: node-red
    restart: always
      - ./containers/node-red:/data
      - /etc/localtime:/etc/localtime:ro
      - 1880:1880
    image: rhasspy/rhasspy
    container_name: rhasspy
    restart: always
      - ./containers/rhasspy/profiles:/profiles
      - /etc/localtime:/etc/localtime:ro
      - 12101:12101
    command: --user-profiles /profiles --profile en

Note the container_name addition for each container. This lets all containers refer to the IP address of this container by using its container name as a hostname. Moreover, Docker Compose creates a virtual network for all containers defined in this file so they can reach each other.

1 Like

Thank you!!!

I was using “localhost” instead of “rhasspy” and my websocket input node wasn’t able to connect. Everything ok now.