Node-red Back-end

This commit is contained in:
TomHr 2023-01-13 15:42:11 +01:00
parent e6407ff8ca
commit 0b8e1c5da7

572
M2Ext/flows.json Normal file
View file

@ -0,0 +1,572 @@
[
{
"id": "52189d14a3ef7d36",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "14c0f9c06395f6e1",
"type": "mqtt in",
"z": "52189d14a3ef7d36",
"name": "",
"topic": "EEGATT",
"qos": "0",
"datatype": "auto-detect",
"broker": "6963af9f21112230",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 280,
"y": 120,
"wires": [
[
"355efb54b068c5a3",
"3acd30b62d3d87f8"
]
]
},
{
"id": "90c37d5550d38a65",
"type": "mqtt in",
"z": "52189d14a3ef7d36",
"name": "",
"topic": "EEGMED",
"qos": "2",
"datatype": "auto-detect",
"broker": "6963af9f21112230",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 280,
"y": 200,
"wires": [
[
"a51e5746aa0b1263",
"5f141b16e7bf816d"
]
]
},
{
"id": "af1df7bbb1067dd2",
"type": "mqtt in",
"z": "52189d14a3ef7d36",
"name": "",
"topic": "EEGQUA",
"qos": "2",
"datatype": "auto-detect",
"broker": "6963af9f21112230",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 280,
"y": 320,
"wires": [
[
"e3bebe44171c9358",
"586301ca49caf3a2"
]
]
},
{
"id": "afe438bb253add00",
"type": "mqtt in",
"z": "52189d14a3ef7d36",
"name": "",
"topic": "EEGRAW",
"qos": "2",
"datatype": "auto-detect",
"broker": "6963af9f21112230",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 280,
"y": 460,
"wires": [
[
"404d932b33e575e7",
"2a7d98737f6adca0"
]
]
},
{
"id": "355efb54b068c5a3",
"type": "ui_gauge",
"z": "52189d14a3ef7d36",
"name": "",
"group": "7a9de4c6af267783",
"order": 1,
"width": 6,
"height": 4,
"gtype": "gage",
"title": "Attention",
"label": "%",
"format": "{{value}}",
"min": 0,
"max": "100",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"diff": false,
"className": "",
"x": 600,
"y": 120,
"wires": []
},
{
"id": "a51e5746aa0b1263",
"type": "ui_gauge",
"z": "52189d14a3ef7d36",
"name": "",
"group": "9d4d663874890350",
"order": 1,
"width": 6,
"height": 4,
"gtype": "gage",
"title": "Meditation",
"label": "%",
"format": "{{value}}",
"min": 0,
"max": "100",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"diff": false,
"className": "",
"x": 610,
"y": 200,
"wires": []
},
{
"id": "e3bebe44171c9358",
"type": "ui_gauge",
"z": "52189d14a3ef7d36",
"name": "",
"group": "66728c304447e52f",
"order": 1,
"width": 6,
"height": 4,
"gtype": "gage",
"title": "Quality",
"label": "units",
"format": "{{value}}",
"min": 0,
"max": "200",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "100",
"seg2": "200",
"diff": false,
"className": "",
"x": 600,
"y": 300,
"wires": []
},
{
"id": "3acd30b62d3d87f8",
"type": "ui_chart",
"z": "52189d14a3ef7d36",
"name": "",
"group": "7a9de4c6af267783",
"order": 2,
"width": 6,
"height": 4,
"label": "Attention (%)",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "0",
"ymax": "100",
"removeOlder": "5",
"removeOlderPoints": "",
"removeOlderUnit": "60",
"cutout": 0,
"useOneColor": false,
"useUTC": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"outputs": 1,
"useDifferentColor": false,
"className": "",
"x": 610,
"y": 160,
"wires": [
[]
]
},
{
"id": "5f141b16e7bf816d",
"type": "ui_chart",
"z": "52189d14a3ef7d36",
"name": "",
"group": "9d4d663874890350",
"order": 2,
"width": 6,
"height": 4,
"label": "Meditation (%)",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "0",
"ymax": "100",
"removeOlder": "5",
"removeOlderPoints": "",
"removeOlderUnit": "60",
"cutout": 0,
"useOneColor": false,
"useUTC": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"outputs": 1,
"useDifferentColor": false,
"className": "",
"x": 620,
"y": 240,
"wires": [
[]
]
},
{
"id": "586301ca49caf3a2",
"type": "ui_chart",
"z": "52189d14a3ef7d36",
"name": "",
"group": "66728c304447e52f",
"order": 2,
"width": 6,
"height": 4,
"label": "Quality",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "0",
"ymax": "255",
"removeOlder": "5",
"removeOlderPoints": "",
"removeOlderUnit": "60",
"cutout": 0,
"useOneColor": false,
"useUTC": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"outputs": 1,
"useDifferentColor": false,
"className": "",
"x": 600,
"y": 340,
"wires": [
[]
]
},
{
"id": "733b16acb7eaf352",
"type": "ui_text",
"z": "52189d14a3ef7d36",
"group": "66728c304447e52f",
"order": 3,
"width": 0,
"height": 0,
"name": "",
"label": "Hodnota 0 je nejlepší kvalita signálu. Hodnota 200 znamená, že čelenka není nasazena.",
"format": "{{msg.payload}}",
"layout": "row-center",
"className": "Legenda",
"x": 490,
"y": 20,
"wires": []
},
{
"id": "404d932b33e575e7",
"type": "ui_gauge",
"z": "52189d14a3ef7d36",
"name": "",
"group": "2a8a7431a95421e5",
"order": 1,
"width": 6,
"height": 4,
"gtype": "gage",
"title": "Raw data",
"label": "",
"format": "{{value}}",
"min": " -32768",
"max": "32768",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"diff": false,
"className": "",
"x": 600,
"y": 420,
"wires": []
},
{
"id": "2a7d98737f6adca0",
"type": "ui_chart",
"z": "52189d14a3ef7d36",
"name": "",
"group": "2a8a7431a95421e5",
"order": 2,
"width": 6,
"height": 4,
"label": "Raw data",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "-32768",
"ymax": "32768",
"removeOlder": "5",
"removeOlderPoints": "",
"removeOlderUnit": "60",
"cutout": 0,
"useOneColor": false,
"useUTC": false,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"outputs": 1,
"useDifferentColor": false,
"className": "",
"x": 600,
"y": 460,
"wires": [
[]
]
},
{
"id": "c7eb924bbea94aa2",
"type": "ui_text",
"z": "52189d14a3ef7d36",
"group": "4c6ac6be32610274",
"order": 1,
"width": 0,
"height": 0,
"name": "",
"label": "Grafy zobrazují data přijatá za předchozích 5 minut.",
"format": "{{msg.payload}}",
"layout": "row-center",
"className": "",
"x": 630,
"y": 540,
"wires": []
},
{
"id": "822a0d88c07a259d",
"type": "ui_button",
"z": "52189d14a3ef7d36",
"name": "",
"group": "4c6ac6be32610274",
"order": 2,
"width": 0,
"height": 0,
"passthru": false,
"label": "Clear",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "null",
"payloadType": "json",
"topic": "topic",
"topicType": "msg",
"x": 190,
"y": 260,
"wires": [
[
"355efb54b068c5a3",
"a51e5746aa0b1263",
"e3bebe44171c9358",
"404d932b33e575e7",
"f2504468b89604ce"
]
]
},
{
"id": "f2504468b89604ce",
"type": "change",
"z": "52189d14a3ef7d36",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "[]",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 360,
"y": 260,
"wires": [
[
"2a7d98737f6adca0",
"586301ca49caf3a2",
"5f141b16e7bf816d",
"3acd30b62d3d87f8"
]
]
},
{
"id": "6963af9f21112230",
"type": "mqtt-broker",
"name": "MQTTTEST",
"broker": "test.mosquitto.org",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
},
{
"id": "7a9de4c6af267783",
"type": "ui_group",
"name": "Attention",
"tab": "b977669743d9443a",
"order": 2,
"disp": true,
"width": 6,
"collapse": false,
"className": ""
},
{
"id": "9d4d663874890350",
"type": "ui_group",
"name": "Meditation",
"tab": "b977669743d9443a",
"order": 3,
"disp": true,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "66728c304447e52f",
"type": "ui_group",
"name": "Quality",
"tab": "b977669743d9443a",
"order": 4,
"disp": true,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "2a8a7431a95421e5",
"type": "ui_group",
"name": "Raw",
"tab": "b977669743d9443a",
"order": 5,
"disp": true,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "4c6ac6be32610274",
"type": "ui_group",
"name": "Info",
"tab": "b977669743d9443a",
"order": 1,
"disp": true,
"width": "24",
"collapse": false,
"className": ""
},
{
"id": "b977669743d9443a",
"type": "ui_tab",
"name": "EEGPower",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]