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 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.
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.
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: https://stackoverflow.com/questions/17770902/forward-host-port-to-docker-container
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.