[
{
"id": "51234a0f04d81c94",
"type": "tab",
"label": "Flow 11",
"disabled": false,
"info": "",
"env": []
},
{
"id": "7295d98cf5dfbcf6",
"type": "ui_template",
"z": "51234a0f04d81c94",
"group": "5549dc5cdeeebf33",
"name": "Sơ đồ nguyên lý trạm CBL NamKa",
"order": 1,
"width": 18,
"height": 10,
"format": "
\n\n \n\n
\n\n \n\n \n
",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": false,
"templateScope": "local",
"className": "",
"x": 860,
"y": 560,
"wires": [
[
"7bc38b6369f8700f"
]
]
},
{
"id": "935583103d940c30",
"type": "mqtt in",
"z": "51234a0f04d81c94",
"name": "Trạng thái UPS",
"topic": "CBL/NamKa/Display/Pub/UPS",
"qos": "2",
"datatype": "json",
"broker": "ae98c6335ab26845",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 200,
"y": 220,
"wires": [
[
"27c0a4284c204419",
"63e4e4ff8fd73b39"
]
]
},
{
"id": "ed22635559f535de",
"type": "mqtt in",
"z": "51234a0f04d81c94",
"name": "Giá trị UPS",
"topic": "CBL/NamKa/Power/Pub/UPS",
"qos": "2",
"datatype": "json",
"broker": "ae98c6335ab26845",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 180,
"y": 280,
"wires": [
[
"221822db25df8d42"
]
]
},
{
"id": "e5e8c4db2e884505",
"type": "mqtt in",
"z": "51234a0f04d81c94",
"name": "Giá trị 220VAC",
"topic": "CBL/NamKa/Power/Pub/220VAC",
"qos": "1",
"datatype": "json",
"broker": "ae98c6335ab26845",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 200,
"y": 140,
"wires": [
[
"92d2235772de3e7b"
]
]
},
{
"id": "cd9dd398b11738c7",
"type": "mqtt in",
"z": "51234a0f04d81c94",
"name": "Trạng thái 220VAC",
"topic": "CBL/NamKa/Display/Pub/220VAC",
"qos": "2",
"datatype": "json",
"broker": "ae98c6335ab26845",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 210,
"y": 80,
"wires": [
[
"1332265ca1891ed4",
"c1feb9eff887f7f3",
"433ede0c5feaafd5"
]
]
},
{
"id": "1332265ca1891ed4",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"220VAC_Status\"][0];\nreturn {\n payload:(kt) ? \"#5fddcc\" : \"#b8bbae\",\n topic:\"220vac@cx_color\"\n};\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 40,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "92d2235772de3e7b",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "kt = msg.payload.d[\"220VAC\"][0];\nkt=kt.toString();\nreturn {\n payload: kt,\n topic:\"gtri_220vac@cx_status\"\n };\n ",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 140,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "c1feb9eff887f7f3",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"220VAC_Status\"][0];\nif (kt==false)\n{\n return {payload : \"NGẮT\",\n topic:\"tthai_220vac@cx_status\"\n};\n}\nelse\n{return {payload : \"ĐÓNG\",\n topic:\"tthai_220vac@cx_status\"\n};\n}\n \n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 80,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "27c0a4284c204419",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"UPS_Status\"][0];\nif (kt==false)\n{\n return {payload : \"NGẮT\",\n topic:\"tthai_ups@cx_status\"\n};\n}\nelse\n{return {payload : \"ĐÓNG\",\n topic:\"tthai_ups@cx_status\"\n};\n}\n \n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 220,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "65a1e67ac0639c8f",
"type": "mqtt in",
"z": "51234a0f04d81c94",
"name": "Trạng thái Module AI",
"topic": "CBL/NamKa/Display/Pub/AI",
"qos": "2",
"datatype": "json",
"broker": "ae98c6335ab26845",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 210,
"y": 340,
"wires": [
[
"b8e262963806d7d4"
]
]
},
{
"id": "8ed8e0a951d535a6",
"type": "mqtt in",
"z": "51234a0f04d81c94",
"name": "Trạng thái Ắc quy",
"topic": "CBL/NamKa/Display/Pub/Acquy",
"qos": "2",
"datatype": "json",
"broker": "ae98c6335ab26845",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 200,
"y": 540,
"wires": [
[
"ff39021764d19eb6",
"3b99617321392677"
]
]
},
{
"id": "e8eb3ac6507c8d13",
"type": "mqtt in",
"z": "51234a0f04d81c94",
"name": "Trạng thái 24VDC",
"topic": "CBL/NamKa/Display/Pub/24VDC",
"qos": "2",
"datatype": "json",
"broker": "ae98c6335ab26845",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 210,
"y": 680,
"wires": [
[
"aa0d87a5217bfd58",
"8fe205ebcfbfa5f3"
]
]
},
{
"id": "cc4f3f5f186475bc",
"type": "mqtt in",
"z": "51234a0f04d81c94",
"name": "Trạng thái Module DI",
"topic": "CBL/NamKa/Display/Pub/DI",
"qos": "2",
"datatype": "json",
"broker": "ae98c6335ab26845",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 210,
"y": 400,
"wires": [
[
"e95695a565a97732"
]
]
},
{
"id": "26a6bd4e93665821",
"type": "mqtt in",
"z": "51234a0f04d81c94",
"name": "Trạng thái Module DO",
"topic": "CBL/NamKa/Display/Pub/DO",
"qos": "2",
"datatype": "json",
"broker": "ae98c6335ab26845",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 220,
"y": 460,
"wires": [
[
"70d9fa9418d15373"
]
]
},
{
"id": "a95bef087c0ee926",
"type": "mqtt in",
"z": "51234a0f04d81c94",
"name": "Giá trị Ắc quy",
"topic": "CBL/NamKa/Power/Pub/Acquy",
"qos": "2",
"datatype": "json",
"broker": "ae98c6335ab26845",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 190,
"y": 600,
"wires": [
[
"b5932a1311e91968"
]
]
},
{
"id": "221822db25df8d42",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "kt = msg.payload.d[\"UPS\"][0];\nkt=kt.toString();\nreturn {\n payload: kt,\n topic:\"gtri_ups@cx_status\"\n };\n ",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 280,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "b8e262963806d7d4",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"AI_Status\"][0];\nreturn {\n payload:(kt) ? \"#5fddcc\" : \"#b8bbae\",\n topic:\"ai@cx_color\"\n};\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 340,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "e95695a565a97732",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"DI_Status\"][0];\nreturn {\n payload:(kt) ? \"#5fddcc\" : \"#b8bbae\",\n topic:\"di@cx_color\"\n};\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 400,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "70d9fa9418d15373",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"DO_Status\"][0];\nreturn {\n payload:(kt) ? \"#5fddcc\" : \"#b8bbae\",\n topic:\"do@cx_color\"\n};\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 460,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "ff39021764d19eb6",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"Acquy_Status\"][0];\nreturn {\n payload:(kt) ? \"#5fddcc\" : \"#b8bbae\",\n topic:\"acquy@cx_color\"\n};\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 500,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "3b99617321392677",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"Acquy_Status\"][0];\nif (kt==false)\n{\n return {payload : \"NGẮT\",\n topic:\"tthai_acquy@cx_status\"\n};\n}\nelse\n{return {payload : \"ĐÓNG\",\n topic:\"tthai_acquy@cx_status\"\n};\n}\n \n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 540,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "b5932a1311e91968",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "kt = msg.payload.d[\"Acquy\"][0];\nkt=kt.toString();\nreturn {\n payload: kt,\n topic:\"gtri_acquy@cx_status\"\n };\n ",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 600,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "63e4e4ff8fd73b39",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"UPS_Status\"][0];\nreturn {\n payload:(kt) ? \"#5fddcc\" : \"#b8bbae\",\n topic:\"ups@cx_color\"\n};\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 180,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "ae4a01dbd224ca72",
"type": "mqtt in",
"z": "51234a0f04d81c94",
"name": "Trạng thái Amply",
"topic": "CBL/NamKa/Display/Pub/Amply",
"qos": "2",
"datatype": "json",
"broker": "ae98c6335ab26845",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 200,
"y": 900,
"wires": [
[
"747e148e3a6ae6b0",
"6ca2d68281b72a4e"
]
]
},
{
"id": "4b083324b4d1089d",
"type": "mqtt in",
"z": "51234a0f04d81c94",
"name": "Trạng thái mp3",
"topic": "CBL/NamKa/Display/Pub/Mp3",
"qos": "2",
"datatype": "json",
"broker": "ae98c6335ab26845",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 200,
"y": 980,
"wires": [
[
"7bc7ef5452921388",
"8c23c91c5ad61150"
]
]
},
{
"id": "67ff561adb4ac11b",
"type": "mqtt in",
"z": "51234a0f04d81c94",
"name": "Giá trị 24VDC",
"topic": "CBL/NamKa/Power/Pub/24VDC",
"qos": "2",
"datatype": "json",
"broker": "ae98c6335ab26845",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 190,
"y": 740,
"wires": [
[
"227883cc19d45a94"
]
]
},
{
"id": "8dd8bb87b6dfd606",
"type": "mqtt in",
"z": "51234a0f04d81c94",
"name": "Trạng thái Quạt",
"topic": "CBL/NamKa/Display/Pub/Quat",
"qos": "2",
"datatype": "json",
"broker": "ae98c6335ab26845",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 200,
"y": 820,
"wires": [
[
"63610fac200f2cd4",
"75a996804a784104"
]
]
},
{
"id": "40d081196c900517",
"type": "mqtt in",
"z": "51234a0f04d81c94",
"name": "Trạng thái Loa",
"topic": "CBL/NamKa/Display/Pub/Loa",
"qos": "2",
"datatype": "json",
"broker": "ae98c6335ab26845",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 190,
"y": 1060,
"wires": [
[
"09f32023812393ab",
"b0c714e2cd14ad07"
]
]
},
{
"id": "aa0d87a5217bfd58",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"24VDC_Status\"][0];\nreturn {\n payload:(kt) ? \"#5fddcc\" : \"#b8bbae\",\n topic:\"24vdc@cx_color\"\n};\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 640,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "8fe205ebcfbfa5f3",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"24VDC_Status\"][0];\nif (kt==false)\n{\n return {payload : \"NGẮT\",\n topic:\"tthai_24vdc@cx_status\"\n};\n}\nelse\n{return {payload : \"ĐÓNG\",\n topic:\"tthai_24vdc@cx_status\"\n};\n}\n \n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 680,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "227883cc19d45a94",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "kt = msg.payload.d[\"24VDC\"][0];\nkt=kt.toString();\nreturn {\n payload: kt,\n topic:\"gtri_24vdc@cx_status\"\n };\n ",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 740,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "63610fac200f2cd4",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"QUAT_Status\"][0];\nreturn {\n payload:(kt) ? \"#5fddcc\" : \"#b8bbae\",\n topic:\"quat@cx_color\"\n};\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 780,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "75a996804a784104",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"QUAT_Status\"][0];\nif (kt==false)\n{\n return {payload : \"NGẮT\",\n topic:\"tthai_quat@cx_status\"\n};\n}\nelse\n{return {payload : \"ĐÓNG\",\n topic:\"tthai_quat@cx_status\"\n};\n}\n \n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 820,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "747e148e3a6ae6b0",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"AMPLY_Status\"][0];\nreturn {\n payload:(kt) ? \"#5fddcc\" : \"#b8bbae\",\n topic:\"amply@cx_color\"\n};\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 860,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "6ca2d68281b72a4e",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"AMPLY_Status\"][0];\nif (kt==false)\n{\n return {payload : \"NGẮT\",\n topic:\"tthai_amply@cx_status\"\n};\n}\nelse\n{return {payload : \"ĐÓNG\",\n topic:\"tthai_amply@cx_status\"\n};\n}\n \n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 900,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "7bc7ef5452921388",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"MP3_Status\"][0];\nreturn {\n payload:(kt) ? \"#5fddcc\" : \"#b8bbae\",\n topic:\"mp3@cx_color\"\n};\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 940,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "8c23c91c5ad61150",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"MP3_Status\"][0];\nif (kt==false)\n{\n return {payload : \"NGẮT\",\n topic:\"tthai_mp3@cx_status\"\n};\n}\nelse\n{return {payload : \"ĐÓNG\",\n topic:\"tthai_mp3@cx_status\"\n};\n}\n \n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 980,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "09f32023812393ab",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"LOA_Status\"][0];\nreturn {\n payload:(kt) ? \"#5fddcc\" : \"#b8bbae\",\n topic:\"loa@cx_color\"\n};\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 1020,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "b0c714e2cd14ad07",
"type": "function",
"z": "51234a0f04d81c94",
"name": "",
"func": "var kt = msg.payload.d[\"LOA_Status\"][0];\nif (kt==false)\n{\n return {payload : \"NGẮT\",\n topic:\"tthai_loa@cx_status\"\n};\n}\nelse\n{return {payload : \"ĐÓNG\",\n topic:\"tthai_loa@cx_status\"\n};\n}\n \n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 440,
"y": 1060,
"wires": [
[
"7295d98cf5dfbcf6"
]
]
},
{
"id": "433ede0c5feaafd5",
"type": "csv",
"z": "51234a0f04d81c94",
"name": "test",
"sep": ",",
"hdrin": false,
"hdrout": "all",
"multi": "one",
"ret": "\\n",
"temp": "ts,d",
"skip": "0",
"strings": true,
"include_empty_strings": true,
"include_null_values": true,
"x": 650,
"y": 80,
"wires": [
[
"816ff84ef1c3eb85"
]
]
},
{
"id": "816ff84ef1c3eb85",
"type": "file",
"z": "51234a0f04d81c94",
"name": "",
"filename": "Dien ap 220VAC\\status\\data.csv",
"appendNewline": true,
"createDir": false,
"overwriteFile": "false",
"encoding": "none",
"x": 870,
"y": 80,
"wires": [
[]
]
},
{
"id": "7bc38b6369f8700f",
"type": "debug",
"z": "51234a0f04d81c94",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1030,
"y": 460,
"wires": []
},
{
"id": "5549dc5cdeeebf33",
"type": "ui_group",
"name": "Sơ đồ nguyên lý",
"tab": "9c471883f1ec6014",
"order": 1,
"disp": true,
"width": "27",
"collapse": false,
"className": ""
},
{
"id": "ae98c6335ab26845",
"type": "mqtt-broker",
"name": "",
"broker": "10.78.3.27",
"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": {},
"sessionExpiry": ""
},
{
"id": "9c471883f1ec6014",
"type": "ui_tab",
"name": "Trạm Cảnh báo lũ NamKa",
"icon": "dashboard",
"order": 2,
"disabled": false,
"hidden": false
}
]