My nodered has problem

i open my node red using command prompt...but then the server load too long, and even if it can open the server, it cant be deployed second time...

You need to provide bit more information because no one can see what you are doing.

Take a read of this FAQ.


I cant deploy my flow.....its loading too long. All i can do is close the command prompt, and open it again..but it happen again and again. I don't now what else to do.

As i open it after i close the command prompt again, it can only function one time.


*the debug only show one time of output...even if i scan my rfid, the comm won't get display the output...But in arduino, the output displayed in serial monitor.

fyi, im doing a file system in nodered. [Before, it can be used normally, until i add telegram bot node...but even after deleting the telegram bot node, the problem still happen] Where after a student scan their IC to the RFID, the serial in will send the id tag to a file through nodered. Then if the card has been registered, it will continue to the next step which the telegram bot. and it will send data to arduino, that the card has been registered. If the card hasnt been registered, student will need their lecturer to register them.

So have this workd before and it just stopped working - or have you been making changes ?

Usually in this sort of situation it is a "race" condition where you have a message going around and around in circles either due to a programming issue - or a bug in a new node

Craig

but i put delay on the arduino....

What @craigcurtin means is somewhere in your flow you might be creating an infinite loop

This loop could be in the form of nodes wired to (directly or via other nodes/links/mqtt) back to itself

Or perhaps a for or while loop in a function.

Unless you share your flow (CTRL+E) we will not be able to help other than offer advice.


it keeps getting like this as i want to share my flow

[
    {
        "id": "3f5da7085f233b28",
        "type": "tab",
        "label": "RFID - ACTUAL",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "dd015d94dacb7639",
        "type": "debug",
        "z": "3f5da7085f233b28",
        "name": "OUTPUT - SCAN1",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 390,
        "y": 100,
        "wires": []
    },
    {
        "id": "c099df188cdf337e",
        "type": "mqtt out",
        "z": "3f5da7085f233b28",
        "name": "",
        "topic": "scan/tagid",
        "qos": "2",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "4c7850b0d02a178b",
        "x": 390,
        "y": 40,
        "wires": []
    },
    {
        "id": "465df20e9ba736f5",
        "type": "mqtt in",
        "z": "3f5da7085f233b28",
        "name": "",
        "topic": "scan/tagid",
        "qos": "2",
        "datatype": "auto",
        "broker": "4c7850b0d02a178b",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 120,
        "y": 240,
        "wires": [
            [
                "6df5a60399603ec3",
                "62cbba8915789534"
            ]
        ]
    },
    {
        "id": "6df5a60399603ec3",
        "type": "ui_text",
        "z": "3f5da7085f233b28",
        "group": "1f556657e1b59fe7",
        "order": 1,
        "width": 0,
        "height": 0,
        "name": "",
        "label": "ID TAG",
        "format": "{{msg.payload}}",
        "layout": "row-spread",
        "className": "",
        "x": 300,
        "y": 200,
        "wires": []
    },
    {
        "id": "62cbba8915789534",
        "type": "function",
        "z": "3f5da7085f233b28",
        "name": "",
        "func": "flow.set(\"TAGID\",msg.payload)",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 300,
        "y": 260,
        "wires": [
            []
        ]
    },
    {
        "id": "3cc975cbdc1f7c96",
        "type": "function",
        "z": "3f5da7085f233b28",
        "name": "",
        "func": "//timestamp\nvar now = new Date();\nvar yyyy = now.getFullYear();\nvar mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1);\nvar dd = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nvar hh = now.getHours();\nvar mmm = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nvar ss = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds()\n\n//for csv file storage\nmsg.payload = {\n    \"Date\": yyyy + \"-\" + mm + \"-\" + dd,\n    \"Time\": hh + \":\" + mmm + \":\" + ss,\n    \"ID\": flow.get(\"TAGID\")\n}\nmsg.filename = \"C:/Users/syafi/OneDrive/Desktop/IOT ASSIGNMENT BOX/try21111.csv\"\nreturn msg;\n\n\n\n\n\n\n\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1160,
        "y": 100,
        "wires": [
            [
                "ff5e87ef0243a93c"
            ]
        ]
    },
    {
        "id": "ff5e87ef0243a93c",
        "type": "csv",
        "z": "3f5da7085f233b28",
        "name": "SCAN1",
        "sep": ",",
        "hdrin": false,
        "hdrout": "once",
        "multi": "mult",
        "ret": "\\r",
        "temp": "Date,Time,ID",
        "skip": "0",
        "strings": true,
        "include_empty_strings": false,
        "include_null_values": "",
        "x": 1320,
        "y": 100,
        "wires": [
            [
                "23928c77d1d16112"
            ]
        ]
    },
    {
        "id": "23928c77d1d16112",
        "type": "file",
        "z": "3f5da7085f233b28",
        "name": "",
        "filename": "",
        "appendNewline": true,
        "createDir": true,
        "overwriteFile": "false",
        "encoding": "utf8",
        "x": 1480,
        "y": 100,
        "wires": [
            []
        ]
    },
    {
        "id": "16b2ade87514e359",
        "type": "comment",
        "z": "3f5da7085f233b28",
        "name": "CREATE A FILE ~ SCAN card",
        "info": "",
        "x": 1060,
        "y": 40,
        "wires": []
    },
    {
        "id": "202020ceba2d88a5",
        "type": "mqtt in",
        "z": "3f5da7085f233b28",
        "name": "",
        "topic": "scan/tagid",
        "qos": "2",
        "datatype": "auto",
        "broker": "4c7850b0d02a178b",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 1000,
        "y": 100,
        "wires": [
            [
                "3cc975cbdc1f7c96"
            ]
        ]
    },
    {
        "id": "3abd293812ee84d7",
        "type": "ui_text_input",
        "z": "3f5da7085f233b28",
        "name": "",
        "label": "NAME",
        "tooltip": "",
        "group": "3efc5a1282d3fc63",
        "order": 2,
        "width": 0,
        "height": 0,
        "passthru": true,
        "mode": "text",
        "delay": 300,
        "topic": "topic",
        "sendOnBlur": true,
        "className": "",
        "topicType": "msg",
        "x": 1010,
        "y": 360,
        "wires": [
            [
                "f024deacb814c644"
            ]
        ]
    },
    {
        "id": "d7dc586e065774ac",
        "type": "ui_text_input",
        "z": "3f5da7085f233b28",
        "name": "",
        "label": "CLASS",
        "tooltip": "",
        "group": "3efc5a1282d3fc63",
        "order": 3,
        "width": 0,
        "height": 0,
        "passthru": true,
        "mode": "text",
        "delay": 300,
        "topic": "topic",
        "sendOnBlur": true,
        "className": "",
        "topicType": "msg",
        "x": 1020,
        "y": 420,
        "wires": [
            [
                "d3095115b35c0ec1"
            ]
        ]
    },
    {
        "id": "e6c942a66d4c8190",
        "type": "ui_text_input",
        "z": "3f5da7085f233b28",
        "name": "",
        "label": "No. Phone",
        "tooltip": "",
        "group": "3efc5a1282d3fc63",
        "order": 4,
        "width": 0,
        "height": 0,
        "passthru": true,
        "mode": "text",
        "delay": 300,
        "topic": "topic",
        "sendOnBlur": true,
        "className": "",
        "topicType": "msg",
        "x": 1030,
        "y": 480,
        "wires": [
            [
                "8582ace66ebf2996"
            ]
        ]
    },
    {
        "id": "f024deacb814c644",
        "type": "function",
        "z": "3f5da7085f233b28",
        "name": "",
        "func": "flow.set(\"name\",msg.payload)",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1180,
        "y": 360,
        "wires": [
            []
        ]
    },
    {
        "id": "8582ace66ebf2996",
        "type": "function",
        "z": "3f5da7085f233b28",
        "name": "",
        "func": "flow.set(\"phono\",msg.payload)",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1180,
        "y": 480,
        "wires": [
            []
        ]
    },
    {
        "id": "d3095115b35c0ec1",
        "type": "function",
        "z": "3f5da7085f233b28",
        "name": "",
        "func": "flow.set(\"class\",msg.payload)",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1180,
        "y": 420,
        "wires": [
            []
        ]
    },
    {
        "id": "99cdca626db75abb",
        "type": "ui_button",
        "z": "3f5da7085f233b28",
        "name": "",
        "group": "d9ce59e45c2b7a9a",
        "order": 4,
        "width": 3,
        "height": 1,
        "passthru": false,
        "label": "DONE",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "false",
        "payloadType": "bool",
        "topic": "topic",
        "topicType": "msg",
        "x": 110,
        "y": 620,
        "wires": [
            [
                "4cf77cc913bc278e",
                "85b2ae3b6c648d4a",
                "fc9a3ae70f047992"
            ]
        ]
    },
    {
        "id": "4cf77cc913bc278e",
        "type": "function",
        "z": "3f5da7085f233b28",
        "name": "",
        "func": "flow.set(\"donenew\",msg.payload)",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 320,
        "y": 620,
        "wires": [
            []
        ]
    },
    {
        "id": "6ca3008f94aa8ed7",
        "type": "ui_led",
        "z": "3f5da7085f233b28",
        "order": 2,
        "group": "d9ce59e45c2b7a9a",
        "width": 3,
        "height": 3,
        "label": "",
        "labelPlacement": "left",
        "labelAlignment": "left",
        "colorForValue": [
            {
                "color": "#413e3e",
                "value": "false",
                "valueType": "bool"
            },
            {
                "color": "#20f320",
                "value": "true",
                "valueType": "bool"
            }
        ],
        "allowColorForValueInMessage": false,
        "shape": "circle",
        "showGlow": true,
        "name": "",
        "x": 570,
        "y": 560,
        "wires": []
    },
    {
        "id": "85b2ae3b6c648d4a",
        "type": "function",
        "z": "3f5da7085f233b28",
        "name": "",
        "func": "var butS = flow.get(\"startnew\")\nvar butD = flow.get(\"donenew\")\n\n    if(butS == true){\n        msg.payload == true\n    }\n    else if(butD == false){\n        msg.payload == false\n    }\n\nflow.set(\"SDdata\", msg.payload)\nreturn msg;\n\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 440,
        "y": 560,
        "wires": [
            [
                "6ca3008f94aa8ed7"
            ]
        ]
    },
    {
        "id": "d665a3fb3fd68a63",
        "type": "ui_button",
        "z": "3f5da7085f233b28",
        "name": "",
        "group": "d9ce59e45c2b7a9a",
        "order": 1,
        "width": 3,
        "height": 1,
        "passthru": false,
        "label": "START",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "true",
        "payloadType": "bool",
        "topic": "topic",
        "topicType": "msg",
        "x": 120,
        "y": 500,
        "wires": [
            [
                "5620c1c7c8ce1851",
                "85b2ae3b6c648d4a",
                "fc9a3ae70f047992"
            ]
        ]
    },
    {
        "id": "5620c1c7c8ce1851",
        "type": "function",
        "z": "3f5da7085f233b28",
        "name": "",
        "func": "flow.set(\"startnew\",msg.payload)",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 320,
        "y": 500,
        "wires": [
            []
        ]
    },
    {
        "id": "fc9a3ae70f047992",
        "type": "mqtt out",
        "z": "3f5da7085f233b28",
        "name": "",
        "topic": "DATAs/d",
        "qos": "2",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "4c7850b0d02a178b",
        "x": 240,
        "y": 560,
        "wires": []
    },
    {
        "id": "6a9bd9882018a654",
        "type": "csv",
        "z": "3f5da7085f233b28",
        "name": "",
        "sep": ",",
        "hdrin": "",
        "hdrout": "once",
        "multi": "one",
        "ret": "\\n",
        "temp": "NAME,CLASS,No. PHONE,ID",
        "skip": "0",
        "strings": true,
        "include_empty_strings": true,
        "include_null_values": "",
        "x": 1370,
        "y": 580,
        "wires": [
            [
                "90cb6b75cf549b0a"
            ]
        ]
    },
    {
        "id": "15cada6493cf5cc2",
        "type": "ui_button",
        "z": "3f5da7085f233b28",
        "name": "",
        "group": "3efc5a1282d3fc63",
        "order": 6,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "ENTER",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "x": 1020,
        "y": 580,
        "wires": [
            [
                "7fd851356ece1df1"
            ]
        ]
    },
    {
        "id": "7fd851356ece1df1",
        "type": "function",
        "z": "3f5da7085f233b28",
        "name": "STUDENT DATA",
        "func": "var N = flow.get(\"name\");\nvar C = flow.get(\"class\");\nvar PN = flow.get(\"phono\");\n\nmsg.payload = {\n    \"ID\" : flow.get(\"TAGID\"),\n    \"NAME\" : N,\n    \"CLASS\": C,\n    \"No. PHONE\": PN\n}\n\nmsg.filename = \"C:/Users/syafi/OneDrive/Desktop/IOT ASSIGNMENT BOX/INFO1.csv\"\nflow.set(\"enterdata\", msg.filename)\nreturn msg;\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1210,
        "y": 580,
        "wires": [
            [
                "6a9bd9882018a654"
            ]
        ]
    },
    {
        "id": "90cb6b75cf549b0a",
        "type": "file",
        "z": "3f5da7085f233b28",
        "name": "",
        "filename": "",
        "appendNewline": true,
        "createDir": true,
        "overwriteFile": "false",
        "encoding": "utf8",
        "x": 1540,
        "y": 580,
        "wires": [
            []
        ]
    },
    {
        "id": "ec7c9eb1ee225933",
        "type": "comment",
        "z": "3f5da7085f233b28",
        "name": "CREATE A FILE ~ [STUDENT] CARD INFORMATION",
        "info": "",
        "x": 1140,
        "y": 300,
        "wires": []
    },
    {
        "id": "8c60978695ac110d",
        "type": "ui_text",
        "z": "3f5da7085f233b28",
        "group": "3efc5a1282d3fc63",
        "order": 1,
        "width": 0,
        "height": 0,
        "name": "",
        "label": "INSTRUCTION",
        "format": "{{msg.payload}}",
        "layout": "col-center",
        "className": "",
        "x": 1640,
        "y": 340,
        "wires": []
    },
    {
        "id": "44d2a4ee09270ac2",
        "type": "file in",
        "z": "3f5da7085f233b28",
        "name": "",
        "filename": "C:/Users/syafi/OneDrive/Desktop/IOT ASSIGNMENT BOX/INFO1.csv",
        "format": "utf8",
        "chunk": false,
        "sendError": false,
        "encoding": "none",
        "allProps": false,
        "x": 470,
        "y": 1100,
        "wires": [
            [
                "9984b89c02f37ca3"
            ]
        ]
    },
    {
        "id": "c155ddeab85ab25f",
        "type": "mqtt in",
        "z": "3f5da7085f233b28",
        "name": "",
        "topic": "scan/tagid",
        "qos": "2",
        "datatype": "auto",
        "broker": "4c7850b0d02a178b",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 120,
        "y": 1100,
        "wires": [
            [
                "44d2a4ee09270ac2"
            ]
        ]
    },
    {
        "id": "9984b89c02f37ca3",
        "type": "csv",
        "z": "3f5da7085f233b28",
        "name": "",
        "sep": ",",
        "hdrin": "",
        "hdrout": "once",
        "multi": "one",
        "ret": "\\n",
        "temp": "NAME,CLASS,No. PHONE,ID",
        "skip": "0",
        "strings": true,
        "include_empty_strings": true,
        "include_null_values": "",
        "x": 110,
        "y": 1040,
        "wires": [
            [
                "dcaa2b490433b515"
            ]
        ]
    },
    {
        "id": "dcaa2b490433b515",
        "type": "join",
        "z": "3f5da7085f233b28",
        "name": "",
        "mode": "custom",
        "build": "array",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": false,
        "timeout": "",
        "count": "",
        "reduceRight": false,
        "reduceExp": "",
        "reduceInit": "",
        "reduceInitType": "",
        "reduceFixup": "",
        "x": 130,
        "y": 940,
        "wires": [
            [
                "beb77a26ec5af808"
            ]
        ]
    },
    {
        "id": "beb77a26ec5af808",
        "type": "function",
        "z": "3f5da7085f233b28",
        "name": "CHECK STUDENT DATA",
        "func": "var id = flow.get(\"TAGID\");\nvar id1 = id.trim();\nvar a = 0;\nvar b = msg.payload.length - 1;\n\n//var length = msg.payload.length-1;\nwhile(a <= b){\n    if(msg.payload[a].ID == id1){\n        msg.payload = {\n            state : \"V\",\n            array : a,\n            //len : length\n        };\n    }\nwhile(a == msg.payload.length){\n    if(msg.payload[a].ID == id1){\n        msg.payload = {\n            state : \"V1\",\n            array : a,\n            //len : length\n        };\n    }\n    else{\n        msg.payload = \"U\"\n    }\n    }\n}\n    a++;\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 330,
        "y": 1000,
        "wires": [
            [
                "82088bdf9a885beb"
            ]
        ]
    },
    {
        "id": "82088bdf9a885beb",
        "type": "split",
        "z": "3f5da7085f233b28",
        "name": "",
        "splt": "\\n",
        "spltType": "str",
        "arraySplt": 1,
        "arraySpltType": "len",
        "stream": false,
        "addname": "payload.content",
        "x": 310,
        "y": 940,
        "wires": [
            [
                "0e9de7fa616cbcd7",
                "1621243aea1aa584"
            ]
        ]
    },
    {
        "id": "0e9de7fa616cbcd7",
        "type": "function",
        "z": "3f5da7085f233b28",
        "name": "",
        "func": "return msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 500,
        "y": 920,
        "wires": [
            [
                "c04608cb3f156e61"
            ]
        ]
    },
    {
        "id": "1621243aea1aa584",
        "type": "function",
        "z": "3f5da7085f233b28",
        "name": "",
        "func": "\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 580,
        "y": 980,
        "wires": [
            [
                "06ec76dd49bb5e40"
            ]
        ]
    },
    {
        "id": "bffc0e4037207bd9",
        "type": "comment",
        "z": "3f5da7085f233b28",
        "name": "CHECK ARRAY FILE ~ SCANNED CARD",
        "info": "",
        "x": 200,
        "y": 800,
        "wires": []
    },
    {
        "id": "c04608cb3f156e61",
        "type": "mqtt out",
        "z": "3f5da7085f233b28",
        "name": "",
        "topic": "card/state",
        "qos": "2",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "a8d3e42c.4c3b68",
        "x": 680,
        "y": 860,
        "wires": []
    },
    {
        "id": "06ec76dd49bb5e40",
        "type": "mqtt out",
        "z": "3f5da7085f233b28",
        "name": "",
        "topic": "card/array",
        "qos": "2",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "a8d3e42c.4c3b68",
        "x": 700,
        "y": 920,
        "wires": []
    },
    {
        "id": "9f8520f8a585b3ab",
        "type": "serial out",
        "z": "3f5da7085f233b28",
        "name": "",
        "serial": "44d5796bf210fd01",
        "x": 410,
        "y": 1240,
        "wires": []
    },
    {
        "id": "a71bab1dd333b207",
        "type": "mqtt in",
        "z": "3f5da7085f233b28",
        "name": "",
        "topic": "card/array",
        "qos": "2",
        "datatype": "auto",
        "broker": "a8d3e42c.4c3b68",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 120,
        "y": 1300,
        "wires": [
            [
                "a1a3dc842b6432c4"
            ]
        ]
    },
    {
        "id": "7e3673cad586c9c2",
        "type": "mqtt in",
        "z": "3f5da7085f233b28",
        "name": "",
        "topic": "card/state",
        "qos": "2",
        "datatype": "auto",
        "broker": "4c7850b0d02a178b",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 120,
        "y": 1240,
        "wires": [
            [
                "1c55369ad7289138",
                "9f8520f8a585b3ab"
            ]
        ]
    },
    {
        "id": "1c55369ad7289138",
        "type": "function",
        "z": "3f5da7085f233b28",
        "name": "",
        "func": "flow.set(\"cstate\",msg.payload)",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 260,
        "y": 1220,
        "wires": [
            []
        ]
    },
    {
        "id": "a1a3dc842b6432c4",
        "type": "function",
        "z": "3f5da7085f233b28",
        "name": "",
        "func": "flow.set(\"carray\",msg.payload)",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 260,
        "y": 1280,
        "wires": [
            []
        ]
    },
    {
        "id": "af6618d58b23f91d",
        "type": "function",
        "z": "3f5da7085f233b28",
        "d": true,
        "name": "split data",
        "func": "var splitmsg = msg.payload.split(\",\");\nvar msg1 = { payload: parseFloat(splitmsg[0]) };\nvar msg2 = { payload: parseFloat(splitmsg[1]) };\nvar msg3 = { payload: parseFloat(splitmsg[2]) };\n\n\nreturn [msg1, msg2, msg3];",
        "outputs": 3,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 600,
        "y": 60,
        "wires": [
            [],
            [],
            []
        ]
    },
    {
        "id": "7410cf1ee3ccfe72",
        "type": "mqtt in",
        "z": "3f5da7085f233b28",
        "name": "",
        "topic": "card/array",
        "qos": "2",
        "datatype": "auto",
        "broker": "a8d3e42c.4c3b68",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 120,
        "y": 1400,
        "wires": [
            []
        ]
    },
    {
        "id": "874f2dc3c03ce50a",
        "type": "function",
        "z": "3f5da7085f233b28",
        "name": "",
        "func": "\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 480,
        "y": 1400,
        "wires": [
            []
        ]
    },
    {
        "id": "f25a4912f041c010",
        "type": "mqtt in",
        "z": "3f5da7085f233b28",
        "name": "",
        "topic": "card/state",
        "qos": "2",
        "datatype": "auto",
        "broker": "4c7850b0d02a178b",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 120,
        "y": 320,
        "wires": [
            [
                "4fd2a4268026df32",
                "84a55fdfb103ae7e"
            ]
        ]
    },
    {
        "id": "4fd2a4268026df32",
        "type": "function",
        "z": "3f5da7085f233b28",
        "name": "",
        "func": "var status = flow.get(\"cstate\");\n\nif(status == \"V\" || status == \"V1\"){\n    msg.payload = \"VERIFIED\";\n}\nelse{\n    msg.payload = \"UNVERIFIED\";\n}\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 300,
        "y": 300,
        "wires": [
            [
                "786f0fded237af42"
            ]
        ]
    },
    {
        "id": "84a55fdfb103ae7e",
        "type": "ui_text",
        "z": "3f5da7085f233b28",
        "group": "1f556657e1b59fe7",
        "order": 2,
        "width": 0,
        "height": 0,
        "name": "",
        "label": "STATUS : ",
        "format": "{{msg.payload}}",
        "layout": "row-spread",
        "className": "",
        "x": 300,
        "y": 340,
        "wires": []
    },
    {
        "id": "dabdc6375a42d704",
        "type": "function",
        "z": "3f5da7085f233b28",
        "name": "",
        "func": "flow.set(\"statss\",msg.payload)",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 620,
        "y": 200,
        "wires": [
            []
        ]
    },
    {
        "id": "5b7fd83b2f3df23b",
        "type": "mqtt in",
        "z": "3f5da7085f233b28",
        "name": "",
        "topic": "DATAs/d",
        "qos": "2",
        "datatype": "auto",
        "broker": "4c7850b0d02a178b",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 460,
        "y": 200,
        "wires": [
            [
                "dabdc6375a42d704"
            ]
        ]
    },
    {
        "id": "3b3fb8cc7931d96b",
        "type": "mqtt in",
        "z": "3f5da7085f233b28",
        "name": "",
        "topic": "DATAs/d",
        "qos": "2",
        "datatype": "auto",
        "broker": "4c7850b0d02a178b",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 1340,
        "y": 360,
        "wires": [
            [
                "c05ba9127d960c63"
            ]
        ]
    },
    {
        "id": "c05ba9127d960c63",
        "type": "function",
        "z": "3f5da7085f233b28",
        "name": "",
        "func": "flow.set(\"statss\",msg.payload)\n\nvar what = flow.get(\"statss\");\n\nif(statss == \"VERIFIED\"){\n    msg.payload = \"FILL UP STUDENT INFORMATION FIRST, THEN PRESS'ENTER' BUTTON\";\n}",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1480,
        "y": 400,
        "wires": [
            [
                "8c60978695ac110d"
            ]
        ]
    },
    {
        "id": "786f0fded237af42",
        "type": "mqtt out",
        "z": "3f5da7085f233b28",
        "name": "",
        "topic": "DATAs/d",
        "qos": "2",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "4c7850b0d02a178b",
        "x": 440,
        "y": 300,
        "wires": []
    },
    {
        "id": "6fc9fc0635ada31d",
        "type": "serial in",
        "z": "3f5da7085f233b28",
        "name": "",
        "serial": "d8cacf86.7e5d3",
        "x": 150,
        "y": 140,
        "wires": [
            [
                "c099df188cdf337e",
                "dd015d94dacb7639"
            ]
        ]
    },
    {
        "id": "259c7ad3d95012ca",
        "type": "ui_spacer",
        "z": "3f5da7085f233b28",
        "name": "spacer",
        "group": "e394156bb9a5a8e4",
        "order": 2,
        "width": 3,
        "height": 1
    },
    {
        "id": "b91b80b1e3a72dbf",
        "type": "ui_spacer",
        "z": "3f5da7085f233b28",
        "name": "spacer",
        "group": "e394156bb9a5a8e4",
        "order": 5,
        "width": 3,
        "height": 1
    },
    {
        "id": "4c7850b0d02a178b",
        "type": "mqtt-broker",
        "name": "",
        "broker": "broker.hivemq.com:1883",
        "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": "",
        "info": "> Brightness ="
    },
    {
        "id": "1f556657e1b59fe7",
        "type": "ui_group",
        "name": "SCAN TAG",
        "tab": "4125baac87d6639c",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "3efc5a1282d3fc63",
        "type": "ui_group",
        "name": "GROUP2",
        "tab": "4125baac87d6639c",
        "order": 2,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "d9ce59e45c2b7a9a",
        "type": "ui_group",
        "name": "SECTION 2 ~ NEW INFORMATION",
        "tab": "4125baac87d6639c",
        "order": 3,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "a8d3e42c.4c3b68",
        "type": "mqtt-broker",
        "name": "",
        "broker": "broker.hivemq.com:1883",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "compatmode": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "sessionExpiry": ""
    },
    {
        "id": "44d5796bf210fd01",
        "type": "serial-port",
        "serialport": "COM3",
        "serialbaud": "9600",
        "databits": "8",
        "parity": "none",
        "stopbits": "1",
        "waitfor": "",
        "dtr": "none",
        "rts": "none",
        "cts": "none",
        "dsr": "none",
        "newline": "\\n",
        "bin": "false",
        "out": "char",
        "addchar": "",
        "responsetimeout": "10000"
    },
    {
        "id": "d8cacf86.7e5d3",
        "type": "serial-port",
        "serialport": "COM3",
        "serialbaud": "9600",
        "databits": "8",
        "parity": "none",
        "stopbits": "1",
        "waitfor": "",
        "newline": "\\r",
        "bin": "false",
        "out": "char",
        "addchar": "false",
        "responsetimeout": "10000"
    },
    {
        "id": "4125baac87d6639c",
        "type": "ui_tab",
        "name": "RFID - NOV",
        "icon": "dashboard",
        "order": 11,
        "disabled": false,
        "hidden": false
    }
]


got another problem after trying to fix it

this one has been solved

It could be helpful for others in the future if you explained what the problem was and what you did to fix it.

1 Like

Sure, i didnt do anything actually....I just close and open it back several time actually

I seem to found the problem here, i put a looping in a function node[check array].
While loop....

But that part is the most important thing for my system

Can you explain what the loop does & show us the code (as text in a code block (not a screenshot))

Well, I put a while loop inside a function node. It is for me to search inside an array(that is from the file)

while(a<=msg.payload.length){
if(msg.payload[a].ID == "D20A485C"){//UID TAG
msg.payload = {
"NAME" : msg.payload[a].NAME
};
}
}

Could anyone suggest a way far me to search which UIDTAG(msg.payload[arraynum].UIDTAG) that has the same with inside an array that converted from a file(that content NAME, CLASS, NO. PHONE, UIDTAG).

In that code example you just posted, the value of “a” is never changed, so the while loop would never end.

how should i end it?