node-red-contrib-dynamic-websocket
Version:
A node that dynamically connects to a WebSocket URL, can send and receive messages, and reports connection state changes.
143 lines • 3.17 kB
JSON
[
{
"id": "a964c1ed78f49693",
"type": "dynamic-websocket",
"z": "b01c1830d752542b",
"name": "",
"url": "",
"x": 1920,
"y": 1120,
"wires": [
[
"3423a5ba22b9343a"
],
[
"9bda9fd1bd549f79"
],
[
"61af331c87b98e5f"
]
]
},
{
"id": "36a89bed0f435ac7",
"type": "inject",
"z": "b01c1830d752542b",
"name": "Connect on Deploy",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 1390,
"y": 1120,
"wires": [
[
"6312880702e1ab51"
]
]
},
{
"id": "6312880702e1ab51",
"type": "function",
"z": "b01c1830d752542b",
"name": "wss://example.org:6555",
"func": "msg.url ='wss://example.org:6555';\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1630,
"y": 1120,
"wires": [
[
"a964c1ed78f49693"
]
]
},
{
"id": "3423a5ba22b9343a",
"type": "debug",
"z": "b01c1830d752542b",
"name": "Message",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 2140,
"y": 1060,
"wires": []
},
{
"id": "9bda9fd1bd549f79",
"type": "debug",
"z": "b01c1830d752542b",
"name": "Message",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 2140,
"y": 1120,
"wires": []
},
{
"id": "61af331c87b98e5f",
"type": "debug",
"z": "b01c1830d752542b",
"name": "Message",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 2140,
"y": 1180,
"wires": []
},
{
"id": "2f9c3275df9a8c4a",
"type": "inject",
"z": "b01c1830d752542b",
"name": "Close",
"props": [
{
"p": "close",
"v": "true",
"vt": "bool"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 1690,
"y": 1160,
"wires": [
[
"a964c1ed78f49693"
]
]
}
]