WS node question

112 views
Skip to first unread message

Toshi Bass

unread,
Mar 18, 2016, 9:08:16 AM3/18/16
to Node-RED
I am controlling 8 esp8266 based units with 8 separate flows with blynk ui ( there a mixture of sonoff, slampher, wemos di mini, and standard esp boards ) 

I have just built a web page with switches and gauges etc which interacts with node-red via websocket nodes at the moment I have only 1 ws input node, but the 1 ws output node has loads of wires linking up to the 8 flows its a right mess but it works fine.

So here's the question .. I can make multiple output nodes for each flow to tidy everything up 
or would there be less overhead if I put 1 ws output node into a subflow and link all the flows with the relative sub flow nodes ?
or does it not make a difference which way I do it ?


Dave C-J

unread,
Mar 19, 2016, 7:03:38 PM3/19/16
to node...@googlegroups.com
outbound I think you can have lots of ws nodes specify the same endpoint - though each will make a connection to the remote web page - so as long as that doesn't matter you can do that.

cflurin

unread,
Apr 29, 2016, 1:13:57 PM4/29/16
to Node-RED
I have a similar use case (see my post in Slack). I'd like to connect node-RED with homebridge-websocket however, it works only with one connection. Is it imaginable to expand websocket for this purpose?

Julian Knight

unread,
Apr 30, 2016, 9:11:04 AM4/30/16
to Node-RED
I tried that kind of approach early in my experimentation with Node-Red. In the end though, I found it a lot easier and more robust to use MQTT. As long as your broker supports MQTT over websockets, it is easy to pub/sub from NR, web pages and the ESP8266 directly.

Dave C-J

unread,
Apr 30, 2016, 9:17:57 AM4/30/16
to node...@googlegroups.com
As Ben said you can wire as many things to the websocket as you want... what you don't have (yet) is a simple way to wire between flows on different tabs so you can get to the websocket node on another tab. This "link" node will appear in the next release.

cflurin

unread,
May 1, 2016, 8:45:39 AM5/1/16
to Node-RED
@Julian Knight, @Dave C-J: thanks, homebridge-websocket is a simple ws server that allows only one connection to a ws client. I think I'll be able to implement my use case using the link node, let's see.
Reply all
Reply to author
Forward
0 new messages