- [
- {
- "id": "41926d3a3c661803",
- "type": "tab",
- "label": "RFID_Project",
- "disabled": false,
- "info": "",
- "env": []
- },
- {
- "id": "ce2ee15a2f0d125e",
- "type": "tab",
- "label": "Hello World",
- "disabled": false,
- "info": "",
- "env": []
- },
- {
- "id": "1cc46b7de036ee06",
- "type": "tab",
- "label": "Count chars and words",
- "disabled": false,
- "info": "",
- "env": []
- },
- {
- "id": "0cf2ae9e184ef779",
- "type": "tab",
- "label": "Celsius to Farhanheit",
- "disabled": false,
- "info": "",
- "env": []
- },
- {
- "id": "f4ac5258b53676b6",
- "type": "tab",
- "label": "AC & Light control",
- "disabled": false,
- "info": "",
- "env": []
- },
- {
- "id": "714c7b87ef42d921",
- "type": "tab",
- "label": "Calculator using 2 numbers",
- "disabled": false,
- "info": "",
- "env": []
- },
- {
- "id": "235a9f7bdda75b2d",
- "type": "tab",
- "label": "OpenWeathermap",
- "disabled": false,
- "info": "",
- "env": []
- },
- {
- "id": "3758f9118f762f53",
- "type": "tab",
- "label": "hivemq",
- "disabled": false,
- "info": "",
- "env": []
- },
- {
- "id": "6e2a90a83fc5b027",
- "type": "tab",
- "label": "HTTP",
- "disabled": false,
- "info": "",
- "env": []
- },
- {
- "id": "32db33e18f3b95b7",
- "type": "tab",
- "label": "Automatic door and light control",
- "disabled": false,
- "info": "",
- "env": []
- },
- {
- "id": "c4ac0eaa5c5dbdc6",
- "type": "tab",
- "label": "Flow 1",
- "disabled": false,
- "info": "",
- "env": []
- },
- {
- "id": "940823eccfda4529",
- "type": "tab",
- "label": "Flow 2",
- "disabled": false,
- "info": "",
- "env": []
- },
- {
- "id": "5b634678967f4056",
- "type": "ui_group",
- "name": "IOT",
- "tab": "",
- "disp": true,
- "width": "6",
- "collapse": false,
- "className": ""
- },
- {
- "id": "37904b3e3e545c4e",
- "type": "mqtt-broker",
- "name": "",
- "broker": "http://broker.mqtt-dashboard.com",
- "port": "8884",
- "clientid": "",
- "autoConnect": true,
- "usetls": false,
- "protocolVersion": "4",
- "keepalive": "60",
- "cleansession": true,
- "autoUnsubscribe": true,
- "birthTopic": "topic",
- "birthQos": "0",
- "birthRetain": "false",
- "birthPayload": "",
- "birthMsg": {},
- "closeTopic": "",
- "closeQos": "0",
- "closeRetain": "false",
- "closePayload": "",
- "closeMsg": {},
- "willTopic": "",
- "willQos": "0",
- "willRetain": "false",
- "willPayload": "",
- "willMsg": {},
- "userProps": "",
- "sessionExpiry": ""
- },
- {
- "id": "47d3564b5f34c36d",
- "type": "ui_base",
- "theme": {
- "name": "theme-light",
- "lightTheme": {
- "default": "#0094CE",
- "baseColor": "#0094CE",
- "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
- "edited": true,
- "reset": false
- },
- "darkTheme": {
- "default": "#097479",
- "baseColor": "#097479",
- "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
- "edited": false
- },
- "customTheme": {
- "name": "Untitled Theme 1",
- "default": "#4B7930",
- "baseColor": "#4B7930",
- "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
- },
- "themeState": {
- "base-color": {
- "default": "#0094CE",
- "value": "#0094CE",
- "edited": false
- },
- "page-titlebar-backgroundColor": {
- "value": "#0094CE",
- "edited": false
- },
- "page-backgroundColor": {
- "value": "#fafafa",
- "edited": false
- },
- "page-sidebar-backgroundColor": {
- "value": "#ffffff",
- "edited": false
- },
- "group-textColor": {
- "value": "#1bbfff",
- "edited": false
- },
- "group-borderColor": {
- "value": "#ffffff",
- "edited": false
- },
- "group-backgroundColor": {
- "value": "#ffffff",
- "edited": false
- },
- "widget-textColor": {
- "value": "#111111",
- "edited": false
- },
- "widget-backgroundColor": {
- "value": "#0094ce",
- "edited": false
- },
- "widget-borderColor": {
- "value": "#ffffff",
- "edited": false
- },
- "base-font": {
- "value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
- }
- },
- "angularTheme": {
- "primary": "indigo",
- "accents": "blue",
- "warn": "red",
- "background": "grey",
- "palette": "light"
- }
- },
- "site": {
- "name": "Node-RED Dashboard",
- "hideToolbar": "false",
- "allowSwipe": "false",
- "lockMenu": "false",
- "allowTempTheme": "true",
- "dateFormat": "DD/MM/YYYY",
- "sizes": {
- "sx": 48,
- "sy": 48,
- "gx": 6,
- "gy": 6,
- "cx": 6,
- "cy": 6,
- "px": 0,
- "py": 0
- }
- }
- },
- {
- "id": "aa6f18c102a28853",
- "type": "ui_group",
- "name": "Group 1",
- "tab": "",
- "order": 1,
- "disp": true,
- "width": "6",
- "collapse": false,
- "className": ""
- },
- {
- "id": "a6b365329fd2f00a",
- "type": "ui_group",
- "name": "Group 2",
- "tab": "",
- "order": 2,
- "disp": true,
- "width": 6
- },
- {
- "id": "205971f27c08bd86",
- "type": "ui_group",
- "name": "Group 3",
- "tab": "",
- "order": 3,
- "disp": true,
- "width": 6
- },
- {
- "id": "7b4df4ab067ff50d",
- "type": "ui_group",
- "name": "Group 4",
- "tab": "",
- "order": 4,
- "disp": true,
- "width": 6
- },
- {
- "id": "1ebaae31a6a9852c",
- "type": "ui_tab",
- "name": "Tab 1",
- "icon": "dashboard",
- "order": 1,
- "disabled": false,
- "hidden": false
- },
- {
- "id": "809d226772e7b298",
- "type": "ui_group",
- "name": "Group 1",
- "tab": "1ebaae31a6a9852c",
- "order": 1,
- "disp": true,
- "width": "6",
- "collapse": false,
- "className": ""
- },
- {
- "id": "24af98fc20927339",
- "type": "ui_spacer",
- "z": "ce2ee15a2f0d125e",
- "name": "spacer",
- "group": "809d226772e7b298",
- "order": 1,
- "width": 1,
- "height": 1
- },
- {
- "id": "67120247d418b814",
- "type": "ui_spacer",
- "z": "ce2ee15a2f0d125e",
- "name": "spacer",
- "group": "809d226772e7b298",
- "order": 2,
- "width": 1,
- "height": 1
- },
- {
- "id": "3d2e85f49e83fdc3",
- "type": "serial-port",
- "name": "",
- "serialport": "",
- "serialbaud": "57600",
- "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": "ecec01c9b7ecd1b1",
- "type": "ui_tab",
- "name": "Tab 2",
- "icon": "dashboard",
- "order": 2
- },
- {
- "id": "8ddf37774f55c8cf",
- "type": "ui_group",
- "name": "Group 1",
- "tab": "ecec01c9b7ecd1b1",
- "order": 1,
- "disp": true,
- "width": 6
- },
- {
- "id": "45147d7e.9b5d4",
- "type": "serial-port",
- "name": "",
- "serialport": "COM6",
- "serialbaud": "9600",
- "databits": "8",
- "parity": "none",
- "stopbits": "1",
- "waitfor": "",
- "newline": "\\n",
- "bin": "false",
- "out": "char",
- "addchar": "false",
- "responsetimeout": ""
- },
- {
- "id": "a998f1f7a01f8062",
- "type": "ui_group",
- "name": "CPS",
- "tab": "1ebaae31a6a9852c",
- "order": 2,
- "disp": true,
- "width": "6",
- "collapse": false,
- "className": ""
- },
- {
- "id": "mqttBroker",
- "type": "mqtt-broker",
- "name": "",
- "broker": "mqtt://localhost",
- "port": "1883",
- "clientid": "",
- "usetls": false,
- "compatmode": true,
- "keepalive": "60",
- "cleansession": true,
- "birthTopic": "",
- "birthQos": "0",
- "birthPayload": "",
- "closeTopic": "",
- "closeQos": "0",
- "closePayload": "",
- "willTopic": "",
- "willQos": "0",
- "willPayload": ""
- },
- {
- "id": "e35cb18996903762",
- "type": "serial in",
- "z": "41926d3a3c661803",
- "name": "Arduino",
- "serial": "45147d7e.9b5d4",
- "x": 250,
- "y": 240,
- "wires": [
- [
- "8ef48017d3f13ce0"
- ]
- ]
- },
- {
- "id": "8ef48017d3f13ce0",
- "type": "function",
- "z": "41926d3a3c661803",
- "name": "Process Serial Data",
- "func": "var serialData = msg.payload;\nvar accessStatus, uid;\nif (serialData.includes(\"Authorized access\")) {\n accessStatus = \"Authorized access\";\n} else if (serialData.includes(\"Access denied\")) {\n accessStatus = \"Access denied\";\n} \n\nif (serialData.includes(\"UID tag:\")) {\n var startIndex = serialData.indexOf(\"UID tag:\") + 9;\n var endIndex = serialData.indexOf(\"\\n\", startIndex);\n uid = serialData.substring(startIndex, endIndex).trim();\n}\n\nvar payload = {\n \"access_status\": accessStatus,\n \"uid\": uid\n};\n\nmsg.payload = payload;\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 500,
- "y": 240,
- "wires": [
- [
- "70e6596932a64634"
- ]
- ]
- },
- {
- "id": "70e6596932a64634",
- "type": "http request",
- "z": "41926d3a3c661803",
- "name": "Send to ThingsBoard",
- "method": "POST",
- "ret": "obj",
- "paytoqs": "ignore",
- "url": "https://demo.thingsboard.io/api/v1/4xElebfTnUTn4AGgO9Il/telemetry",
- "tls": "",
- "persist": false,
- "proxy": "",
- "insecureHTTPParser": false,
- "authType": "",
- "senderr": false,
- "headers": [],
- "x": 740,
- "y": 240,
- "wires": [
- [
- "0986a592e8dd360a"
- ]
- ]
- },
- {
- "id": "0986a592e8dd360a",
- "type": "debug",
- "z": "41926d3a3c661803",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 950,
- "y": 240,
- "wires": []
- },
- {
- "id": "1b68fcab6c957932",
- "type": "inject",
- "z": "41926d3a3c661803",
- "name": "Test Data",
- "props": [
- {
- "p": "payload",
- "v": "UID tag: 01 23 45 67 Authorized access",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "UID tag: 01 23 45 67 Authorized access",
- "payloadType": "str",
- "x": 280,
- "y": 320,
- "wires": [
- [
- "8ef48017d3f13ce0"
- ]
- ]
- },
- {
- "id": "084f541bf65e7832",
- "type": "inject",
- "z": "41926d3a3c661803",
- "name": "Test Data",
- "props": [
- {
- "p": "payload",
- "v": "UID tag: 89 AB CD EF Access denied",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "UID tag: 89 AB CD EF Access denied",
- "payloadType": "str",
- "x": 280,
- "y": 360,
- "wires": [
- [
- "8ef48017d3f13ce0"
- ]
- ]
- },
- {
- "id": "03acc6ebb83e4c78",
- "type": "inject",
- "z": "ce2ee15a2f0d125e",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "Hello World",
- "payloadType": "str",
- "x": 250,
- "y": 240,
- "wires": [
- [
- "85da90aac498b39d"
- ]
- ]
- },
- {
- "id": "85da90aac498b39d",
- "type": "debug",
- "z": "ce2ee15a2f0d125e",
- "name": "debug 1",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 520,
- "y": 240,
- "wires": []
- },
- {
- "id": "055e3a442c20e9b1",
- "type": "inject",
- "z": "1cc46b7de036ee06",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "Hello World",
- "payloadType": "str",
- "x": 210,
- "y": 180,
- "wires": [
- [
- "c9395b4592c196c0"
- ]
- ]
- },
- {
- "id": "c9395b4592c196c0",
- "type": "function",
- "z": "1cc46b7de036ee06",
- "name": "function 1",
- "func": "let inputString = msg.payload;\n\n// Function to count words and characters\nfunction countWordsAndChars(inputString) {\n // Counting number of characters\n let numChars = inputString.length;\n\n // Counting number of words\n let words = inputString.match(/\\S+/g) || [];\n let numWords = words.length;\n\n return { numChars, numWords };\n}\n\nlet counts = countWordsAndChars(inputString);\n\nmsg.payload = {\n inputString: inputString,\n numChars: counts.numChars,\n numWords: counts.numWords\n};\n\nreturn msg;",
- "outputs": 1,
- "timeout": 0,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 400,
- "y": 260,
- "wires": [
- [
- "e030baa677f5577b"
- ]
- ]
- },
- {
- "id": "e030baa677f5577b",
- "type": "debug",
- "z": "1cc46b7de036ee06",
- "name": "debug 2",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 620,
- "y": 320,
- "wires": []
- },
- {
- "id": "75a5e0e77fcc6ac2",
- "type": "inject",
- "z": "0cf2ae9e184ef779",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "42",
- "payloadType": "num",
- "x": 230,
- "y": 160,
- "wires": [
- [
- "71694c7005595439"
- ]
- ]
- },
- {
- "id": "23bf0cfa1c6dd7d0",
- "type": "debug",
- "z": "0cf2ae9e184ef779",
- "name": "debug 3",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 820,
- "y": 280,
- "wires": []
- },
- {
- "id": "71694c7005595439",
- "type": "function",
- "z": "0cf2ae9e184ef779",
- "name": "function 2",
- "func": "let celsiusTemperature = msg.payload; // Assuming the input payload contains the temperature in degrees Celsius\n\n// Convert Celsius to Fahrenheit using the formula and round the result to 2 decimal places\nlet fahrenheitTemperature = ((celsiusTemperature * 9/5) + 32).toFixed(2);\n\n// Create a new message object to pass the converted temperature to the next node\nmsg.payload = {\n celsius: celsiusTemperature,\n fahrenheit: parseFloat(fahrenheitTemperature) // Parsing to float to remove any trailing zeros\n};\n\nreturn msg;",
- "outputs": 1,
- "timeout": 0,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 500,
- "y": 220,
- "wires": [
- [
- "23bf0cfa1c6dd7d0"
- ]
- ]
- },
- {
- "id": "d2b79dc1.6a8f6",
- "type": "inject",
- "z": "f4ac5258b53676b6",
- "name": "Sensor 1",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "0",
- "payloadType": "num",
- "x": 260,
- "y": 220,
- "wires": [
- [
- "7c8a362f.837d88"
- ]
- ]
- },
- {
- "id": "7c8a362f.837d88",
- "type": "function",
- "z": "f4ac5258b53676b6",
- "name": "AC Control",
- "func": "if (msg.payload === 1) {\n msg.payload = \"AC is ON\";\n} else {\n msg.payload = \"AC is OFF\";\n}\nreturn msg;",
- "outputs": 1,
- "timeout": "",
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 440,
- "y": 220,
- "wires": [
- [
- "a67c744f.598f88",
- "ee84e59f.117f18"
- ]
- ]
- },
- {
- "id": "a67c744f.598f88",
- "type": "debug",
- "z": "f4ac5258b53676b6",
- "name": "AC",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 620,
- "y": 180,
- "wires": []
- },
- {
- "id": "ee84e59f.117f18",
- "type": "join",
- "z": "f4ac5258b53676b6",
- "name": "",
- "mode": "custom",
- "build": "string",
- "property": "payload",
- "propertyType": "msg",
- "key": "topic",
- "joiner": "\\n",
- "joinerType": "str",
- "accumulate": false,
- "timeout": "",
- "count": "2",
- "reduceRight": false,
- "reduceExp": "",
- "reduceInit": "",
- "reduceInitType": "",
- "reduceFixup": "",
- "x": 800,
- "y": 260,
- "wires": [
- [
- "9f5fbb9f.60a048"
- ]
- ]
- },
- {
- "id": "9f5fbb9f.60a048",
- "type": "debug",
- "z": "f4ac5258b53676b6",
- "name": "Combined",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 970,
- "y": 260,
- "wires": []
- },
- {
- "id": "9b2f3cdd.64d0d",
- "type": "inject",
- "z": "f4ac5258b53676b6",
- "name": "Sensor 2",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "1",
- "payloadType": "num",
- "x": 260,
- "y": 300,
- "wires": [
- [
- "6b623c89.949c44"
- ]
- ]
- },
- {
- "id": "6b623c89.949c44",
- "type": "function",
- "z": "f4ac5258b53676b6",
- "name": "Light Control",
- "func": "if (msg.payload === 1) {\n msg.payload = \"LIGHT is ON\";\n} else {\n msg.payload = \"LIGHT is OFF\";\n}\nreturn msg;",
- "outputs": 1,
- "timeout": "",
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 440,
- "y": 300,
- "wires": [
- [
- "b7a4dd8f.48db2",
- "ee84e59f.117f18"
- ]
- ]
- },
- {
- "id": "b7a4dd8f.48db2",
- "type": "debug",
- "z": "f4ac5258b53676b6",
- "name": "Light",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 620,
- "y": 340,
- "wires": []
- },
- {
- "id": "f1",
- "type": "function",
- "z": "714c7b87ef42d921",
- "name": "Calculator",
- "func": "var num1 = msg.payload1;\nvar num2 = msg.payload2;\n\nvar sum = num1 + num2;\nvar difference = num1 - num2;\nvar product = num1 * num2;\nvar quotient = num1 / num2;\n\nmsg.payload = `Sum: ${sum}, Difference: ${difference}, Product: ${product}, Quotient: ${quotient}`;\nreturn msg;",
- "outputs": 1,
- "timeout": "",
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 540,
- "y": 240,
- "wires": [
- [
- "d1"
- ]
- ]
- },
- {
- "id": "i1",
- "type": "inject",
- "z": "714c7b87ef42d921",
- "name": "",
- "props": [
- {
- "p": "payload1",
- "v": "5",
- "vt": "num"
- },
- {
- "p": "payload2",
- "v": "7",
- "vt": "num"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "x": 310,
- "y": 240,
- "wires": [
- [
- "f1"
- ]
- ]
- },
- {
- "id": "d1",
- "type": "debug",
- "z": "714c7b87ef42d921",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 720,
- "y": 240,
- "wires": []
- },
- {
- "id": "05ea7e03b5a630b1",
- "type": "inject",
- "z": "235a9f7bdda75b2d",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "",
- "payloadType": "date",
- "x": 80,
- "y": 340,
- "wires": [
- [
- "7b3d034fbab7a9a2"
- ]
- ]
- },
- {
- "id": "7b3d034fbab7a9a2",
- "type": "openweathermap",
- "z": "235a9f7bdda75b2d",
- "name": "",
- "wtype": "current",
- "lon": "",
- "lat": "",
- "city": "Kolkata",
- "country": "India",
- "language": "en",
- "x": 240,
- "y": 340,
- "wires": [
- [
- "bb6f5631cf45f898",
- "4a2d5bd000949177",
- "037f82cc6ab8cea9",
- "67976486089fbe52",
- "04249040714e5f05"
- ]
- ]
- },
- {
- "id": "bb6f5631cf45f898",
- "type": "function",
- "z": "235a9f7bdda75b2d",
- "name": "Temp",
- "func": "msg.payload=msg.payload.tempc\nreturn msg;",
- "outputs": 1,
- "timeout": 0,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 470,
- "y": 280,
- "wires": [
- [
- "a70ed0faca5e5571"
- ]
- ]
- },
- {
- "id": "04249040714e5f05",
- "type": "function",
- "z": "235a9f7bdda75b2d",
- "name": "Humidity",
- "func": "msg.payload=msg.payload.humidity\nreturn msg;",
- "outputs": 1,
- "timeout": 0,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 520,
- "y": 480,
- "wires": [
- [
- "9f13061b6736f02d"
- ]
- ]
- },
- {
- "id": "4a2d5bd000949177",
- "type": "debug",
- "z": "235a9f7bdda75b2d",
- "name": "debug 4",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 480,
- "y": 340,
- "wires": []
- },
- {
- "id": "67976486089fbe52",
- "type": "ui_text",
- "z": "235a9f7bdda75b2d",
- "group": "a998f1f7a01f8062",
- "order": 2,
- "width": 0,
- "height": 0,
- "name": "",
- "label": "text",
- "format": "",
- "layout": "row-spread",
- "className": "",
- "style": false,
- "font": "",
- "fontSize": 16,
- "color": "#000000",
- "x": 530,
- "y": 440,
- "wires": []
- },
- {
- "id": "037f82cc6ab8cea9",
- "type": "ui_gauge",
- "z": "235a9f7bdda75b2d",
- "name": "",
- "group": "a998f1f7a01f8062",
- "order": 1,
- "width": 0,
- "height": 0,
- "gtype": "gage",
- "title": "gauge",
- "label": "units",
- "format": "{{value}}",
- "min": 0,
- "max": "200",
- "colors": [
- "#00b500",
- "#e6e600",
- "#ca3838"
- ],
- "seg1": "",
- "seg2": "",
- "diff": false,
- "className": "",
- "x": 530,
- "y": 400,
- "wires": []
- },
- {
- "id": "9f13061b6736f02d",
- "type": "ui_numeric",
- "z": "235a9f7bdda75b2d",
- "name": "",
- "label": "numeric",
- "tooltip": "",
- "group": "a998f1f7a01f8062",
- "order": 3,
- "width": 0,
- "height": 0,
- "wrap": false,
- "passthru": true,
- "topic": "topic",
- "topicType": "msg",
- "format": "{{value}}",
- "min": 0,
- "max": "200",
- "step": 1,
- "className": "",
- "x": 720,
- "y": 480,
- "wires": [
- []
- ]
- },
- {
- "id": "a70ed0faca5e5571",
- "type": "ui_chart",
- "z": "235a9f7bdda75b2d",
- "name": "",
- "group": "a998f1f7a01f8062",
- "order": 0,
- "width": 0,
- "height": 0,
- "label": "chart",
- "chartType": "line",
- "legend": "false",
- "xformat": "HH:mm:ss",
- "interpolate": "linear",
- "nodata": "",
- "dot": false,
- "ymin": "",
- "ymax": "",
- "removeOlder": 1,
- "removeOlderPoints": "",
- "removeOlderUnit": "3600",
- "cutout": 0,
- "useOneColor": false,
- "useUTC": false,
- "colors": [
- "#1f77b4",
- "#aec7e8",
- "#ff7f0e",
- "#2ca02c",
- "#98df8a",
- "#d62728",
- "#ff9896",
- "#9467bd",
- "#c5b0d5"
- ],
- "outputs": 1,
- "useDifferentColor": false,
- "className": "",
- "x": 630,
- "y": 240,
- "wires": [
- [
- "0456c1f99cf2dd57"
- ]
- ]
- },
- {
- "id": "0456c1f99cf2dd57",
- "type": "debug",
- "z": "235a9f7bdda75b2d",
- "name": "debug 5",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 760,
- "y": 300,
- "wires": []
- },
- {
- "id": "6cc5c49618ba875c",
- "type": "mqtt in",
- "z": "3758f9118f762f53",
- "name": "",
- "topic": "pabak",
- "qos": "2",
- "datatype": "auto-detect",
- "broker": "37904b3e3e545c4e",
- "nl": false,
- "rap": true,
- "rh": 0,
- "inputs": 0,
- "x": 170,
- "y": 260,
- "wires": [
- [
- "521c37c8a94ee177"
- ]
- ]
- },
- {
- "id": "521c37c8a94ee177",
- "type": "json",
- "z": "3758f9118f762f53",
- "name": "",
- "property": "payload",
- "action": "",
- "pretty": false,
- "x": 370,
- "y": 260,
- "wires": [
- [
- "4816533c5b3d9027"
- ]
- ]
- },
- {
- "id": "4816533c5b3d9027",
- "type": "debug",
- "z": "3758f9118f762f53",
- "name": "debug 6",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 580,
- "y": 260,
- "wires": []
- },
- {
- "id": "e222c07d50534297",
- "type": "mqtt out",
- "z": "3758f9118f762f53",
- "name": "",
- "topic": "pabak",
- "qos": "2",
- "retain": "",
- "respTopic": "",
- "contentType": "",
- "userProps": "",
- "correl": "",
- "expiry": "",
- "broker": "37904b3e3e545c4e",
- "x": 610,
- "y": 400,
- "wires": []
- },
- {
- "id": "14dbfa7778c94be1",
- "type": "json",
- "z": "3758f9118f762f53",
- "name": "",
- "property": "payload",
- "action": "",
- "pretty": false,
- "x": 390,
- "y": 400,
- "wires": [
- [
- "e222c07d50534297"
- ]
- ]
- },
- {
- "id": "b6e7071a01ede5e0",
- "type": "inject",
- "z": "3758f9118f762f53",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "{\"Name\":\"Pabak\",\"Age\":21}",
- "payloadType": "json",
- "x": 170,
- "y": 400,
- "wires": [
- [
- "14dbfa7778c94be1"
- ]
- ]
- },
- {
- "id": "3eaaa554f6eae82f",
- "type": "inject",
- "z": "6e2a90a83fc5b027",
- "name": "Sensor1",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "{\"Humidity\":800,\"Temperature\":210}",
- "payloadType": "json",
- "x": 240,
- "y": 180,
- "wires": [
- [
- "1bae99dfedeb0fc8"
- ]
- ]
- },
- {
- "id": "ebed3ef342829bef",
- "type": "inject",
- "z": "6e2a90a83fc5b027",
- "name": "Sensor2",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "{\"Temperature\":21,\"Humidity\":81}",
- "payloadType": "json",
- "x": 240,
- "y": 400,
- "wires": [
- [
- "1bae99dfedeb0fc8"
- ]
- ]
- },
- {
- "id": "1bae99dfedeb0fc8",
- "type": "http request",
- "z": "6e2a90a83fc5b027",
- "name": "",
- "method": "POST",
- "ret": "txt",
- "paytoqs": "ignore",
- "url": "http://thingsboard.cloud/api/v1/U4wD5YWWV4986k9GPwMK/telemetry",
- "tls": "",
- "persist": false,
- "proxy": "",
- "insecureHTTPParser": false,
- "authType": "",
- "senderr": false,
- "headers": [],
- "x": 510,
- "y": 280,
- "wires": [
- [
- "893ce39bc3fd2b08"
- ]
- ]
- },
- {
- "id": "893ce39bc3fd2b08",
- "type": "debug",
- "z": "6e2a90a83fc5b027",
- "name": "debug 7",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 760,
- "y": 280,
- "wires": []
- },
- {
- "id": "sensorData",
- "type": "mqtt in",
- "z": "32db33e18f3b95b7",
- "name": "Receive Sensor Data",
- "topic": "sensor/data",
- "qos": "2",
- "datatype": "auto-detect",
- "broker": "37904b3e3e545c4e",
- "nl": false,
- "rap": false,
- "inputs": 0,
- "x": 280,
- "y": 300,
- "wires": [
- [
- "f1e114f615f81371"
- ]
- ]
- },
- {
- "id": "processData",
- "type": "function",
- "z": "32db33e18f3b95b7",
- "name": "Process Data",
- "func": "var data = JSON.parse(msg.payload);\nif (data.doorOpen && data.lightLevel < 50) {\n return [{ payload: 'ON' }, { payload: 'OPEN' }];\n} else {\n return [{ payload: 'OFF' }, { payload: 'CLOSE' }];\n}",
- "outputs": 2,
- "timeout": "",
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 580,
- "y": 300,
- "wires": [
- [
- "controlLight"
- ],
- [
- "controlDoor"
- ]
- ]
- },
- {
- "id": "controlLight",
- "type": "mqtt out",
- "z": "32db33e18f3b95b7",
- "name": "Control Light",
- "topic": "light/control",
- "qos": "2",
- "retain": "",
- "respTopic": "",
- "contentType": "",
- "userProps": "",
- "correl": "",
- "expiry": "",
- "broker": "37904b3e3e545c4e",
- "x": 830,
- "y": 220,
- "wires": []
- },
- {
- "id": "controlDoor",
- "type": "mqtt out",
- "z": "32db33e18f3b95b7",
- "name": "Control Door",
- "topic": "door/control",
- "qos": "2",
- "retain": "",
- "respTopic": "",
- "contentType": "",
- "userProps": "",
- "correl": "",
- "expiry": "",
- "broker": "37904b3e3e545c4e",
- "x": 830,
- "y": 360,
- "wires": []
- },
- {
- "id": "f1e114f615f81371",
- "type": "json",
- "z": "32db33e18f3b95b7",
- "name": "",
- "property": "payload",
- "action": "",
- "pretty": false,
- "x": 430,
- "y": 380,
- "wires": [
- [
- "processData"
- ]
- ]
- },
- {
- "id": "1ed46e1a54716e85",
- "type": "debug",
- "z": "c4ac0eaa5c5dbdc6",
- "name": "debug 8",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 760,
- "y": 220,
- "wires": []
- },
- {
- "id": "bf7857b242de28eb",
- "type": "fileinput",
- "z": "c4ac0eaa5c5dbdc6",
- "name": "",
- "datatype": "str",
- "stream": "yes",
- "property": "payload",
- "propertyType": "msg",
- "x": 120,
- "y": 240,
- "wires": [
- [
- "9f8bcb18c1bc213a"
- ]
- ]
- },
- {
- "id": "58506c6ff0451610",
- "type": "ui_table",
- "z": "c4ac0eaa5c5dbdc6",
- "group": "aa6f18c102a28853",
- "name": "",
- "order": 4,
- "width": 0,
- "height": 0,
- "columns": [],
- "outputs": 0,
- "cts": false,
- "x": 770,
- "y": 320,
- "wires": []
- },
- {
- "id": "9f8bcb18c1bc213a",
- "type": "csv",
- "z": "c4ac0eaa5c5dbdc6",
- "name": "",
- "sep": ",",
- "hdrin": "",
- "hdrout": "none",
- "multi": "one",
- "ret": "\\n",
- "temp": "",
- "skip": "0",
- "strings": true,
- "include_empty_strings": "",
- "include_null_values": "",
- "x": 430,
- "y": 240,
- "wires": [
- [
- "1ed46e1a54716e85",
- "58506c6ff0451610"
- ]
- ]
- },
- {
- "id": "httpInNode",
- "type": "http in",
- "z": "940823eccfda4529",
- "name": "Receive CSV File",
- "url": "http://127.0.0.1:1880/",
- "method": "post",
- "upload": true,
- "swaggerDoc": "",
- "x": 240,
- "y": 320,
- "wires": [
- [
- "csvNode"
- ]
- ]
- },
- {
- "id": "csvNode",
- "type": "csv",
- "z": "940823eccfda4529",
- "name": "Parse CSV",
- "sep": ",",
- "hdrin": true,
- "hdrout": "",
- "multi": "one",
- "ret": "\\n",
- "temp": "",
- "skip": "0",
- "strings": true,
- "include_empty_strings": "",
- "include_null_values": "",
- "x": 430,
- "y": 240,
- "wires": [
- [
- "functionNode"
- ]
- ]
- },
- {
- "id": "functionNode",
- "type": "function",
- "z": "940823eccfda4529",
- "name": "Convert to JSON",
- "func": "msg.payload = JSON.stringify(msg.payload);\nreturn msg;",
- "outputs": 1,
- "timeout": "",
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 670,
- "y": 460,
- "wires": [
- [
- "httpResponseNode"
- ]
- ]
- },
- {
- "id": "httpResponseNode",
- "type": "http response",
- "z": "940823eccfda4529",
- "name": "Send Response",
- "statusCode": "",
- "headers": {},
- "x": 860,
- "y": 240,
- "wires": []
- }
- ]
[text] CTC_FLOW
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Editor
You can edit this paste and save as new:
File Description
- CTC_FLOW
- Paste Code
- 29 Apr-2024
- 41.16 Kb
You can Share it:
Latest Code Pastes