[text] paste2

Viewer

  1. [
  2.     {
  3.         "id": "41926d3a3c661803",
  4.         "type": "tab",
  5.         "label": "RFID_Project",
  6.         "disabled": false,
  7.         "info": "",
  8.         "env": []
  9.     },
  10.     {
  11.         "id": "ce2ee15a2f0d125e",
  12.         "type": "tab",
  13.         "label": "Hello World",
  14.         "disabled": false,
  15.         "info": "",
  16.         "env": []
  17.     },
  18.     {
  19.         "id": "1cc46b7de036ee06",
  20.         "type": "tab",
  21.         "label": "Count chars and words",
  22.         "disabled": false,
  23.         "info": "",
  24.         "env": []
  25.     },
  26.     {
  27.         "id": "0cf2ae9e184ef779",
  28.         "type": "tab",
  29.         "label": "Celsius to Farhanheit",
  30.         "disabled": false,
  31.         "info": "",
  32.         "env": []
  33.     },
  34.     {
  35.         "id": "f4ac5258b53676b6",
  36.         "type": "tab",
  37.         "label": "AC & Light control",
  38.         "disabled": false,
  39.         "info": "",
  40.         "env": []
  41.     },
  42.     {
  43.         "id": "714c7b87ef42d921",
  44.         "type": "tab",
  45.         "label": "Calculator using 2 numbers",
  46.         "disabled": false,
  47.         "info": "",
  48.         "env": []
  49.     },
  50.     {
  51.         "id": "235a9f7bdda75b2d",
  52.         "type": "tab",
  53.         "label": "OpenWeathermap",
  54.         "disabled": false,
  55.         "info": "",
  56.         "env": []
  57.     },
  58.     {
  59.         "id": "3758f9118f762f53",
  60.         "type": "tab",
  61.         "label": "hivemq",
  62.         "disabled": false,
  63.         "info": "",
  64.         "env": []
  65.     },
  66.     {
  67.         "id": "6e2a90a83fc5b027",
  68.         "type": "tab",
  69.         "label": "HTTP",
  70.         "disabled": false,
  71.         "info": "",
  72.         "env": []
  73.     },
  74.     {
  75.         "id": "32db33e18f3b95b7",
  76.         "type": "tab",
  77.         "label": "Automatic door and light control",
  78.         "disabled": false,
  79.         "info": "",
  80.         "env": []
  81.     },
  82.     {
  83.         "id": "c4ac0eaa5c5dbdc6",
  84.         "type": "tab",
  85.         "label": "Flow 1",
  86.         "disabled": false,
  87.         "info": "",
  88.         "env": []
  89.     },
  90.     {
  91.         "id": "789d1af429bc9136",
  92.         "type": "tab",
  93.         "label": "Flow 3",
  94.         "disabled": false,
  95.         "info": "",
  96.         "env": []
  97.     },
  98.     {
  99.         "id": "5b634678967f4056",
  100.         "type": "ui_group",
  101.         "name": "IOT",
  102.         "tab": "",
  103.         "disp": true,
  104.         "width": "6",
  105.         "collapse": false,
  106.         "className": ""
  107.     },
  108.     {
  109.         "id": "37904b3e3e545c4e",
  110.         "type": "mqtt-broker",
  111.         "name": "",
  112.         "broker": "http://broker.mqtt-dashboard.com",
  113.         "port": "8884",
  114.         "clientid": "",
  115.         "autoConnect": true,
  116.         "usetls": false,
  117.         "protocolVersion": "4",
  118.         "keepalive": "60",
  119.         "cleansession": true,
  120.         "autoUnsubscribe": true,
  121.         "birthTopic": "topic",
  122.         "birthQos": "0",
  123.         "birthRetain": "false",
  124.         "birthPayload": "",
  125.         "birthMsg": {},
  126.         "closeTopic": "",
  127.         "closeQos": "0",
  128.         "closeRetain": "false",
  129.         "closePayload": "",
  130.         "closeMsg": {},
  131.         "willTopic": "",
  132.         "willQos": "0",
  133.         "willRetain": "false",
  134.         "willPayload": "",
  135.         "willMsg": {},
  136.         "userProps": "",
  137.         "sessionExpiry": ""
  138.     },
  139.     {
  140.         "id": "47d3564b5f34c36d",
  141.         "type": "ui_base",
  142.         "theme": {
  143.             "name": "theme-light",
  144.             "lightTheme": {
  145.                 "default": "#0094CE",
  146.                 "baseColor": "#0094CE",
  147.                 "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
  148.                 "edited": true,
  149.                 "reset": false
  150.             },
  151.             "darkTheme": {
  152.                 "default": "#097479",
  153.                 "baseColor": "#097479",
  154.                 "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
  155.                 "edited": false
  156.             },
  157.             "customTheme": {
  158.                 "name": "Untitled Theme 1",
  159.                 "default": "#4B7930",
  160.                 "baseColor": "#4B7930",
  161.                 "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
  162.             },
  163.             "themeState": {
  164.                 "base-color": {
  165.                     "default": "#0094CE",
  166.                     "value": "#0094CE",
  167.                     "edited": false
  168.                 },
  169.                 "page-titlebar-backgroundColor": {
  170.                     "value": "#0094CE",
  171.                     "edited": false
  172.                 },
  173.                 "page-backgroundColor": {
  174.                     "value": "#fafafa",
  175.                     "edited": false
  176.                 },
  177.                 "page-sidebar-backgroundColor": {
  178.                     "value": "#ffffff",
  179.                     "edited": false
  180.                 },
  181.                 "group-textColor": {
  182.                     "value": "#1bbfff",
  183.                     "edited": false
  184.                 },
  185.                 "group-borderColor": {
  186.                     "value": "#ffffff",
  187.                     "edited": false
  188.                 },
  189.                 "group-backgroundColor": {
  190.                     "value": "#ffffff",
  191.                     "edited": false
  192.                 },
  193.                 "widget-textColor": {
  194.                     "value": "#111111",
  195.                     "edited": false
  196.                 },
  197.                 "widget-backgroundColor": {
  198.                     "value": "#0094ce",
  199.                     "edited": false
  200.                 },
  201.                 "widget-borderColor": {
  202.                     "value": "#ffffff",
  203.                     "edited": false
  204.                 },
  205.                 "base-font": {
  206.                     "value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
  207.                 }
  208.             },
  209.             "angularTheme": {
  210.                 "primary": "indigo",
  211.                 "accents": "blue",
  212.                 "warn": "red",
  213.                 "background": "grey",
  214.                 "palette": "light"
  215.             }
  216.         },
  217.         "site": {
  218.             "name": "Node-RED Dashboard",
  219.             "hideToolbar": "false",
  220.             "allowSwipe": "false",
  221.             "lockMenu": "false",
  222.             "allowTempTheme": "true",
  223.             "dateFormat": "DD/MM/YYYY",
  224.             "sizes": {
  225.                 "sx": 48,
  226.                 "sy": 48,
  227.                 "gx": 6,
  228.                 "gy": 6,
  229.                 "cx": 6,
  230.                 "cy": 6,
  231.                 "px": 0,
  232.                 "py": 0
  233.             }
  234.         }
  235.     },
  236.     {
  237.         "id": "aa6f18c102a28853",
  238.         "type": "ui_group",
  239.         "name": "Group 1",
  240.         "tab": "",
  241.         "order": 1,
  242.         "disp": true,
  243.         "width": "6",
  244.         "collapse": false,
  245.         "className": ""
  246.     },
  247.     {
  248.         "id": "a6b365329fd2f00a",
  249.         "type": "ui_group",
  250.         "name": "Group 2",
  251.         "tab": "",
  252.         "order": 2,
  253.         "disp": true,
  254.         "width": 6
  255.     },
  256.     {
  257.         "id": "205971f27c08bd86",
  258.         "type": "ui_group",
  259.         "name": "Group 3",
  260.         "tab": "",
  261.         "order": 3,
  262.         "disp": true,
  263.         "width": 6
  264.     },
  265.     {
  266.         "id": "7b4df4ab067ff50d",
  267.         "type": "ui_group",
  268.         "name": "Group 4",
  269.         "tab": "",
  270.         "order": 4,
  271.         "disp": true,
  272.         "width": 6
  273.     },
  274.     {
  275.         "id": "1ebaae31a6a9852c",
  276.         "type": "ui_tab",
  277.         "name": "Tab 1",
  278.         "icon": "dashboard",
  279.         "order": 1,
  280.         "disabled": false,
  281.         "hidden": false
  282.     },
  283.     {
  284.         "id": "809d226772e7b298",
  285.         "type": "ui_group",
  286.         "name": "Group 1",
  287.         "tab": "1ebaae31a6a9852c",
  288.         "order": 1,
  289.         "disp": true,
  290.         "width": "6",
  291.         "collapse": false,
  292.         "className": ""
  293.     },
  294.     {
  295.         "id": "24af98fc20927339",
  296.         "type": "ui_spacer",
  297.         "z": "ce2ee15a2f0d125e",
  298.         "name": "spacer",
  299.         "group": "809d226772e7b298",
  300.         "order": 1,
  301.         "width": 1,
  302.         "height": 1
  303.     },
  304.     {
  305.         "id": "67120247d418b814",
  306.         "type": "ui_spacer",
  307.         "z": "ce2ee15a2f0d125e",
  308.         "name": "spacer",
  309.         "group": "809d226772e7b298",
  310.         "order": 2,
  311.         "width": 1,
  312.         "height": 1
  313.     },
  314.     {
  315.         "id": "3d2e85f49e83fdc3",
  316.         "type": "serial-port",
  317.         "name": "",
  318.         "serialport": "",
  319.         "serialbaud": "57600",
  320.         "databits": "8",
  321.         "parity": "none",
  322.         "stopbits": "1",
  323.         "waitfor": "",
  324.         "dtr": "none",
  325.         "rts": "none",
  326.         "cts": "none",
  327.         "dsr": "none",
  328.         "newline": "\\n",
  329.         "bin": "false",
  330.         "out": "char",
  331.         "addchar": "",
  332.         "responsetimeout": "10000"
  333.     },
  334.     {
  335.         "id": "ecec01c9b7ecd1b1",
  336.         "type": "ui_tab",
  337.         "name": "Tab 2",
  338.         "icon": "dashboard",
  339.         "order": 2
  340.     },
  341.     {
  342.         "id": "8ddf37774f55c8cf",
  343.         "type": "ui_group",
  344.         "name": "Group 1",
  345.         "tab": "ecec01c9b7ecd1b1",
  346.         "order": 1,
  347.         "disp": true,
  348.         "width": "6",
  349.         "collapse": false,
  350.         "className": ""
  351.     },
  352.     {
  353.         "id": "45147d7e.9b5d4",
  354.         "type": "serial-port",
  355.         "name": "",
  356.         "serialport": "COM6",
  357.         "serialbaud": "9600",
  358.         "databits": "8",
  359.         "parity": "none",
  360.         "stopbits": "1",
  361.         "waitfor": "",
  362.         "newline": "\\n",
  363.         "bin": "false",
  364.         "out": "char",
  365.         "addchar": "false",
  366.         "responsetimeout": ""
  367.     },
  368.     {
  369.         "id": "a998f1f7a01f8062",
  370.         "type": "ui_group",
  371.         "name": "CPS",
  372.         "tab": "1ebaae31a6a9852c",
  373.         "order": 2,
  374.         "disp": true,
  375.         "width": "6",
  376.         "collapse": false,
  377.         "className": ""
  378.     },
  379.     {
  380.         "id": "mqttBroker",
  381.         "type": "mqtt-broker",
  382.         "name": "",
  383.         "broker": "mqtt://localhost",
  384.         "port": "1883",
  385.         "clientid": "",
  386.         "usetls": false,
  387.         "compatmode": true,
  388.         "keepalive": "60",
  389.         "cleansession": true,
  390.         "birthTopic": "",
  391.         "birthQos": "0",
  392.         "birthPayload": "",
  393.         "closeTopic": "",
  394.         "closeQos": "0",
  395.         "closePayload": "",
  396.         "willTopic": "",
  397.         "willQos": "0",
  398.         "willPayload": ""
  399.     },
  400.     {
  401.         "id": "e35cb18996903762",
  402.         "type": "serial in",
  403.         "z": "41926d3a3c661803",
  404.         "name": "Arduino",
  405.         "serial": "45147d7e.9b5d4",
  406.         "x": 250,
  407.         "y": 240,
  408.         "wires": [
  409.             [
  410.                 "8ef48017d3f13ce0"
  411.             ]
  412.         ]
  413.     },
  414.     {
  415.         "id": "8ef48017d3f13ce0",
  416.         "type": "function",
  417.         "z": "41926d3a3c661803",
  418.         "name": "Process Serial Data",
  419.         "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;",
  420.         "outputs": 1,
  421.         "noerr": 0,
  422.         "initialize": "",
  423.         "finalize": "",
  424.         "libs": [],
  425.         "x": 500,
  426.         "y": 240,
  427.         "wires": [
  428.             [
  429.                 "70e6596932a64634"
  430.             ]
  431.         ]
  432.     },
  433.     {
  434.         "id": "70e6596932a64634",
  435.         "type": "http request",
  436.         "z": "41926d3a3c661803",
  437.         "name": "Send to ThingsBoard",
  438.         "method": "POST",
  439.         "ret": "obj",
  440.         "paytoqs": "ignore",
  441.         "url": "https://demo.thingsboard.io/api/v1/4xElebfTnUTn4AGgO9Il/telemetry",
  442.         "tls": "",
  443.         "persist": false,
  444.         "proxy": "",
  445.         "insecureHTTPParser": false,
  446.         "authType": "",
  447.         "senderr": false,
  448.         "headers": [],
  449.         "x": 740,
  450.         "y": 240,
  451.         "wires": [
  452.             [
  453.                 "0986a592e8dd360a"
  454.             ]
  455.         ]
  456.     },
  457.     {
  458.         "id": "0986a592e8dd360a",
  459.         "type": "debug",
  460.         "z": "41926d3a3c661803",
  461.         "name": "",
  462.         "active": true,
  463.         "tosidebar": true,
  464.         "console": false,
  465.         "tostatus": false,
  466.         "complete": "payload",
  467.         "targetType": "msg",
  468.         "statusVal": "",
  469.         "statusType": "auto",
  470.         "x": 950,
  471.         "y": 240,
  472.         "wires": []
  473.     },
  474.     {
  475.         "id": "1b68fcab6c957932",
  476.         "type": "inject",
  477.         "z": "41926d3a3c661803",
  478.         "name": "Test Data",
  479.         "props": [
  480.             {
  481.                 "p": "payload",
  482.                 "v": "UID tag: 01 23 45 67 Authorized access",
  483.                 "vt": "str"
  484.             }
  485.         ],
  486.         "repeat": "",
  487.         "crontab": "",
  488.         "once": false,
  489.         "onceDelay": 0.1,
  490.         "topic": "",
  491.         "payload": "UID tag: 01 23 45 67 Authorized access",
  492.         "payloadType": "str",
  493.         "x": 280,
  494.         "y": 320,
  495.         "wires": [
  496.             [
  497.                 "8ef48017d3f13ce0"
  498.             ]
  499.         ]
  500.     },
  501.     {
  502.         "id": "084f541bf65e7832",
  503.         "type": "inject",
  504.         "z": "41926d3a3c661803",
  505.         "name": "Test Data",
  506.         "props": [
  507.             {
  508.                 "p": "payload",
  509.                 "v": "UID tag: 89 AB CD EF Access denied",
  510.                 "vt": "str"
  511.             }
  512.         ],
  513.         "repeat": "",
  514.         "crontab": "",
  515.         "once": false,
  516.         "onceDelay": 0.1,
  517.         "topic": "",
  518.         "payload": "UID tag: 89 AB CD EF Access denied",
  519.         "payloadType": "str",
  520.         "x": 280,
  521.         "y": 360,
  522.         "wires": [
  523.             [
  524.                 "8ef48017d3f13ce0"
  525.             ]
  526.         ]
  527.     },
  528.     {
  529.         "id": "03acc6ebb83e4c78",
  530.         "type": "inject",
  531.         "z": "ce2ee15a2f0d125e",
  532.         "name": "",
  533.         "props": [
  534.             {
  535.                 "p": "payload"
  536.             },
  537.             {
  538.                 "p": "topic",
  539.                 "vt": "str"
  540.             }
  541.         ],
  542.         "repeat": "",
  543.         "crontab": "",
  544.         "once": false,
  545.         "onceDelay": 0.1,
  546.         "topic": "",
  547.         "payload": "Hello World",
  548.         "payloadType": "str",
  549.         "x": 250,
  550.         "y": 240,
  551.         "wires": [
  552.             [
  553.                 "85da90aac498b39d"
  554.             ]
  555.         ]
  556.     },
  557.     {
  558.         "id": "85da90aac498b39d",
  559.         "type": "debug",
  560.         "z": "ce2ee15a2f0d125e",
  561.         "name": "debug 1",
  562.         "active": true,
  563.         "tosidebar": true,
  564.         "console": false,
  565.         "tostatus": false,
  566.         "complete": "false",
  567.         "statusVal": "",
  568.         "statusType": "auto",
  569.         "x": 520,
  570.         "y": 240,
  571.         "wires": []
  572.     },
  573.     {
  574.         "id": "055e3a442c20e9b1",
  575.         "type": "inject",
  576.         "z": "1cc46b7de036ee06",
  577.         "name": "",
  578.         "props": [
  579.             {
  580.                 "p": "payload"
  581.             },
  582.             {
  583.                 "p": "topic",
  584.                 "vt": "str"
  585.             }
  586.         ],
  587.         "repeat": "",
  588.         "crontab": "",
  589.         "once": false,
  590.         "onceDelay": 0.1,
  591.         "topic": "",
  592.         "payload": "Hello World",
  593.         "payloadType": "str",
  594.         "x": 210,
  595.         "y": 180,
  596.         "wires": [
  597.             [
  598.                 "c9395b4592c196c0"
  599.             ]
  600.         ]
  601.     },
  602.     {
  603.         "id": "c9395b4592c196c0",
  604.         "type": "function",
  605.         "z": "1cc46b7de036ee06",
  606.         "name": "function 1",
  607.         "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;",
  608.         "outputs": 1,
  609.         "timeout": 0,
  610.         "noerr": 0,
  611.         "initialize": "",
  612.         "finalize": "",
  613.         "libs": [],
  614.         "x": 400,
  615.         "y": 260,
  616.         "wires": [
  617.             [
  618.                 "e030baa677f5577b"
  619.             ]
  620.         ]
  621.     },
  622.     {
  623.         "id": "e030baa677f5577b",
  624.         "type": "debug",
  625.         "z": "1cc46b7de036ee06",
  626.         "name": "debug 2",
  627.         "active": true,
  628.         "tosidebar": true,
  629.         "console": false,
  630.         "tostatus": false,
  631.         "complete": "false",
  632.         "statusVal": "",
  633.         "statusType": "auto",
  634.         "x": 620,
  635.         "y": 320,
  636.         "wires": []
  637.     },
  638.     {
  639.         "id": "75a5e0e77fcc6ac2",
  640.         "type": "inject",
  641.         "z": "0cf2ae9e184ef779",
  642.         "name": "",
  643.         "props": [
  644.             {
  645.                 "p": "payload"
  646.             },
  647.             {
  648.                 "p": "topic",
  649.                 "vt": "str"
  650.             }
  651.         ],
  652.         "repeat": "",
  653.         "crontab": "",
  654.         "once": false,
  655.         "onceDelay": 0.1,
  656.         "topic": "",
  657.         "payload": "42",
  658.         "payloadType": "num",
  659.         "x": 230,
  660.         "y": 160,
  661.         "wires": [
  662.             [
  663.                 "71694c7005595439"
  664.             ]
  665.         ]
  666.     },
  667.     {
  668.         "id": "23bf0cfa1c6dd7d0",
  669.         "type": "debug",
  670.         "z": "0cf2ae9e184ef779",
  671.         "name": "debug 3",
  672.         "active": true,
  673.         "tosidebar": true,
  674.         "console": false,
  675.         "tostatus": false,
  676.         "complete": "false",
  677.         "statusVal": "",
  678.         "statusType": "auto",
  679.         "x": 820,
  680.         "y": 280,
  681.         "wires": []
  682.     },
  683.     {
  684.         "id": "71694c7005595439",
  685.         "type": "function",
  686.         "z": "0cf2ae9e184ef779",
  687.         "name": "function 2",
  688.         "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;",
  689.         "outputs": 1,
  690.         "timeout": 0,
  691.         "noerr": 0,
  692.         "initialize": "",
  693.         "finalize": "",
  694.         "libs": [],
  695.         "x": 500,
  696.         "y": 220,
  697.         "wires": [
  698.             [
  699.                 "23bf0cfa1c6dd7d0"
  700.             ]
  701.         ]
  702.     },
  703.     {
  704.         "id": "d2b79dc1.6a8f6",
  705.         "type": "inject",
  706.         "z": "f4ac5258b53676b6",
  707.         "name": "Sensor 1",
  708.         "props": [
  709.             {
  710.                 "p": "payload"
  711.             },
  712.             {
  713.                 "p": "topic",
  714.                 "vt": "str"
  715.             }
  716.         ],
  717.         "repeat": "",
  718.         "crontab": "",
  719.         "once": false,
  720.         "onceDelay": 0.1,
  721.         "topic": "",
  722.         "payload": "0",
  723.         "payloadType": "num",
  724.         "x": 260,
  725.         "y": 220,
  726.         "wires": [
  727.             [
  728.                 "7c8a362f.837d88"
  729.             ]
  730.         ]
  731.     },
  732.     {
  733.         "id": "7c8a362f.837d88",
  734.         "type": "function",
  735.         "z": "f4ac5258b53676b6",
  736.         "name": "AC Control",
  737.         "func": "if (msg.payload === 1) {\n    msg.payload = \"AC is ON\";\n} else {\n    msg.payload = \"AC is OFF\";\n}\nreturn msg;",
  738.         "outputs": 1,
  739.         "timeout": "",
  740.         "noerr": 0,
  741.         "initialize": "",
  742.         "finalize": "",
  743.         "libs": [],
  744.         "x": 440,
  745.         "y": 220,
  746.         "wires": [
  747.             [
  748.                 "a67c744f.598f88",
  749.                 "ee84e59f.117f18"
  750.             ]
  751.         ]
  752.     },
  753.     {
  754.         "id": "a67c744f.598f88",
  755.         "type": "debug",
  756.         "z": "f4ac5258b53676b6",
  757.         "name": "AC",
  758.         "active": true,
  759.         "tosidebar": true,
  760.         "console": false,
  761.         "tostatus": false,
  762.         "complete": "payload",
  763.         "targetType": "msg",
  764.         "statusVal": "",
  765.         "statusType": "auto",
  766.         "x": 620,
  767.         "y": 180,
  768.         "wires": []
  769.     },
  770.     {
  771.         "id": "ee84e59f.117f18",
  772.         "type": "join",
  773.         "z": "f4ac5258b53676b6",
  774.         "name": "",
  775.         "mode": "custom",
  776.         "build": "string",
  777.         "property": "payload",
  778.         "propertyType": "msg",
  779.         "key": "topic",
  780.         "joiner": "\\n",
  781.         "joinerType": "str",
  782.         "accumulate": false,
  783.         "timeout": "",
  784.         "count": "2",
  785.         "reduceRight": false,
  786.         "reduceExp": "",
  787.         "reduceInit": "",
  788.         "reduceInitType": "",
  789.         "reduceFixup": "",
  790.         "x": 800,
  791.         "y": 260,
  792.         "wires": [
  793.             [
  794.                 "9f5fbb9f.60a048"
  795.             ]
  796.         ]
  797.     },
  798.     {
  799.         "id": "9f5fbb9f.60a048",
  800.         "type": "debug",
  801.         "z": "f4ac5258b53676b6",
  802.         "name": "Combined",
  803.         "active": true,
  804.         "tosidebar": true,
  805.         "console": false,
  806.         "tostatus": false,
  807.         "complete": "payload",
  808.         "targetType": "msg",
  809.         "statusVal": "",
  810.         "statusType": "auto",
  811.         "x": 970,
  812.         "y": 260,
  813.         "wires": []
  814.     },
  815.     {
  816.         "id": "9b2f3cdd.64d0d",
  817.         "type": "inject",
  818.         "z": "f4ac5258b53676b6",
  819.         "name": "Sensor 2",
  820.         "props": [
  821.             {
  822.                 "p": "payload"
  823.             },
  824.             {
  825.                 "p": "topic",
  826.                 "vt": "str"
  827.             }
  828.         ],
  829.         "repeat": "",
  830.         "crontab": "",
  831.         "once": false,
  832.         "onceDelay": 0.1,
  833.         "topic": "",
  834.         "payload": "1",
  835.         "payloadType": "num",
  836.         "x": 260,
  837.         "y": 300,
  838.         "wires": [
  839.             [
  840.                 "6b623c89.949c44"
  841.             ]
  842.         ]
  843.     },
  844.     {
  845.         "id": "6b623c89.949c44",
  846.         "type": "function",
  847.         "z": "f4ac5258b53676b6",
  848.         "name": "Light Control",
  849.         "func": "if (msg.payload === 1) {\n    msg.payload = \"LIGHT is ON\";\n} else {\n    msg.payload = \"LIGHT is OFF\";\n}\nreturn msg;",
  850.         "outputs": 1,
  851.         "timeout": "",
  852.         "noerr": 0,
  853.         "initialize": "",
  854.         "finalize": "",
  855.         "libs": [],
  856.         "x": 440,
  857.         "y": 300,
  858.         "wires": [
  859.             [
  860.                 "b7a4dd8f.48db2",
  861.                 "ee84e59f.117f18"
  862.             ]
  863.         ]
  864.     },
  865.     {
  866.         "id": "b7a4dd8f.48db2",
  867.         "type": "debug",
  868.         "z": "f4ac5258b53676b6",
  869.         "name": "Light",
  870.         "active": true,
  871.         "tosidebar": true,
  872.         "console": false,
  873.         "tostatus": false,
  874.         "complete": "payload",
  875.         "targetType": "msg",
  876.         "statusVal": "",
  877.         "statusType": "auto",
  878.         "x": 620,
  879.         "y": 340,
  880.         "wires": []
  881.     },
  882.     {
  883.         "id": "f1",
  884.         "type": "function",
  885.         "z": "714c7b87ef42d921",
  886.         "name": "Calculator",
  887.         "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;",
  888.         "outputs": 1,
  889.         "timeout": "",
  890.         "noerr": 0,
  891.         "initialize": "",
  892.         "finalize": "",
  893.         "libs": [],
  894.         "x": 540,
  895.         "y": 240,
  896.         "wires": [
  897.             [
  898.                 "d1"
  899.             ]
  900.         ]
  901.     },
  902.     {
  903.         "id": "i1",
  904.         "type": "inject",
  905.         "z": "714c7b87ef42d921",
  906.         "name": "",
  907.         "props": [
  908.             {
  909.                 "p": "payload1",
  910.                 "v": "5",
  911.                 "vt": "num"
  912.             },
  913.             {
  914.                 "p": "payload2",
  915.                 "v": "7",
  916.                 "vt": "num"
  917.             },
  918.             {
  919.                 "p": "topic",
  920.                 "vt": "str"
  921.             }
  922.         ],
  923.         "repeat": "",
  924.         "crontab": "",
  925.         "once": false,
  926.         "onceDelay": 0.1,
  927.         "topic": "",
  928.         "x": 310,
  929.         "y": 240,
  930.         "wires": [
  931.             [
  932.                 "f1"
  933.             ]
  934.         ]
  935.     },
  936.     {
  937.         "id": "d1",
  938.         "type": "debug",
  939.         "z": "714c7b87ef42d921",
  940.         "name": "",
  941.         "active": true,
  942.         "tosidebar": true,
  943.         "console": false,
  944.         "tostatus": false,
  945.         "complete": "payload",
  946.         "targetType": "msg",
  947.         "statusVal": "",
  948.         "statusType": "auto",
  949.         "x": 720,
  950.         "y": 240,
  951.         "wires": []
  952.     },
  953.     {
  954.         "id": "05ea7e03b5a630b1",
  955.         "type": "inject",
  956.         "z": "235a9f7bdda75b2d",
  957.         "name": "",
  958.         "props": [
  959.             {
  960.                 "p": "payload"
  961.             },
  962.             {
  963.                 "p": "topic",
  964.                 "vt": "str"
  965.             }
  966.         ],
  967.         "repeat": "",
  968.         "crontab": "",
  969.         "once": false,
  970.         "onceDelay": 0.1,
  971.         "topic": "",
  972.         "payload": "",
  973.         "payloadType": "date",
  974.         "x": 80,
  975.         "y": 340,
  976.         "wires": [
  977.             [
  978.                 "7b3d034fbab7a9a2"
  979.             ]
  980.         ]
  981.     },
  982.     {
  983.         "id": "7b3d034fbab7a9a2",
  984.         "type": "openweathermap",
  985.         "z": "235a9f7bdda75b2d",
  986.         "name": "",
  987.         "wtype": "current",
  988.         "lon": "",
  989.         "lat": "",
  990.         "city": "Kolkata",
  991.         "country": "India",
  992.         "language": "en",
  993.         "x": 240,
  994.         "y": 340,
  995.         "wires": [
  996.             [
  997.                 "bb6f5631cf45f898",
  998.                 "4a2d5bd000949177",
  999.                 "037f82cc6ab8cea9",
  1000.                 "67976486089fbe52",
  1001.                 "04249040714e5f05"
  1002.             ]
  1003.         ]
  1004.     },
  1005.     {
  1006.         "id": "bb6f5631cf45f898",
  1007.         "type": "function",
  1008.         "z": "235a9f7bdda75b2d",
  1009.         "name": "Temp",
  1010.         "func": "msg.payload=msg.payload.tempc\nreturn msg;",
  1011.         "outputs": 1,
  1012.         "timeout": 0,
  1013.         "noerr": 0,
  1014.         "initialize": "",
  1015.         "finalize": "",
  1016.         "libs": [],
  1017.         "x": 470,
  1018.         "y": 280,
  1019.         "wires": [
  1020.             [
  1021.                 "a70ed0faca5e5571"
  1022.             ]
  1023.         ]
  1024.     },
  1025.     {
  1026.         "id": "04249040714e5f05",
  1027.         "type": "function",
  1028.         "z": "235a9f7bdda75b2d",
  1029.         "name": "Humidity",
  1030.         "func": "msg.payload=msg.payload.humidity\nreturn msg;",
  1031.         "outputs": 1,
  1032.         "timeout": 0,
  1033.         "noerr": 0,
  1034.         "initialize": "",
  1035.         "finalize": "",
  1036.         "libs": [],
  1037.         "x": 520,
  1038.         "y": 480,
  1039.         "wires": [
  1040.             [
  1041.                 "9f13061b6736f02d"
  1042.             ]
  1043.         ]
  1044.     },
  1045.     {
  1046.         "id": "4a2d5bd000949177",
  1047.         "type": "debug",
  1048.         "z": "235a9f7bdda75b2d",
  1049.         "name": "debug 4",
  1050.         "active": true,
  1051.         "tosidebar": true,
  1052.         "console": false,
  1053.         "tostatus": false,
  1054.         "complete": "false",
  1055.         "statusVal": "",
  1056.         "statusType": "auto",
  1057.         "x": 480,
  1058.         "y": 340,
  1059.         "wires": []
  1060.     },
  1061.     {
  1062.         "id": "67976486089fbe52",
  1063.         "type": "ui_text",
  1064.         "z": "235a9f7bdda75b2d",
  1065.         "group": "a998f1f7a01f8062",
  1066.         "order": 2,
  1067.         "width": 0,
  1068.         "height": 0,
  1069.         "name": "",
  1070.         "label": "text",
  1071.         "format": "",
  1072.         "layout": "row-spread",
  1073.         "className": "",
  1074.         "style": false,
  1075.         "font": "",
  1076.         "fontSize": 16,
  1077.         "color": "#000000",
  1078.         "x": 530,
  1079.         "y": 440,
  1080.         "wires": []
  1081.     },
  1082.     {
  1083.         "id": "037f82cc6ab8cea9",
  1084.         "type": "ui_gauge",
  1085.         "z": "235a9f7bdda75b2d",
  1086.         "name": "",
  1087.         "group": "a998f1f7a01f8062",
  1088.         "order": 1,
  1089.         "width": 0,
  1090.         "height": 0,
  1091.         "gtype": "gage",
  1092.         "title": "gauge",
  1093.         "label": "units",
  1094.         "format": "{{value}}",
  1095.         "min": 0,
  1096.         "max": "200",
  1097.         "colors": [
  1098.             "#00b500",
  1099.             "#e6e600",
  1100.             "#ca3838"
  1101.         ],
  1102.         "seg1": "",
  1103.         "seg2": "",
  1104.         "diff": false,
  1105.         "className": "",
  1106.         "x": 530,
  1107.         "y": 400,
  1108.         "wires": []
  1109.     },
  1110.     {
  1111.         "id": "9f13061b6736f02d",
  1112.         "type": "ui_numeric",
  1113.         "z": "235a9f7bdda75b2d",
  1114.         "name": "",
  1115.         "label": "numeric",
  1116.         "tooltip": "",
  1117.         "group": "a998f1f7a01f8062",
  1118.         "order": 3,
  1119.         "width": 0,
  1120.         "height": 0,
  1121.         "wrap": false,
  1122.         "passthru": true,
  1123.         "topic": "topic",
  1124.         "topicType": "msg",
  1125.         "format": "{{value}}",
  1126.         "min": 0,
  1127.         "max": "200",
  1128.         "step": 1,
  1129.         "className": "",
  1130.         "x": 720,
  1131.         "y": 480,
  1132.         "wires": [
  1133.             []
  1134.         ]
  1135.     },
  1136.     {
  1137.         "id": "a70ed0faca5e5571",
  1138.         "type": "ui_chart",
  1139.         "z": "235a9f7bdda75b2d",
  1140.         "name": "",
  1141.         "group": "a998f1f7a01f8062",
  1142.         "order": 0,
  1143.         "width": 0,
  1144.         "height": 0,
  1145.         "label": "chart",
  1146.         "chartType": "line",
  1147.         "legend": "false",
  1148.         "xformat": "HH:mm:ss",
  1149.         "interpolate": "linear",
  1150.         "nodata": "",
  1151.         "dot": false,
  1152.         "ymin": "0",
  1153.         "ymax": "100",
  1154.         "removeOlder": 1,
  1155.         "removeOlderPoints": "",
  1156.         "removeOlderUnit": "3600",
  1157.         "cutout": 0,
  1158.         "useOneColor": false,
  1159.         "useUTC": false,
  1160.         "colors": [
  1161.             "#1f77b4",
  1162.             "#aec7e8",
  1163.             "#ff7f0e",
  1164.             "#2ca02c",
  1165.             "#98df8a",
  1166.             "#d62728",
  1167.             "#ff9896",
  1168.             "#9467bd",
  1169.             "#c5b0d5"
  1170.         ],
  1171.         "outputs": 1,
  1172.         "useDifferentColor": false,
  1173.         "className": "",
  1174.         "x": 630,
  1175.         "y": 240,
  1176.         "wires": [
  1177.             [
  1178.                 "0456c1f99cf2dd57"
  1179.             ]
  1180.         ]
  1181.     },
  1182.     {
  1183.         "id": "0456c1f99cf2dd57",
  1184.         "type": "debug",
  1185.         "z": "235a9f7bdda75b2d",
  1186.         "name": "debug 5",
  1187.         "active": true,
  1188.         "tosidebar": true,
  1189.         "console": false,
  1190.         "tostatus": false,
  1191.         "complete": "false",
  1192.         "statusVal": "",
  1193.         "statusType": "auto",
  1194.         "x": 760,
  1195.         "y": 300,
  1196.         "wires": []
  1197.     },
  1198.     {
  1199.         "id": "6cc5c49618ba875c",
  1200.         "type": "mqtt in",
  1201.         "z": "3758f9118f762f53",
  1202.         "name": "",
  1203.         "topic": "pabak",
  1204.         "qos": "2",
  1205.         "datatype": "auto-detect",
  1206.         "broker": "37904b3e3e545c4e",
  1207.         "nl": false,
  1208.         "rap": true,
  1209.         "rh": 0,
  1210.         "inputs": 0,
  1211.         "x": 170,
  1212.         "y": 260,
  1213.         "wires": [
  1214.             [
  1215.                 "521c37c8a94ee177"
  1216.             ]
  1217.         ]
  1218.     },
  1219.     {
  1220.         "id": "521c37c8a94ee177",
  1221.         "type": "json",
  1222.         "z": "3758f9118f762f53",
  1223.         "name": "",
  1224.         "property": "payload",
  1225.         "action": "",
  1226.         "pretty": false,
  1227.         "x": 370,
  1228.         "y": 260,
  1229.         "wires": [
  1230.             [
  1231.                 "4816533c5b3d9027"
  1232.             ]
  1233.         ]
  1234.     },
  1235.     {
  1236.         "id": "4816533c5b3d9027",
  1237.         "type": "debug",
  1238.         "z": "3758f9118f762f53",
  1239.         "name": "debug 6",
  1240.         "active": true,
  1241.         "tosidebar": true,
  1242.         "console": false,
  1243.         "tostatus": false,
  1244.         "complete": "false",
  1245.         "statusVal": "",
  1246.         "statusType": "auto",
  1247.         "x": 580,
  1248.         "y": 260,
  1249.         "wires": []
  1250.     },
  1251.     {
  1252.         "id": "e222c07d50534297",
  1253.         "type": "mqtt out",
  1254.         "z": "3758f9118f762f53",
  1255.         "name": "",
  1256.         "topic": "pabak",
  1257.         "qos": "2",
  1258.         "retain": "",
  1259.         "respTopic": "",
  1260.         "contentType": "",
  1261.         "userProps": "",
  1262.         "correl": "",
  1263.         "expiry": "",
  1264.         "broker": "37904b3e3e545c4e",
  1265.         "x": 610,
  1266.         "y": 400,
  1267.         "wires": []
  1268.     },
  1269.     {
  1270.         "id": "14dbfa7778c94be1",
  1271.         "type": "json",
  1272.         "z": "3758f9118f762f53",
  1273.         "name": "",
  1274.         "property": "payload",
  1275.         "action": "",
  1276.         "pretty": false,
  1277.         "x": 390,
  1278.         "y": 400,
  1279.         "wires": [
  1280.             [
  1281.                 "e222c07d50534297"
  1282.             ]
  1283.         ]
  1284.     },
  1285.     {
  1286.         "id": "b6e7071a01ede5e0",
  1287.         "type": "inject",
  1288.         "z": "3758f9118f762f53",
  1289.         "name": "",
  1290.         "props": [
  1291.             {
  1292.                 "p": "payload"
  1293.             },
  1294.             {
  1295.                 "p": "topic",
  1296.                 "vt": "str"
  1297.             }
  1298.         ],
  1299.         "repeat": "",
  1300.         "crontab": "",
  1301.         "once": false,
  1302.         "onceDelay": 0.1,
  1303.         "topic": "",
  1304.         "payload": "{\"Name\":\"Pabak\",\"Age\":21}",
  1305.         "payloadType": "json",
  1306.         "x": 170,
  1307.         "y": 400,
  1308.         "wires": [
  1309.             [
  1310.                 "14dbfa7778c94be1"
  1311.             ]
  1312.         ]
  1313.     },
  1314.     {
  1315.         "id": "3eaaa554f6eae82f",
  1316.         "type": "inject",
  1317.         "z": "6e2a90a83fc5b027",
  1318.         "name": "Sensor1",
  1319.         "props": [
  1320.             {
  1321.                 "p": "payload"
  1322.             },
  1323.             {
  1324.                 "p": "topic",
  1325.                 "vt": "str"
  1326.             }
  1327.         ],
  1328.         "repeat": "",
  1329.         "crontab": "",
  1330.         "once": false,
  1331.         "onceDelay": 0.1,
  1332.         "topic": "",
  1333.         "payload": "{\"Humidity\":800,\"Temperature\":210}",
  1334.         "payloadType": "json",
  1335.         "x": 240,
  1336.         "y": 180,
  1337.         "wires": [
  1338.             [
  1339.                 "1bae99dfedeb0fc8"
  1340.             ]
  1341.         ]
  1342.     },
  1343.     {
  1344.         "id": "ebed3ef342829bef",
  1345.         "type": "inject",
  1346.         "z": "6e2a90a83fc5b027",
  1347.         "name": "Sensor2",
  1348.         "props": [
  1349.             {
  1350.                 "p": "payload"
  1351.             },
  1352.             {
  1353.                 "p": "topic",
  1354.                 "vt": "str"
  1355.             }
  1356.         ],
  1357.         "repeat": "",
  1358.         "crontab": "",
  1359.         "once": false,
  1360.         "onceDelay": 0.1,
  1361.         "topic": "",
  1362.         "payload": "{\"Temperature\":21,\"Humidity\":81}",
  1363.         "payloadType": "json",
  1364.         "x": 240,
  1365.         "y": 400,
  1366.         "wires": [
  1367.             [
  1368.                 "1bae99dfedeb0fc8"
  1369.             ]
  1370.         ]
  1371.     },
  1372.     {
  1373.         "id": "1bae99dfedeb0fc8",
  1374.         "type": "http request",
  1375.         "z": "6e2a90a83fc5b027",
  1376.         "name": "",
  1377.         "method": "POST",
  1378.         "ret": "txt",
  1379.         "paytoqs": "ignore",
  1380.         "url": "http://thingsboard.cloud/api/v1/U4wD5YWWV4986k9GPwMK/telemetry",
  1381.         "tls": "",
  1382.         "persist": false,
  1383.         "proxy": "",
  1384.         "insecureHTTPParser": false,
  1385.         "authType": "",
  1386.         "senderr": false,
  1387.         "headers": [],
  1388.         "x": 510,
  1389.         "y": 280,
  1390.         "wires": [
  1391.             [
  1392.                 "893ce39bc3fd2b08"
  1393.             ]
  1394.         ]
  1395.     },
  1396.     {
  1397.         "id": "893ce39bc3fd2b08",
  1398.         "type": "debug",
  1399.         "z": "6e2a90a83fc5b027",
  1400.         "name": "debug 7",
  1401.         "active": true,
  1402.         "tosidebar": true,
  1403.         "console": false,
  1404.         "tostatus": false,
  1405.         "complete": "false",
  1406.         "statusVal": "",
  1407.         "statusType": "auto",
  1408.         "x": 760,
  1409.         "y": 280,
  1410.         "wires": []
  1411.     },
  1412.     {
  1413.         "id": "sensorData",
  1414.         "type": "mqtt in",
  1415.         "z": "32db33e18f3b95b7",
  1416.         "name": "Receive Sensor Data",
  1417.         "topic": "sensor/data",
  1418.         "qos": "2",
  1419.         "datatype": "auto-detect",
  1420.         "broker": "37904b3e3e545c4e",
  1421.         "nl": false,
  1422.         "rap": false,
  1423.         "inputs": 0,
  1424.         "x": 280,
  1425.         "y": 300,
  1426.         "wires": [
  1427.             [
  1428.                 "f1e114f615f81371"
  1429.             ]
  1430.         ]
  1431.     },
  1432.     {
  1433.         "id": "processData",
  1434.         "type": "function",
  1435.         "z": "32db33e18f3b95b7",
  1436.         "name": "Process Data",
  1437.         "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}",
  1438.         "outputs": 2,
  1439.         "timeout": "",
  1440.         "noerr": 0,
  1441.         "initialize": "",
  1442.         "finalize": "",
  1443.         "libs": [],
  1444.         "x": 580,
  1445.         "y": 300,
  1446.         "wires": [
  1447.             [
  1448.                 "controlLight"
  1449.             ],
  1450.             [
  1451.                 "controlDoor"
  1452.             ]
  1453.         ]
  1454.     },
  1455.     {
  1456.         "id": "controlLight",
  1457.         "type": "mqtt out",
  1458.         "z": "32db33e18f3b95b7",
  1459.         "name": "Control Light",
  1460.         "topic": "light/control",
  1461.         "qos": "2",
  1462.         "retain": "",
  1463.         "respTopic": "",
  1464.         "contentType": "",
  1465.         "userProps": "",
  1466.         "correl": "",
  1467.         "expiry": "",
  1468.         "broker": "37904b3e3e545c4e",
  1469.         "x": 830,
  1470.         "y": 220,
  1471.         "wires": []
  1472.     },
  1473.     {
  1474.         "id": "controlDoor",
  1475.         "type": "mqtt out",
  1476.         "z": "32db33e18f3b95b7",
  1477.         "name": "Control Door",
  1478.         "topic": "door/control",
  1479.         "qos": "2",
  1480.         "retain": "",
  1481.         "respTopic": "",
  1482.         "contentType": "",
  1483.         "userProps": "",
  1484.         "correl": "",
  1485.         "expiry": "",
  1486.         "broker": "37904b3e3e545c4e",
  1487.         "x": 830,
  1488.         "y": 360,
  1489.         "wires": []
  1490.     },
  1491.     {
  1492.         "id": "f1e114f615f81371",
  1493.         "type": "json",
  1494.         "z": "32db33e18f3b95b7",
  1495.         "name": "",
  1496.         "property": "payload",
  1497.         "action": "",
  1498.         "pretty": false,
  1499.         "x": 430,
  1500.         "y": 380,
  1501.         "wires": [
  1502.             [
  1503.                 "processData"
  1504.             ]
  1505.         ]
  1506.     },
  1507.     {
  1508.         "id": "1ed46e1a54716e85",
  1509.         "type": "debug",
  1510.         "z": "c4ac0eaa5c5dbdc6",
  1511.         "name": "debug 8",
  1512.         "active": true,
  1513.         "tosidebar": true,
  1514.         "console": false,
  1515.         "tostatus": false,
  1516.         "complete": "false",
  1517.         "statusVal": "",
  1518.         "statusType": "auto",
  1519.         "x": 760,
  1520.         "y": 220,
  1521.         "wires": []
  1522.     },
  1523.     {
  1524.         "id": "bf7857b242de28eb",
  1525.         "type": "fileinput",
  1526.         "z": "c4ac0eaa5c5dbdc6",
  1527.         "name": "",
  1528.         "datatype": "str",
  1529.         "stream": "yes",
  1530.         "property": "payload",
  1531.         "propertyType": "msg",
  1532.         "x": 120,
  1533.         "y": 240,
  1534.         "wires": [
  1535.             []
  1536.         ]
  1537.     },
  1538.     {
  1539.         "id": "58506c6ff0451610",
  1540.         "type": "ui_table",
  1541.         "z": "c4ac0eaa5c5dbdc6",
  1542.         "group": "8ddf37774f55c8cf",
  1543.         "name": "",
  1544.         "order": 4,
  1545.         "width": "0",
  1546.         "height": "0",
  1547.         "columns": [],
  1548.         "outputs": 1,
  1549.         "cts": true,
  1550.         "x": 770,
  1551.         "y": 320,
  1552.         "wires": [
  1553.             []
  1554.         ]
  1555.     },
  1556.     {
  1557.         "id": "9f8bcb18c1bc213a",
  1558.         "type": "csv",
  1559.         "z": "c4ac0eaa5c5dbdc6",
  1560.         "name": "",
  1561.         "sep": ",",
  1562.         "hdrin": true,
  1563.         "hdrout": "none",
  1564.         "multi": "one",
  1565.         "ret": "\\n",
  1566.         "temp": "",
  1567.         "skip": "0",
  1568.         "strings": true,
  1569.         "include_empty_strings": "",
  1570.         "include_null_values": "",
  1571.         "x": 430,
  1572.         "y": 240,
  1573.         "wires": [
  1574.             [
  1575.                 "1ed46e1a54716e85",
  1576.                 "58506c6ff0451610"
  1577.             ]
  1578.         ]
  1579.     },
  1580.     {
  1581.         "id": "3e025351e9d2213c",
  1582.         "type": "ui_template",
  1583.         "z": "c4ac0eaa5c5dbdc6",
  1584.         "group": "8ddf37774f55c8cf",
  1585.         "name": "",
  1586.         "order": 1,
  1587.         "width": "6",
  1588.         "height": "7",
  1589.         "format": "<div class=\"fileContainer\">\n    <input type=\"file\" name=\"file\" id=\"file\" class=\"inputfile\" />\n    <label for=\"file\">File</label>\n    <p style=\"margin:auto\" id=\"fileName\"></p>\n    <button class=\"vibrate filled touched smallfont rounded greybuttons\" ng-click=\"clear()\">\n       <ng-md-icon style=\"color: #fff;\" icon=\"clear\">\n           <md-tooltip md-direction=\"bottom\">CLEAR</md-tooltip>\n       </ng-md-icon>\n   </button>\n</div>\n\n<style>\n    .fileContainer {\n        display: flex;\n    }\n\n    .inputfile {\n        width: 0.1px;\n        height: 0.1px;\n        opacity: 0;\n        overflow: hidden;\n        position: absolute;\n        z-index: -1;\n    }\n\n    .inputfile+label {\n        font-size: 1.25em;\n        font-weight: 700;\n        color: white;\n        text-align: center;\n        padding: 5px;\n        width: 60px;\n        background-color: black;\n    }\n\n    .inputfile:focus+label,\n    .inputfile+label:hover {\n        background-color: red;\n    }\n\n    .inputfile+label {\n        cursor: pointer;\n        /* \"hand\" cursor */\n    }\n\n    .inputfile:focus+label {\n        outline: 1px dotted #000;\n        outline: -webkit-focus-ring-color auto 5px;\n    }\n\n    .inputfile+label * {\n        pointer-events: none;\n    }\n</style>\n\n<script>\n    (function(scope) {\n   var fileInput = $('#file')\n   var fileName = $('#fileName')\n\n   scope.clear = function() {\n       fileInput.val('').trigger('change')\n   }\n\n   fileInput.on('change', function(event) {\n       var file = fileInput[0].files[0];\n       fileName.text(file ? file.name : '')\n\n       if(file) {\n           var reader = new FileReader();\n           reader.readAsBinaryString(file);\n\n           reader.onload = function() {\n               scope.send({payload: reader.result, file: file.name})\n           };\n\n           reader.onerror = function() {\n               console.log('Error while reading files');\n           };\n       } else\n           scope.send({payload: null})\n   })\n})(scope);\n</script>",
  1590.         "storeOutMessages": true,
  1591.         "fwdInMessages": true,
  1592.         "resendOnRefresh": true,
  1593.         "templateScope": "local",
  1594.         "className": "",
  1595.         "x": 200,
  1596.         "y": 320,
  1597.         "wires": [
  1598.             [
  1599.                 "9f8bcb18c1bc213a"
  1600.             ]
  1601.         ]
  1602.     },
  1603.     {
  1604.         "id": "csvNode",
  1605.         "type": "csv",
  1606.         "z": "789d1af429bc9136",
  1607.         "name": "Parse CSV",
  1608.         "sep": ",",
  1609.         "hdrin": true,
  1610.         "hdrout": "",
  1611.         "multi": "one",
  1612.         "ret": "\\n",
  1613.         "temp": "",
  1614.         "skip": "0",
  1615.         "strings": true,
  1616.         "include_empty_strings": "",
  1617.         "include_null_values": "",
  1618.         "x": 390,
  1619.         "y": 460,
  1620.         "wires": [
  1621.             [
  1622.                 "functionNode"
  1623.             ]
  1624.         ]
  1625.     },
  1626.     {
  1627.         "id": "functionNode",
  1628.         "type": "function",
  1629.         "z": "789d1af429bc9136",
  1630.         "name": "Convert to JSON",
  1631.         "func": "msg.payload = JSON.stringify(msg.payload);\nreturn msg;",
  1632.         "outputs": 1,
  1633.         "timeout": "",
  1634.         "noerr": 0,
  1635.         "initialize": "",
  1636.         "finalize": "",
  1637.         "libs": [],
  1638.         "x": 550,
  1639.         "y": 200,
  1640.         "wires": [
  1641.             [
  1642.                 "httpResponseNode",
  1643.                 "cb0e34cf2c594395"
  1644.             ]
  1645.         ]
  1646.     },
  1647.     {
  1648.         "id": "httpResponseNode",
  1649.         "type": "http response",
  1650.         "z": "789d1af429bc9136",
  1651.         "name": "Send Response",
  1652.         "statusCode": "",
  1653.         "headers": {},
  1654.         "x": 820,
  1655.         "y": 420,
  1656.         "wires": []
  1657.     },
  1658.     {
  1659.         "id": "3df70cfdf7101d71",
  1660.         "type": "http request",
  1661.         "z": "789d1af429bc9136",
  1662.         "name": "",
  1663.         "method": "GET",
  1664.         "ret": "txt",
  1665.         "paytoqs": "ignore",
  1666.         "url": "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/significant_month.csv",
  1667.         "tls": "",
  1668.         "persist": false,
  1669.         "proxy": "",
  1670.         "insecureHTTPParser": false,
  1671.         "authType": "",
  1672.         "senderr": false,
  1673.         "headers": [],
  1674.         "x": 170,
  1675.         "y": 280,
  1676.         "wires": [
  1677.             [
  1678.                 "csvNode"
  1679.             ]
  1680.         ]
  1681.     },
  1682.     {
  1683.         "id": "807ae7a88a3a672c",
  1684.         "type": "inject",
  1685.         "z": "789d1af429bc9136",
  1686.         "name": "",
  1687.         "props": [
  1688.             {
  1689.                 "p": "payload"
  1690.             },
  1691.             {
  1692.                 "p": "topic",
  1693.                 "vt": "str"
  1694.             }
  1695.         ],
  1696.         "repeat": "",
  1697.         "crontab": "",
  1698.         "once": false,
  1699.         "onceDelay": 0.1,
  1700.         "topic": "",
  1701.         "payload": "",
  1702.         "payloadType": "date",
  1703.         "x": 120,
  1704.         "y": 160,
  1705.         "wires": [
  1706.             [
  1707.                 "3df70cfdf7101d71"
  1708.             ]
  1709.         ]
  1710.     },
  1711.     {
  1712.         "id": "cb0e34cf2c594395",
  1713.         "type": "debug",
  1714.         "z": "789d1af429bc9136",
  1715.         "name": "debug 9",
  1716.         "active": true,
  1717.         "tosidebar": true,
  1718.         "console": false,
  1719.         "tostatus": false,
  1720.         "complete": "false",
  1721.         "statusVal": "",
  1722.         "statusType": "auto",
  1723.         "x": 860,
  1724.         "y": 200,
  1725.         "wires": []
  1726.     }
  1727. ]

Editor

You can edit this paste and save as new:


File Description
  • paste2
  • Paste Code
  • 29 Apr-2024
  • 45.03 Kb
You can Share it: