Posts: 176
Threads: 44
Joined: Mar 2016
Reputation:
0
2018-02-20, 04:46 PM
(This post was last modified: 2018-02-20, 04:52 PM by Alpenskipper.)
Hi!
To clean up my node mess in node red, I want to split instrument and sensor nodes on two tabs in the node red dashboard. (picture)
As soon as I use the signalkweb socket listener node (ws://localhost:3000/signalk/v1/stream ) on more then one tab, no data is transfered. When I delete the scond the signalkweb socket listener node, the data is streames again.
Is there a solution to use the same signalk data stream on several tabs?
Martin
Posts: 1,168
Threads: 98
Joined: Mar 2016
Reputation:
69
2018-02-20, 05:02 PM
(This post was last modified: 2018-02-20, 05:08 PM by PaddyB.)
(2018-02-20, 04:46 PM)Alpenskipper Wrote: Is there a solution to use the same signalk data stream on several tabs?
You could either use link nodes or put the data into global variables. There's a handy node called contextbrowser which displays the values of node/flow/global variables in the side bar.
https://www.npmjs.com/package/node-red-c...extbrowser
Posts: 176
Threads: 44
Joined: Mar 2016
Reputation:
0
Thanks Paddy!
The link node is what I needed. Sitll a lot to learn about node red, but worth it!
Martin
Posts: 800
Threads: 46
Joined: Jun 2017
Reputation:
25
2018-02-20, 07:50 PM
(This post was last modified: 2018-02-20, 08:04 PM by jim321.)
i have also used a mqtt out node to send the websocket to another computer or tab.seems to work
the link node is probably the correct way
Code: [{"id":"f9b8ac34.ac186","type":"websocket in","z":"217cab7.d842f54","name":"ws","server":"d009e142.23546","client":"","x":85,"y":159.6666612625122,"wires":[["33b5ed11.586bc2","1be6a5e8.8fb36a","157ee13a.40ff0f","897027a1.6c99c8"]]},{"id":"897027a1.6c99c8","type":"mqtt out","z":"217cab7.d842f54","name":"","topic":"ws","qos":"","retain":"","broker":"d83d8d21.7359e","x":218,"y":181,"wires":[]},{"id":"d009e142.23546","type":"websocket-listener","z":"","path":"ws://localhost:3000/signalk/v1/stream","wholemsg":"false"},{"id":"d83d8d21.7359e","type":"mqtt-broker","z":"","name":"","broker":"192.168.1.104","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]
Posts: 173
Threads: 15
Joined: Jun 2017
Reputation:
6
2018-02-22, 12:17 AM
(This post was last modified: 2018-02-22, 12:19 AM by Opie91.)
(2018-02-20, 07:50 PM)jim321 Wrote: i have also used a mqtt out node to send the websocket to another computer or tab.seems to work
the link node is probably the correct way
Code: [{"id":"f9b8ac34.ac186","type":"websocket in","z":"217cab7.d842f54","name":"ws","server":"d009e142.23546","client":"","x":85,"y":159.6666612625122,"wires":[["33b5ed11.586bc2","1be6a5e8.8fb36a","157ee13a.40ff0f","897027a1.6c99c8"]]},{"id":"897027a1.6c99c8","type":"mqtt out","z":"217cab7.d842f54","name":"","topic":"ws","qos":"","retain":"","broker":"d83d8d21.7359e","x":218,"y":181,"wires":[]},{"id":"d009e142.23546","type":"websocket-listener","z":"","path":"ws://localhost:3000/signalk/v1/stream","wholemsg":"false"},{"id":"d83d8d21.7359e","type":"mqtt-broker","z":"","name":"","broker":"192.168.1.104","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]
With the same basic idea I have sent the signal K stream to mqtt and had it come in on another pi running openplotter in my basement.
I use the second pi as a poor mans FRED server with no node limits or subscription fee.
|