I'm using Node-Red v3.1.0 and NT 10.0.19045. My code is as follows:
[
{
"id": "2157535e595135c6",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "83ab13540db76534",
"type": "websocket out",
"z": "2157535e595135c6",
"name": "WS Server Out",
"server": "83ae3e14c71f11ab",
"client": "",
"x": 540,
"y": 340,
"wires": []
},
{
"id": "f304cc6cbb939f5c",
"type": "websocket in",
"z": "2157535e595135c6",
"name": "WS Server In",
"server": "83ae3e14c71f11ab",
"client": "",
"x": 250,
"y": 460,
"wires": [
[
"b2aa114626afeace"
]
]
},
{
"id": "b2aa114626afeace",
"type": "debug",
"z": "2157535e595135c6",
"name": "debug 2",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 500,
"y": 460,
"wires": []
},
{
"id": "7ee01a5d1c656be8",
"type": "comment",
"z": "2157535e595135c6",
"name": "WS Server /ws/test",
"info": "",
"x": 450,
"y": 280,
"wires": []
},
{
"id": "3c377ddf7c022da2",
"type": "inject",
"z": "2157535e595135c6",
"name": "status 1",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"status\":1}",
"payloadType": "json",
"x": 250,
"y": 320,
"wires": [
[
"83ab13540db76534"
]
]
},
{
"id": "9ea2af6953b005c5",
"type": "inject",
"z": "2157535e595135c6",
"name": "status 0",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"status\":0}",
"payloadType": "json",
"x": 250,
"y": 380,
"wires": [
[
"83ab13540db76534"
]
]
},
{
"id": "7bf565bdf93cdf88",
"type": "status",
"z": "2157535e595135c6",
"name": "Check Conect status",
"scope": [
"83ab13540db76534"
],
"x": 790,
"y": 340,
"wires": [
[
"8546c3f74650a9f7"
]
]
},
{
"id": "8546c3f74650a9f7",
"type": "debug",
"z": "2157535e595135c6",
"name": "debug 4",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1000,
"y": 340,
"wires": []
},
{
"id": "8b42b490a6d66ff1",
"type": "status",
"z": "2157535e595135c6",
"name": "Check Conect status",
"scope": [
"f304cc6cbb939f5c"
],
"x": 790,
"y": 460,
"wires": [
[
"2837a776f1458c39"
]
]
},
{
"id": "2837a776f1458c39",
"type": "debug",
"z": "2157535e595135c6",
"name": "debug 5",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1000,
"y": 460,
"wires": []
},
{
"id": "83ae3e14c71f11ab",
"type": "websocket-listener",
"path": "/ws/test",
"wholemsg": "false"
}
]