Can I use different port for websocket comms

You know the phrase - there's no such thing as a stupid question....

I know how to spell websickets but that's about as far as it goes but I've managed to get a Scratch extension to connect to a websocket listener (if thats the right terminology) running on Node-RED

JS code in my Scratch3 extension

image

Can I use a different socket from 1880?

Is so - whats the the syntax/config to change it to using port 9000?

No, you cannot. It only knows how to listen on the same server as Node-RED.

You could change Node-RED to listen on port 9000, but then you access it all on that port, including the editor. That's done via the settings file.

1 Like

Ta :slight_smile:
I'll run up one of @TotallyInformation alternative instances running on 9000

1 Like

RESULT :slight_smile:

1 Like

Is there a particular reason that you are using scratch and trying to connect it with NR? There is a blockly node available for NR that will allow you to use that programming interface directly in Node-red instead of a function node. Just FYI.

node-red-contrib-blockly

:slight_smile:

I've spent quite a considerable amount of my programming life using Scratch and developing extensions for it - see simplesi.net

I use it all the time in my flows :slight_smile: