question

arrow1800 avatar image
arrow1800 asked

Websockets in node-red not working

Hi all,

Ik have a cerbo gx with node-red running on it. i am trying to create a websocket listener but i am not able to connect it. I also have another node-red installation running(no victron/cerbo, just a normal raspberry) where the following IS working.


node-red is running at: https://192.168.2.70:1881/

and the websocket is listening at: /ws/test

The url should then be: ws://192.168.2.70:1881/ws/test


Is there some kind of proxy blocking websockets on the cerbo gx perhaps?




Node-RED
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

3 Answers
Dirk-Jan Faber (Victron Energy) avatar image
Dirk-Jan Faber (Victron Energy) answered ·

I don't believe there is anything blocking it. And I think you want to use wss instead of ws. But I haven't done much with websockets so I might be wrong.
You might also want to check out the answer here, if it is the https part that is giving the problems.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Marius Marais avatar image
Marius Marais answered ·

It seems websocket connections are only supported on the /comm path by the nginix configuration.

So you need to configure your websocket listeners for /comm/xxx and then connect to wss://192.168.2.70:1881/comm/test

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

-gerhard avatar image
-gerhard answered ·

Could you bring it to work? I'm fighting with the same problem :(

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.